Expand description
Frame compositing: the baked background plus animated elements at time t.
Particles snap to the cell grid (exact palette, small GIF diffs); sprites use
integer nearest-neighbour scaling.
The activity, character and prop art come through SceneArt, so the same
code plays live scenes (built-in art) and saved ones (their own copy).
Every draw records the rectangle it writes, so IncrementalFrame can make
the next frame from the last one by restoring and redrawing only those
rectangles (the live wallpaper, PLAN.md section 5.3), and report what changed.
Structs§
- Incremental
Frame - A frame kept between calls: each new time redraws only what the last
frame and this one draw over the background. The image always equals
render_frame_with_artat the last time given. - Pixel
Rect - A rectangle of pixels, inside the image it belongs to.
Functions§
- hero_
time - The still-frame time used for stills, thumbnails and the static wallpaper: the first moment at or after the scene’s ember-based hero time (50 ms steps, up to 10 s) when the character shows the first frame of its activity’s start state, so a still never catches a blink or a mid-gesture. Independent of the Buddy toggle, so toggling it keeps the same moment.
- hero_
time_ with_ art hero_timewith the given art.- render_
frame - Composites one frame at
t_msover a baked background (live clock). - render_
frame_ clocked - Like
render_frame, with an explicit character clock:Clock::Loopmakes the character follow the activity’s loop script for a seamless GIF. - render_
frame_ with_ art - Composites one frame with the given art (built-in, or a saved scene’s).