feat(dungeon): rebuild the tile block and checksum in lossless JSON #391

Merged
jqueuniet merged 3 commits from feat/390-dungeon-json into main 2026-10-28 07:13:24 +01:00
Owner

Part of #390.

  • Lossless dungeon JSON schema 2: the tile-data block and the trailing checksum (byte sum, file byte order) are rebuilt from the map bodies, so edits reload with a valid checksum. tile_block_seed is kept only for files the bodies don't rebuild, and the stored checksum only when it was wrong. Schema 1 still reconstructs.
  • FFI and Python tests now cover the dungeon exports.

All 16 fixtures round-trip byte-exact without a seed. In-game (DOS EN): edits load; the engine ignores the checksum.

Part of #390. - Lossless dungeon JSON schema 2: the tile-data block and the trailing checksum (byte sum, file byte order) are rebuilt from the map bodies, so edits reload with a valid checksum. `tile_block_seed` is kept only for files the bodies don't rebuild, and the stored `checksum` only when it was wrong. Schema 1 still reconstructs. - FFI and Python tests now cover the dungeon exports. All 16 fixtures round-trip byte-exact without a seed. In-game (DOS EN): edits load; the engine ignores the checksum.
feat(dungeon): rebuild the tile block and checksum in lossless JSON
All checks were successful
CI / msrv (1.90) (pull_request) Successful in 28s
CI / audit (pull_request) Successful in 21s
CI / stable (pull_request) Successful in 52s
CI / python bindings (3.11) (pull_request) Successful in 23s
d8955e1ee9
The trailer is the byte sum of the file, so a seeded tail went stale on
any edit. Schema 2 carries the seed and stored checksum only when the
bodies do not rebuild them.

Refs #390
docs(dungeon): the engine ignores the checksum
All checks were successful
CI / msrv (1.90) (pull_request) Successful in 28s
CI / audit (pull_request) Successful in 19s
CI / stable (pull_request) Successful in 51s
CI / python bindings (3.11) (pull_request) Successful in 23s
CI / msrv (1.90) (push) Successful in 28s
CI / stable (push) Successful in 51s
CI / python bindings (3.11) (push) Successful in 23s
CI / audit (push) Successful in 18s
18a4ec2e41
jqueuniet deleted branch feat/390-dungeon-json 2026-10-28 07:13:24 +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!391
No description provided.