Repository navigation
v0.1.21 — Phase 9 sprite migration
Phase 9 of the canon-first migration sprint.
What
source/sprites/Newb.lua now loads its 10-state FSM from the generated source/data/animations.lua manifest instead of inline addState literals. The manifest (per-character spec table with frames, frameDuration, loop, fallback, blocks_input, bible_anim_id) is the single source-of-truth, generated by tools/canon/generate_animations_manifest.js and linked back to the story bible. The Phase 7 continuity validator already gates this manifest against asset.frame_count on every build.
Why
Canon-first migration goal: animation specs live in declarative data, not scattered Lua call-sites. Future sprite changes are a manifest edit + regenerate, not a code patch. AnimatedSprite library stays generic — no fork.
Invariants preserved
- Same 10 states by same names (idle/walk x NSEW + interact + surprised)
- Same frame indices per state (verified against pre-migration Newb.lua)
- Same tickStep / loop semantics
- Spawn coords + collideRect + facing init unchanged
- updateMovement (d-pad + footstep SFX) untouched
- No imagetable load in update — init-only
Files
- source/sprites/Newb.lua — migrated to manifest loop
- source/pdxinfo — 0.1.20 -> 0.1.21