graphics.dat: decode sounds, music, text, fonts and palettes in the bindings #430

Closed
opened 2026-10-30 17:38:21 +01:00 by jqueuniet · 0 comments
Owner

dm2 extract decodes sounds, music, text, fonts and palettes, but that logic lives in the CLI; the bindings only decode images. Move it to dm2-convert and expose, by class tuple:

  • graphicsSoundWav(gdat, cls1, cls2, cls3, cls4): SFX to WAV, console-family raw PCM included;
  • graphicsMusicMidi(gdat, …): DOS HMP to a Standard MIDI File;
  • graphicsTextJson(gdat, …): {language, text, glyph_text}, runes as private-use code points as in glyph_name;
  • graphicsFontPng(gdat, …): font sheet;
  • graphicsPaletteJson(gdat, …): [index, r, g, b] entries, or master indices for a Palette16.

Acceptance

  • Same output as dm2 extract for each kind on DOS and Mac US.
  • Exposed in every binding; the CLI calls the shared code.

Depends on #429.

`dm2 extract` decodes sounds, music, text, fonts and palettes, but that logic lives in the CLI; the bindings only decode images. Move it to `dm2-convert` and expose, by class tuple: - `graphicsSoundWav(gdat, cls1, cls2, cls3, cls4)`: SFX to WAV, console-family raw PCM included; - `graphicsMusicMidi(gdat, …)`: DOS HMP to a Standard MIDI File; - `graphicsTextJson(gdat, …)`: `{language, text, glyph_text}`, runes as private-use code points as in `glyph_name`; - `graphicsFontPng(gdat, …)`: font sheet; - `graphicsPaletteJson(gdat, …)`: `[index, r, g, b]` entries, or master indices for a Palette16. ## Acceptance - Same output as `dm2 extract` for each kind on DOS and Mac US. - Exposed in every binding; the CLI calls the shared code. Depends on #429.
Sign in to join this conversation.
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#430
No description provided.