feat: GraphicsArchive.sequences for creature and ornament animations #465
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!465
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/sequences"
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?
GraphicsArchive.sequences(cls1, cls2)lists the animations of a creature (0x0f) or a wall / floor ornament (0x09/0x0a) as JSON. Each hasframe_ms(one tick, 134) andviews: the images one per tick, ready foricon().Format (per SKWINSPX
v5/, checked on DOS EN data)(0x0f, type, dtRaw8, 0xfb): command → offset;0xffff= any other command.0xfc/0xfd: parallel per-step arrays.0xfcholds sound,nextjump, chance, action bit and ticks (+ random extra).0xfdholds an image per direction, the 5×5 position and 2-bit mirror flags.0x0ddigit text, one step per tick; stepsdrawscls4block4s..(walls) /10s..(floors).Documented in
docs/formats/graphics-dat.md§ Animation sequences.Choices (from the discussion)
frameMs. Each step repeats once per base tick, soicon()at 134 ms plays it at the engine's base pace. Random extra ticks and step chances are exposed per step but not inframes, which follow everynextwith every chance succeeding. Static creatures cycle every record one tick each, as the engine does.[], as their command tables live in the executable.Deviations / limits
icon()does not flip;mirrorper frame tells the caller.0x18has no image block for its step 2 (no views).0x13uses one image for all directions).0xfcbyte 0 bit 7, byte 2 bit 6, byte 3 bit 1 and0xfdbytes 5–6 remain unidentified.Tests: every DOS and Mac US creature (76) and animated ornament (48); creature 0's walk renders as a 12-frame APNG; Mac JP returns
[]; Python binding.Closes #462
https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7