feat: GraphicsArchive.animation draws sequence views as the game does #468
No reviewers
Labels
No labels
area/ci-release
area/cli
area/docs
area/dungeon
area/ftl
area/graphics
area/gui
area/music
area/saves
area/tooling
port/amiga
port/dos
port/fm-towns
port/mac
port/pc98
port/sega-cd
priority/high
priority/low
priority/medium
type/bug
type/chore
type/docs
type/feature
type/research
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jqueuniet/dm2-tools!468
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/animation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #466
GraphicsArchive.animation(cls1, cls2, sequence, view, options?)(wasm, FFI, Python) draws one view of asequences()entry as one PNG, an APNG when it has several frames.icon()frames now always fill the canvas.Placement (creatures)
Per SKWINSPX
DM2_QUERY_CREATURE_PICST/DM2_DRAW_PICST, each tick is drawn as the game draws a creature one tile ahead, centre cell:All creature rects (5000–5099, DOS EN and Mac US) have mode 7: bottom-centre, so frames share a ground point; walking creatures move across the tile and scale per step.
Changes
apng()takes placed frames on a canvas bounding them all; fixes the invalid firstfcTL(#466 item 1).dtRectangle(1, 0, 4, 0)decoded as the engine's blit rect table (documented).sequences()steps gainscale(byte 5) andshift(byte 6); the view logic moves toArchive::creature_ticks,creature_view_image,ornament_view, shared bysequences()andanimation().ConvertError::NoSequenceViewfor a missing sequence or view.Limits
stretch256.Tests
graphics_animation: everyfcTLmatches IHDR foricon()andanimation(); creature 0 command 3 front pinned at 153×119; ornament 0x17 9 frames; bad sequence / view / class refused; unknown option refused.animationreturns an APNG.https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7