storepush_video_context(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

🌸 storepush_video_context β€” Arcan Lua API πŸ’…

okay bestie, so this one lives in the Arcan Lua API manual (section 3, for the uninitiated ✨), and it's genuinely one of the cutest little context tricks in the whole vidsys toolbox. let's get into it 🫢


✨ NAME ✨

storepush_video_context β€” literally renders your current video context into an object, and then pushes the context. two things, one call, main character energy πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

contextind, newvid
storepush_video_context()

so yeah, it takes no arguments (lowkey iconic of it) and hands you back two things: a contextind and a newvid. no cap πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe: the whole storepush/storepop family of functions is basically the regular push/pop context functions, but with a little gift with purchase 🎁

the twist? the new context comes with an object inside its storage, and that object is a screenshot of the previous context. that's it, that's the whole personality. the way that it just... takes a picture of where you were before you jump somewhere new? obsessed 😭

so if push/pop is "save my spot," storepush/storepop is "save my spot and scrapbook it." periodt πŸ’…


🌈 EXAMPLE 🌈

here's the whole thing in action, copied exactly so you can vibe with it:

function storepush_video_context0()
      a = fill_surface(100, 100, 0, 255, 0);
      b = fill_surface(100, 100, 255, 0, 0);
      show_image({a, b});
      move_image(b, VRESW - 100, VRESH - 100);
      c = storepop_video_context();
      show_image(c);
      move_image(c, 50, 50, 50);
      move_image(c, 0, 0, 50);
end

two surfaces, one green and one red 🟩πŸŸ₯, both popped on screen, b yeeted down to the bottom-right corner with VRESW - 100 and VRESH - 100, then c comes back from storepop_video_context() carrying that screenshot. then we show it and move it around like it's nothing. ate πŸ”₯


🧚 SEE ALSO 🧚

go read those too, bestie, they're the whole friend group and they make way more sense together πŸ‘‘


that's the whole page, iykyk πŸ’œ β€” this one's from vidsys, dated October 2026. mwah, go screenshot something pretty πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from