dm2-graphics: Champion::palette is mislabeled — (0x16, htype, 0x02, 0x82) is the champion's voice SFX #190
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Champion::palette(crates/dm2-graphics/src/champion.rs~169) documents the(0x16, htype, 0x02, 0x82)record as a "Per-champion palette", with a note that champion 14's missing record means "the engine presumably falls back to one of the 6 shared palettes at cls2=0xFE".Those records are not palettes.
cls3 = 0x02isdtSnd, and the payloads carry the standard SFX framing: rate 11127 Hz LE (77 2b), the signed-PCM header quartet08 01 00 00, and 7-8 KB bodies — speech-length audio. They are the champions' voice samples (the line played when hiring), served by the same dtSnd load path as every other SFX ([SKPROJECT] v5/bgdat.cpp:940-975reads(b_02, b_03, 2, b_04)tuples).dos-en carries 21 such records under cls1 = 0x16; champion 14 simply has no dedicated voice sample.
Fix direction
Rename the field (e.g.
voice: Option<EntryRef>) or, better, expose it as a parsedSfxonce the SFX API keys on cls3 = 0x02 (see the console-SFX issue); fix the docstring and drop the shared-palette speculation. Checkdm2 info/ extract output for anything that labels it a palette.Probe:
scratch/probe_champal.py(gitignored).Fixed by #208 (merged into
main).