Replaces the usercall bridge to 0x570F30 with pure Rust that loads 28
bitmap fonts, 23 font extensions, and sets the font palette via typed
DDDisplay vtable calls. Adds three new DDDisplay vtable slots (load_font,
load_font_extension, set_font_palette) and expands gfx_color_table from
9 to 11 entries, absorbing former _unknown_7330 as font palette data.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
refactor: extract game logic from wormkit/replacements to openwa-coreβ
Add three new typed structs replacing raw pointer arithmetic:
- TeamIndexMap (0x64 bytes): entries[i16;16] + count + gap + terminator.
Three instances at DDGame+0x7650 replace 6 fragmented byte arrays.
- RenderEntry (0x14 bytes): active flag + unknown data.
14 entries at DDGame+0x73B0 replace opaque _unknown_73b0 blob.
- NetBridge (0x2C bytes): ddgame back-pointer + net_config bytes.
Created for online games only, replaces ddgame_secondary raw pointer.
ddgame_init_render_indices now takes *mut DDGame and uses pure field
access. DDGameWrapper.ddgame_secondary renamed to net_bridge with
typed *mut NetBridge pointer.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
refactor: rename MapClass β MapView, move to frontend moduleβ
MapView is a CWnd-derived class used across all game modes (local MP,
network, campaign, replay) for terrain/map data β not replay-specific.
Inheritance: CWnd β base (vtable 0x64C348) β MapView (vtable 0x64FC60).
Embedded in frontend dialogs as child windows for map preview/selection.
Loads .thm terrain files (current.thm for live, playback.thm for replay).
Move from engine/map_class.rs to new frontend/ module. Rename constants
(MAP_CLASS_* β MAP_VIEW_*). Update Ghidra labels.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
refactor: add MapClass struct, use typed pointer in replay map loadingβ
Create MapClass (0x29628 bytes) with vtable pointer and terrain_flag
field. Define MapClassVtable with typed destructor slot.
Replace raw u32/pointer arithmetic in replay map loading with typed
MapClass pointers β constructor, load, vtable destructor calls, and
terrain_flag field access all use the correct type. Eliminates manual
vtable offset calculations.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: add ReplayStream, ParseReplayPosition, and stream helper portsβ
- ReplayStream: cursor over byte buffer with read_u8, read_u16, read_u32,
read_prefixed_string, read_worm_name, skip methods
- parse_replay_position: converts "MM:SS.FF" time strings to frame count
- validate_team_type: validates team type byte range
- 18 unit tests covering all methods and edge cases
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: port SpriteGfxTable__Init + RingBuffer__Init to Rust (Group A)β