dm2-graphics: complete Champion (category 0x16) follow-ups #276

Merged
jqueuniet merged 0 commits from refs/pull/276/head into main 2026-07-19 19:28:37 +02:00
jqueuniet commented 2026-07-19 19:19:04 +02:00 (Migrated from codeberg.org)

Closes #268.

Scope items from the issue:

  • 12 attack/pouch strings — decoded. New CmdString type is an engine-faithful port of DM2_QUERY_CMDSTR_TEXT ([SKPROJECT] SKWINSPX/src/v5/skgdtqdb.cpp:275-319), quirks included (single accumulator carried across repeated key matches, per-match negation, optional =, absent key → 0), with named getters for the six engine-pinned keys (SK/LV/CM/TA/EX/DM) and the full 18-key table1d6912 vocabulary documented. Archive::champion_cmd_strings(htype, language) resolves the 4 records per champion per language; Champion::parse unchanged (the records are per-language, no untranslated bucket).
  • Portrait palette resolution — already resolved by #190 (the records are voice SFX, Champion::voice); no code needed, checkbox closed by bookkeeping.
  • Named ability/skill accessorsAbility / SkillCategory enums with engine-pinned order: Luck/Strength/Dexterity/Wizardry/Vitality/AntiMagic/AntiFire and Fighter/Ninja/Wizard/Priest (skhero.h:75, 79-82). The previous DMWEB-sourced doc comments (Strength-first with Anti-Poison; Priest before Wizard) were wrong and are corrected.
  • FM-Towns format-4 portraits — already worked via the archive-composed image path (#188); now pinned: stats byte-equal to DOS-EN in the cross-port test, zero voice records, Japanese cmd strings with tails byte-equal to DOS-EN.

Empirical corrections to the docs, all pinned by tests:

  • The attack/pouch strings are not identical across the 16 champions: champion 4 has a stronger kick (BZ25…PB75DM75), champion 6 stronger punch/kick damage (DM52/DM68) — identical outliers on DOS-EN, Mac US, and FM-Towns JP.
  • The documented "DOS-EN build bug" (English-tagged strings carrying French text) does not exist: English records carry English text, byte-identical to Mac US (raw records compared byte-for-byte). Most plausible origin of the old claim: a language-unfiltered last-wins lookup surfacing the French record.
  • Dangling references to a never-committed champion-decoder spec replaced.

Acceptance per the issue: every sub-item is covered by a test (9 new cmdstr unit tests + 6 new/extended fixture tests), and cross-port byte-equivalence is preserved and extended (DOS-EN / Mac US / FM-Towns JP).

Closes #268. Scope items from the issue: - **12 attack/pouch strings** — decoded. New `CmdString` type is an engine-faithful port of `DM2_QUERY_CMDSTR_TEXT` ([SKPROJECT] SKWINSPX/src/v5/skgdtqdb.cpp:275-319), quirks included (single accumulator carried across repeated key matches, per-match negation, optional `=`, absent key → 0), with named getters for the six engine-pinned keys (SK/LV/CM/TA/EX/DM) and the full 18-key `table1d6912` vocabulary documented. `Archive::champion_cmd_strings(htype, language)` resolves the 4 records per champion per language; `Champion::parse` unchanged (the records are per-language, no untranslated bucket). - **Portrait palette resolution** — already resolved by #190 (the records are voice SFX, `Champion::voice`); no code needed, checkbox closed by bookkeeping. - **Named ability/skill accessors** — `Ability` / `SkillCategory` enums with **engine-pinned** order: Luck/Strength/Dexterity/Wizardry/Vitality/AntiMagic/AntiFire and Fighter/Ninja/**Wizard**/Priest (skhero.h:75, 79-82). The previous DMWEB-sourced doc comments (Strength-first with Anti-Poison; Priest before Wizard) were wrong and are corrected. - **FM-Towns format-4 portraits** — already worked via the archive-composed image path (#188); now pinned: stats byte-equal to DOS-EN in the cross-port test, zero voice records, Japanese cmd strings with tails byte-equal to DOS-EN. Empirical corrections to the docs, all pinned by tests: - The attack/pouch strings are **not** identical across the 16 champions: champion 4 has a stronger kick (`BZ25…PB75DM75`), champion 6 stronger punch/kick damage (`DM52`/`DM68`) — identical outliers on DOS-EN, Mac US, and FM-Towns JP. - The documented **"DOS-EN build bug"** (English-tagged strings carrying French text) does not exist: English records carry English text, byte-identical to Mac US (raw records compared byte-for-byte). Most plausible origin of the old claim: a language-unfiltered last-wins lookup surfacing the French record. - Dangling references to a never-committed champion-decoder spec replaced. Acceptance per the issue: every sub-item is covered by a test (9 new `cmdstr` unit tests + 6 new/extended fixture tests), and cross-port byte-equivalence is preserved and extended (DOS-EN / Mac US / FM-Towns JP).
Sign in to join this conversation.
No reviewers
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!276
No description provided.