diff --git a/context/gauges-hud.md b/context/gauges-hud.md index 19743b2..a8987b8 100644 --- a/context/gauges-hud.md +++ b/context/gauges-hud.md @@ -195,11 +195,17 @@ Energy weapons (`EnergyWeaponCluster`, no ammo count) use the base only — unaf ## TEMP/STATUS bar (HorizTwoPartBar) tiles a striped pattern from x=0 (2026-07-21) [T1 decomp + render-verified] The per-weapon TEMP/STATUS bar is a `HorizTwoPartBar` (@004c4170, Execute @004c4340). It renders **three zones along X** from the interned `tileImage` + two colours (`fillColor`, `backgroundColor`): -- `[0, warnPix)` — `DrawTiledBitmap(tileImage)` (@004c2ff8): the striped/dotted TILE pattern. The - `color` arg is ignored — the tile is blitted with its own pixels (vtbl+0x58) tiled across the zone. -- `[warnPix, valPix)` — `backgroundColor` solid (only when `value > low`; binary keeps the current - colour, still `backgroundColor` from zone 1 — no SetColor). -- `[valPix, width)` — `fillColor` solid. +- `[0, warnPix)` — `SetColor(fillColor)` + `DrawTiledBitmap(tileImage)` (@004c2ff8): the striped/ + dotted TILE pattern (green dots). The `DrawTiledBitmap` `color` arg is ignored — the tile is + blitted with its own pixels (vtbl+0x58) under the SetColor(fillColor) foreground. +- `[warnPix, valPix)` — `fillColor` solid (the green over-degrade fill; only when `value > low`; + binary keeps the current colour, still `fillColor` from zone 1 — no SetColor). +- `[valPix, width)` — `backgroundColor` solid: the unfilled remainder (BLACK). +**COLOUR MAP (critical):** the two colour params land at `[this+0xA0]=fillColor` (0xff green) and +`[this+0xA4]=backgroundColor` (0 black) — caller @004c8269 pushes `0xff` then `0`. Green is the tile ++ over-degrade fill; black is only the remainder. The port first shipped these SWAPPED (zone 3 = +fillColor) so the whole `[valPix,width]` remainder — most of the bar when cold (valPix small) — +rendered solid green instead of black. Fixed 2026-07-21 (commit 4fbc911). `warnPix = round(width*low/high)`, `valPix = round(width*value/high)` (value=CurrentTemperature, low=DegradationTemperature, high=FailureTemperature). **Port bug (fixed):** the Execute had been rewritten with `DrawFilledRectangle` starting at `warnPix` and NEVER used `tileImage` — so the bar