dm2-dungeon: expand text escape codes 29/30 via per-version tables #270

Closed
opened 2026-07-17 18:51:38 +02:00 by jqueuniet · 0 comments
jqueuniet commented 2026-07-17 18:51:38 +02:00 (Migrated from codeberg.org)

Context

TextDatabase decodes the text_data_size × u16 section and round-trips byte-for-byte across all 16 port fixtures. Escape codes 29 and 30 currently emit placeholder characters; the per-version expansion tables they index into (to substitute their real text) are deferred (ROADMAP.md:73, 433; docs/formats/dungeon-dat.md § "Text data"). This is the only remaining decode deferral in dm2-dungeon — the record layouts themselves already decode.

Scope

  • Locate/derive the per-version substitution tables for codes 29 and 30 (they vary by port).
  • Expand them in text_at() so decoded strings match the in-game rendered text.
  • Keep round-trip byte-identity intact (expansion is decode-side only).

Acceptance

  • Codes 29/30 resolve to real substituted text for at least DOS-EN, with the table keyed by version.
  • All 16 fixtures still round-trip byte-for-byte.
## Context `TextDatabase` decodes the `text_data_size × u16` section and round-trips byte-for-byte across all 16 port fixtures. Escape codes **29** and **30** currently emit placeholder characters; the per-version expansion tables they index into (to substitute their real text) are deferred (ROADMAP.md:73, 433; `docs/formats/dungeon-dat.md` § "Text data"). This is the *only* remaining decode deferral in `dm2-dungeon` — the record layouts themselves already decode. ## Scope - Locate/derive the per-version substitution tables for codes 29 and 30 (they vary by port). - Expand them in `text_at()` so decoded strings match the in-game rendered text. - Keep round-trip byte-identity intact (expansion is decode-side only). ## Acceptance - Codes 29/30 resolve to real substituted text for at least DOS-EN, with the table keyed by version. - All 16 fixtures still round-trip byte-for-byte.
Sign in to join this conversation.
No labels
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#270
No description provided.