diff --git a/CLAUDE.md b/CLAUDE.md index c58a89f..dd2b740 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -722,11 +722,18 @@ added: `tools/disas2.py ` (recover FPU math Ghidra drops — `FUN_004d `tools/vtdump.py ` (find a vtable override the assert-anchored decomp didn't export). **⚠ SYSTEMIC PATTERN (map): a newly-consumed reconstructed subsystem/gauge is often the FIRST reader of a stubbed helper — the map exposed 3 (Sensor radarPercent negative from un-normalized heatEnergy; `ResolveOperatorEntity`→NULL; unguarded NULL -entity), each fixed with the established viewpoint-fallback/guard patterns.** REMAINING: `PlayerStatus`, -`vehicleSubSystems` (task #13) + the map's contact classification (0 contacts — the spatial-query `Get* -EntitiesWithinBounds` + the stubbed pip/name/video-object infra) + `SetTargetRange` (radar zoom, 500m default) + the -aggregate HeatSink-bank `AmbientTemperature` (`#if 0`'d 0xBBE) + the Reservoir `coolantCapacity` shadow + the -Searchlight `LightOn` table (duck button already resolves via the 0x37 Mech entry). +entity), each fixed with the established viewpoint-fallback/guard patterns.** **⭐ MAP CONTACTS RENDER (2026-07):** +the radar plots the enemy contact inside the FOV wedge. Two more fixes: (1) the gauge renderer's entity grid was +NEVER populated (the port dropped `ExecuteImplementation`'s InterestingEntity feed) → added `GaugeRenderer:: +RebuildEntityGrid()` filling `movingEntities` from the world DynamicMaster+Replicant iterators (the vehicles; the +map draws a cross+box blip for cls-0xBB9 mechs, the pip table being stubbed); (2) the blip PROJECTION was wrong — +`worldToView` is a camera matrix whose baked scale is wrong for a point transform (120u contact → 167px not 44px) → +project `delta = entity − viewpoint` directly (rotate by −heading, scale by pixelsPerMeter). Diagnosed via +`BT_MAP_LOG` (the enemy reads dsq=14400 = exactly 120u; the earlier "377-828m" was the wrong scale × player drift, +not a distance error). REMAINING: `PlayerStatus`, `vehicleSubSystems` (task #13) + the authentic pip symbol/name/ +video-object infra (`GetVideoObject`/`LookUpPip`/`GetNameID`, stubbed → cross-blip stand-in) + `SetTargetRange` +(radar zoom, 1km default) + the aggregate HeatSink-bank `AmbientTemperature` (`#if 0`'d 0xBBE) + the Reservoir +`coolantCapacity` shadow + the Searchlight `LightOn` table (duck button already resolves via the 0x37 Mech entry). **Alternate route considered:** run original `btrel410.exe` under DOSBox — **blocked**: it needs the VPX/IG board DOSBox can't emulate; bypassing it = the shim work anyway. diff --git a/docs/GAUGE_COMPOSITE.md b/docs/GAUGE_COMPOSITE.md index 6ba7fea..9840222 100644 --- a/docs/GAUGE_COMPOSITE.md +++ b/docs/GAUGE_COMPOSITE.md @@ -417,10 +417,19 @@ fill the gaps (bind not-yet-needed ids to a shared read-only pad member). stubs the map was the first consumer of, each fixed: Sensor `radarPercent` went negative (un-normalized `heatEnergy` in the not-byte-exact heat-leaf → guarded to no-penalty); `ResolveOperatorEntity` returned NULL (→ viewpoint fallback); `MapName::ExtractFromEntity` didn't NULL-guard the entity. ⚠ Debug via - `BT_MAP_LOG` (phase/draw trace). FOLLOW-UPS: contacts show 0 (the `GetStaticEntitiesWithinBounds`/ - `GetMovingEntitiesWithinBounds` classification finds nothing — the enemy dummy isn't in the spatial - lists); the pip/name/video-object infrastructure (`GetVideoObject`/`LookUpPip`/`GetNameID`) is stubbed - so contacts/labels need it; radarRange is a 500m default until `SetTargetRange` is un-stubbed. + `BT_MAP_LOG` (phase/draw trace). **CONTACTS NOW RENDER** (2026-07): two more fixes landed the enemy + blip inside the FOV wedge. (a) The gauge renderer's entity grid was NEVER populated — the port dropped + `ExecuteImplementation`'s InterestingEntity feed; added `GaugeRenderer::RebuildEntityGrid()` (engine) + that fills `movingEntities` from the world's DynamicMaster+Replicant entities (the vehicles; AllEntity + floods it with ~311 cls-0x5E props), called from the map's guarded Execute; DrawMoving draws a cross+box + blip for cls-0xBB9 mechs (the pip table is stubbed). (b) The blip PROJECTION was wrong — `worldToView` + is a camera matrix whose baked scale is wrong for a point transform (a 120u contact projected to 167px + not 44px); fixed by projecting `delta = entity - viewpoint` directly (rotate by −heading, scale by + pixelsPerMeter). Verified: the 120u enemy (dsq=14400, cls 0xBB9, own=0) plots at (0,44) inside the + wedge. FOLLOW-UPS: the authentic pip symbol/name/video-object infrastructure + (`GetVideoObject`/`LookUpPip`/`GetNameID`, still stubbed → the cross-blip is the stand-in); the + blip-vs-wedge rotation convention (reads ahead/in-wedge, correct); `SetTargetRange` (radar zoom, 1km + default). ### Reconstruction-technique additions (durable) - **x87 float math Ghidra drops** (`FUN_004dcd94()`/`FUN_004dcd00()` show no args = FPU-stack operands):