KB: document the ammo-count-stencils-out-of-dot fix
context/gauges-hud.md: new section on BallisticWeaponCluster::DrawWarningLamp
(@004c9b50) swapping the ammo NumericDisplayInteger colours by the fire-ready
dot state (green-on-black when absent, black-cut-out when present), and the
port bug where only the non-virtual base existed. Commit 66dcdf2.
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
66dcdf23db
commit
cfc7b27ba3
@@ -174,6 +174,24 @@ Diagnostics retained (env `BT_LOOP_LOG`): `[loopfeed]` (BTCoolingLoopFrame) + `[
|
||||
**HUMAN-VERIFIED live 2026-07-21** (pod build, solo ARENA1 cockpit): the loop number + generator
|
||||
letter boxes render correctly on the weapon panels.
|
||||
|
||||
## Ballistic ammo count stencils out of the fire-ready dot (2026-07-21) [T1 decomp + render-verified]
|
||||
The base-page missile/round count (`ammoCountA`, `NumericDisplayInteger @0x114/this[0x45]`) sits on
|
||||
the weapon's fire-ready "dot" — the cluster image (`clusterImage @0xCC/this[0x33]`) blitted by
|
||||
`WeaponCluster::DrawWarningLamp` (@004c932c) in on-colour `0xff` (solid green) / off-colour `0`
|
||||
(black/absent), toggled by `warningState` when `percentDone` crosses the warn threshold. The count
|
||||
must stay legible against it, so **`BallisticWeaponCluster` overrides `DrawWarningLamp` (@004c9b50)**:
|
||||
it chains the base (draws the dot) then swaps the numeric's colours via `NumericDisplayInteger::
|
||||
SetColors(bg,fg)` (@00470ec8 → inner NumericDisplay @0x90):
|
||||
- dot ABSENT (`on==0`) → `SetColors(0, 0xff)` == green digits on black
|
||||
- dot PRESENT (`on!=0`) → `SetColors(0xff, 0)` == BLACK digits **cut out** of the solid green dot
|
||||
(the same black-on-green stencil as the loop/generator squares). `SetColors` `ForceUpdate()`s the
|
||||
numeric so it repaints over the freshly drawn dot on the next child-execute pass. The engine's
|
||||
`NumericDisplay::Draw` blit is `SetColor(fg)` + `DrawBitMapOpaque(bg,…)` — glyph=fg, surround=bg
|
||||
(opaque), so only the colour swap (not transparency) makes the cut-out. **Port bug (fixed):** only
|
||||
the base non-virtual `DrawWarningLamp` existed, so the count stayed green-on-black and clashed as a
|
||||
dark box in the green dot. Fix: made `DrawWarningLamp` virtual + added the ballistic override.
|
||||
Energy weapons (`EnergyWeaponCluster`, no ammo count) use the base only — unaffected.
|
||||
|
||||
## The secondary screen's THREE views (Damage / Critical / Heat) — mode-gated [T0/T1/T2]
|
||||
The `sec` port stacks three mode-gated mech-schematic layers at offset (50,0) over the
|
||||
always-on radar/heading/speed/messageBoard (`Secondary1`): **Damage** (`ModeSecondaryDamage`,
|
||||
|
||||
Reference in New Issue
Block a user