debug: narrow desync to GfxDir colour loading via snapshot diff
Browse filesSnapshot diff at frame 1350 shows only 2 differences between original
and Rust constructors:
1. landscape_property (DDGame+0x468) — different values
2. gfx_color_table (DDGame+0x730C) — [1,2,3,4,5,6,8,7,9] vs [0xFF x 9]
Both trace to the headless LoadSprites fallback in create_ddgame.
Patching only the color table doesn't fix the desync — landscape_property
(computed from PCLandscape vtable getter) is also affected.
Root cause: wa_load_sprites in the gfx_mode==0 path doesn't correctly
populate GfxDir colour data, which affects both the colour table AND
landscape property computation downstream.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
crates/openwa-wormkit/src/replacements/game_session.rs
CHANGED
|
@@ -122,6 +122,7 @@ pub(crate) unsafe fn construct_ddgame_wrapper(
|
|
| 122 |
game_info,
|
| 123 |
input_ctrl as u32,
|
| 124 |
);
|
|
|
|
| 125 |
}
|
| 126 |
|
| 127 |
// Initialize DDGame's game-state fields.
|
|
|
|
| 122 |
game_info,
|
| 123 |
input_ctrl as u32,
|
| 124 |
);
|
| 125 |
+
|
| 126 |
}
|
| 127 |
|
| 128 |
// Initialize DDGame's game-state fields.
|