From 5a4ee55e4eb8097dd7308e0846c4891f92fd221c Mon Sep 17 00:00:00 2001 From: Joe DiPrima Date: Mon, 3 Aug 2026 23:56:53 -0500 Subject: [PATCH] #118: the eject slot graphic returns -- vtbl+0x58 is DrawBitMapOpaque [T0] The proper RE the corruption arc demanded: counting GRAPH2D.h's declared virtual order, GraphicsView vtbl+0x18 = SetColor and +0x24 = MoveToAbsolute land exactly -- and +0x58 is NOT DrawBitMap (+0x54) but the NEXT virtual, DrawBitMapOpaque(background, rotation, bmp, sx1, sy1, sx2, sy2). The wipe is a two-span OPAQUE draw with INVERTED fg/bg pairs -- the literal "inverse wipe" -- and FUN_004c5fb8 transcribes byte-exactly with the real signature (the ++level between spans is inclusive-bounds bookkeeping, no gap). The base ctor fields were already right (colors +0x94/+0x98, bitmap Size.x/y at +0x9C/+0xA0, decomp @004c5e84). BallisticWeaponCluster::ejectWipe re-wired (bteejtm.pcc <- PercentOfEject). Stress-verified: 4 gens dead + autofire jams + leak warning, weapon pages pristine end to end. Co-Authored-By: Claude Fable 5 --- game/reconstructed/btl4gau2.cpp | 13 +++++++------ game/reconstructed/btl4gaug.cpp | 27 +++++++++++++++++---------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/game/reconstructed/btl4gau2.cpp b/game/reconstructed/btl4gau2.cpp index 6b12551..c0f0cff 100644 --- a/game/reconstructed/btl4gau2.cpp +++ b/game/reconstructed/btl4gau2.cpp @@ -2021,12 +2021,13 @@ BallisticWeaponCluster::BallisticWeaponCluster( engPort, 0xc2, 0x85, "edestryd.pcc", 0, 0xff, (int *)&failedState, "TwoState"); // the destroyed X: bright when FAILED // ejectWipe (BitMapInverseWipeScalar @004c61c8): the round-EJECT progress - // sweep -- bteejtm.pcc revealed column-by-column as the weapon's - // PercentOfEject (@0x3F8) runs 0..1. Binary call (part_014.c:2312): - // FUN_004c61c8(., rate, eng_mode, renderer, ownerID, engPort, 0xF, 0, - // "bteejtm.pcc", 0, 0xFF, weapon+0x3f8, name). Reconstructed 2026-08-03 - // (#118 field report: the eject slot flashed EMPTY -- this was the - // tracked-NULL stub). + // sweep -- bteejtm.pcc as the weapon's PercentOfEject (@0x3F8) runs 0..1. + // Binary call (part_014.c:2312): FUN_004c61c8(., rate, eng_mode, + // renderer, ownerID, engPort, 0xF, 0, "bteejtm.pcc", 0, 0xFF, + // weapon+0x3f8, name). RE-WIRED 2026-08-03 after the draw op was + // properly settled: vtbl+0x58 = DrawBitMapOpaque, NOT DrawBitMap -- the + // mis-guess was the striped-MFD corruption (gotcha #27; the wipe's + // Execute in btl4gaug now carries the byte-exact two-span transcription). { extern Scalar *BTWeaponPercentOfEjectPtr(void *weapon); Scalar *ejectPct = BTWeaponPercentOfEjectPtr(subsystem_in); diff --git a/game/reconstructed/btl4gaug.cpp b/game/reconstructed/btl4gaug.cpp index 0c424eb..1e2314f 100644 --- a/game/reconstructed/btl4gaug.cpp +++ b/game/reconstructed/btl4gaug.cpp @@ -2210,8 +2210,21 @@ void BitMapInverseWipeScalar::BecameActive() // @004c5fa4 // // @004c5fb8 -- Execute. level = round(value x width) clamped to [0, width] // (the x87 form Ghidra drops -- fild width / fmul value, gotcha #19), and on -// a change draw the two column spans with INVERTED colour pairs: [0..level] -// fg colorA over bg colorB, [level+1..width] fg colorB over bg colorA. +// a change draw the two source-column spans OPAQUE with INVERTED colour +// pairs -- the literal "inverse wipe". +// +// SETTLED 2026-08-03 (the MFD-corruption arc): the binary's draw call is +// vtbl+0x58 = GraphicsView::DrawBitMapOpaque(background, rotation, bitmap, +// sx1, sy1, sx2, sy2) [T0 GRAPH2D.h slot 22 -- the NEXT virtual after +// DrawBitMap at +0x54; verified by counting the declaration order: +// +0x18 SetColor, +0x24 MoveToAbsolute both land exactly]. The earlier +// reconstruction guessed DrawBitMap and fed it a colour as "rotation" -- +// the striped-garbage smear the operator captured. Byte-exact spans: +// level != 0: MoveTo(0,0); SetColor(colorA); +// DrawBitMapOpaque(colorB, 0, bmp, 0, 0, level, height); +// ++level; // inclusive-bounds step +// level < w: MoveTo(level,0); SetColor(colorB); +// DrawBitMapOpaque(colorA, 0, bmp, level, 0, width, height); // void BitMapInverseWipeScalar::Execute() { @@ -2228,24 +2241,18 @@ void BitMapInverseWipeScalar::Execute() if (bmp != NULL) { int split = level; - // DrawBitMap's first argument is ALWAYS 0 in the sibling wipe's - // Execute (btl4gaug LeakGauge) -- passing a colour there smeared - // the whole gauge surface (field-caught: striped garbage across - // the weapon MFD pages, git/capture.png 2026-08-03). Colour - // selection is SetColor only; the two spans carry the inverted - // pair via SetColor alone. if (split != 0) { localView.MoveToAbsolute(0, 0); localView.SetColor(colorA); - localView.DrawBitMap(0, bmp, 0, 0, split, height); + localView.DrawBitMapOpaque(colorB, 0, bmp, 0, 0, split, height); ++split; // the binary's iVar2++ } if (split < width) { localView.MoveToAbsolute(split, 0); localView.SetColor(colorB); - localView.DrawBitMap(0, bmp, split, 0, width, height); + localView.DrawBitMapOpaque(colorA, 0, bmp, split, 0, width, height); } warehouse->bitMapBin.Release(imageName); }