feat(cli): level magic-map images in extract and bindings #412

Merged
jqueuniet merged 5 commits from feat/409-level-cli into main 2026-10-29 22:13:53 +01:00
Owner

Second of two stacked PRs for #409; based on the library PR.

  • dm2 extract --gdat writes level_NN.png per level beside the map images. A level containing an unrenderable map, or too large at the requested scale, is skipped with a warning.
  • dungeon_level_png in dm2-convert, wasm dungeonLevelPng, FFI dm2_dungeon_level_png, Python dungeon_level_png.
  • Docs: a Levels section with the seam rule, and validation against the DMDC2 atlas:
    • level set and extents match;
    • cells shared by two maps agree in terrain;
    • the atlas leaves all-exit cells black where the magic map draws border chips;
    • its colour shades come from a different 6-bit to 8-bit palette expansion.
  • test: commit: two fixture-backed tests still expected #407's old 320 ms item tick.

Refs #409

https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw

Second of two stacked PRs for #409; based on the library PR. - `dm2 extract --gdat` writes `level_NN.png` per level beside the map images. A level containing an unrenderable map, or too large at the requested scale, is skipped with a warning. - `dungeon_level_png` in dm2-convert, wasm `dungeonLevelPng`, FFI `dm2_dungeon_level_png`, Python `dungeon_level_png`. - Docs: a Levels section with the seam rule, and validation against the DMDC2 atlas: - level set and extents match; - cells shared by two maps agree in terrain; - the atlas leaves all-exit cells black where the magic map draws border chips; - its colour shades come from a different 6-bit to 8-bit palette expansion. - `test:` commit: two fixture-backed tests still expected #407's old 320 ms item tick. Refs #409 https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
`extract --gdat` writes `level_NN.png` for every level beside the map
images. A level with an unrenderable map, or too large at the requested
scale, is skipped with a warning.

Refs #409

Claude-Session: https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
#407 moved animated item icons to the measured 134 ms tick; these two
fixture-backed tests still expected 320.

Claude-Session: https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
`dungeon_level_png` in dm2-convert, wasm `dungeonLevelPng`, FFI
`dm2_dungeon_level_png` and Python `dungeon_level_png`.

Refs #409

Claude-Session: https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
The seam rule with DOS-EN's overlap counts, the validation against the
DMDC2 atlas, and the colour-expansion difference behind its shades.

Refs #409

Claude-Session: https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
fix(cli): name level images in extract help; faster oversized-level test
All checks were successful
CI / msrv (1.90) (pull_request) Successful in 33s
CI / audit (pull_request) Successful in 14s
CI / stable (pull_request) Successful in 56s
CI / python bindings (3.11) (pull_request) Successful in 27s
CI / msrv (1.90) (push) Successful in 27s
CI / audit (push) Successful in 19s
CI / stable (push) Successful in 55s
CI / python bindings (3.11) (push) Successful in 25s
971d030843
`--gdat`'s help now mentions `level_NN.png`. The oversized-level test
pushes one map far from its level instead of rendering every map near
4096 px (194 s to under 30 s), and the console-family test checks that
no level image is written at all.

Refs #409

Claude-Session: https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
jqueuniet changed target branch from feat/409-level-images to main 2026-10-29 22:13:04 +01:00
jqueuniet deleted branch feat/409-level-cli 2026-10-29 22:13:53 +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!412
No description provided.