KB: correct the HorizTwoPartBar colour map (green tile, black remainder)
context/gauges-hud.md: record [this+0xA0]=fillColor(green)/[this+0xA4]=
backgroundColor(black), the zone colours, and the swapped-colour bug that
rendered the remainder green. Commit 4fbc911.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
4fbc911f55
commit
77cc62886f
+11
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user