chore: trap DisplayGfx::LoadSpriteEx (slot 30) as confirmed-dead
Browse filesStatic analysis (no `call [reg+0x78]` reaches a DisplayGfx in WA.exe, no
Rust caller in the workspace) plus headless+headful replay tests and
manual gameplay testing all show the slot is never invoked. Trap it so
any future caller — Rust or WA — produces an immediate panic with stack
trace pointing at the unexpected entry, signalling the moment a real
port becomes necessary.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
crates/openwa-dll/src/replacements/render.rs
CHANGED
|
@@ -1710,6 +1710,12 @@ fn install_display() -> Result<(), String> {
|
|
| 1710 |
load_font_extension => load_font_extension,
|
| 1711 |
})?;
|
| 1712 |
let _ = log_line("[Display] DisplayGfx: patched 31 methods -> Rust");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1713 |
}
|
| 1714 |
|
| 1715 |
Ok(())
|
|
|
|
| 1710 |
load_font_extension => load_font_extension,
|
| 1711 |
})?;
|
| 1712 |
let _ = log_line("[Display] DisplayGfx: patched 31 methods -> Rust");
|
| 1713 |
+
|
| 1714 |
+
// DisplayGfx::LoadSpriteEx (vtable slot 30) has zero callers in both
|
| 1715 |
+
// WA.exe (no instructions reach vtable[+0x78] on a DisplayGfx) and our
|
| 1716 |
+
// own Rust code (no `bind_DisplayVtable!` invocation, no direct call).
|
| 1717 |
+
// Trap it so we'll be alerted the moment any future caller appears.
|
| 1718 |
+
hook::install_trap!("DisplayGfx__LoadSpriteEx", va::DISPLAY_GFX_LOAD_SPRITE_EX);
|
| 1719 |
}
|
| 1720 |
|
| 1721 |
Ok(())
|