feat(magicmap): magic-map crate and terrain chips #403

Merged
jqueuniet merged 7 commits from feat/402-magicmap-terrain into main 2026-10-29 21:06:31 +01:00
Owner

First of four stacked PRs for #402 (magic-map images from dm2 extract).

  • dm2_graphics::Archive::creature_ai_index (the renderer's AI lookup, (0x0f, type, 0x0b, 0x05), missing -> 0) and the free creature_ai_is_static, whose table moves out of dm2-saves. dm2-saves keeps its own lookup chain; a golden test pins save decoding as unchanged. Breaking: dm2_saves::records::CREATURE_GIDX_ALT_TABLE is removed.
  • New crate dm2-magicmap: per cell and game tick, the base-strip chip the in-game magic map draws (walls, floors, pits, doors, stairs, teleporters, trick walls, map exits), following SKWINSPX v5 DM2_DRAW_MAP_CHIP with facing north and reveal mode on. Border tilesets come from the start-tile digit text, default 1.

Refs #402

https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw

First of four stacked PRs for #402 (magic-map images from `dm2 extract`). - `dm2_graphics::Archive::creature_ai_index` (the renderer's AI lookup, `(0x0f, type, 0x0b, 0x05)`, missing -> 0) and the free `creature_ai_is_static`, whose table moves out of dm2-saves. dm2-saves keeps its own lookup chain; a golden test pins save decoding as unchanged. Breaking: `dm2_saves::records::CREATURE_GIDX_ALT_TABLE` is removed. - New crate `dm2-magicmap`: per cell and game tick, the base-strip chip the in-game magic map draws (walls, floors, pits, doors, stairs, teleporters, trick walls, map exits), following SKWINSPX v5 `DM2_DRAW_MAP_CHIP` with facing north and reveal mode on. Border tilesets come from the start-tile digit text, default 1. Refs #402 https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
Move the AI flags bit 0 table and the type-to-AI-index lookup to
dm2-graphics for reuse outside save codec.

Refs #402

Claude-Session: https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
creature_ai_index reads only the inline word (0x0f, type, 0x0b, 0x05),
else 0, as QUERY_CREATURE_AI_SPEC_FROM_TYPE. The save codec keeps its
own 0x05, 0x04, identity chain locally, pinned by a DOS-EN golden mask.

Refs #402

Claude-Session: https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
New dm2-magicmap crate: MapView, border_tilesets and terrain_chips pick
the base-strip frame and teleporter swirl the magic map draws, facing
north with reveal on.

Refs #402

Claude-Session: https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
A level without a border digit uses tileset 1, the engine's buffer
default, instead of the map's graphics style.

Refs #402

Claude-Session: https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
CREATURE_GIDX_ALT_TABLE removal and its dm2-graphics replacements.

Refs #402

Claude-Session: https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
Fix the 0CEE marker and drop the retired SKWIN citation.

Refs #402

Claude-Session: https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
docs(magicmap): document Chip fields
All checks were successful
CI / msrv (1.90) (pull_request) Successful in 46s
CI / audit (pull_request) Successful in 13s
CI / stable (pull_request) Successful in 1m31s
CI / python bindings (3.11) (pull_request) Successful in 33s
CI / audit (push) Successful in 14s
CI / stable (push) Successful in 1m28s
CI / python bindings (3.11) (push) Successful in 32s
CI / msrv (1.90) (push) Successful in 45s
c3eacedbac
Field docs for cls1, cls2, frame and mirror.

Refs #402

Claude-Session: https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
jqueuniet deleted branch feat/402-magicmap-terrain 2026-10-29 21:06:31 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jqueuniet/dm2-tools!403
No description provided.