HUD status icons and clock (executable)

Completes “How a status shows” (status run) and the Battle HUD section. Sprite numbers are BtMenu table indices.

Status icon row 0x140157860(hud, player, x, y), called twice from the status panel 0x140155310 (0x140157276, 0x140157806):

Clock (0x140154cc9; needs bit 0x20 of the menu flag word +0x58): back plate quads, the icon (sprite 87) and the time as text at (x + 0x12, 0x1ac) in 0xfff54322, through the printf-and-draw helper 0x140126dd0. Seconds = clock / 30 (0 outside phase 6), minutes = seconds / 60, both truncated. Last minute: while minutes = 0 and seconds > 0 the colour is blended (0x140153640) from black toward 0xfff54322 by a = 255 − c for c < 176, else c − 96, where c is the HUD’s counter at +0xc44 (its step was not traced): the clock pulses.

Colour blend 0x140153640(from, to, a): a = 0 → from, 255 → to, else per channel (from · (255 − a) + to · a) >> 8, alpha forced to 255. Used by the aura-state colours, the clock and the slot colours.

Confidence: icon row H for the code path (tables read from the file), M for which of a pair means raised; clock M (pulse counter not traced).

Not decoded: the status panel 0x140155310 beyond what “Battle HUD” lists (9.5 KB; other players’ rows, the health drain animation, where it calls the icon row from); the slot flash frames 91–118; damage numbers (no number sprite draw was found in the HUD class: lead only); the +0xc44 counter. (The lock marker’s rule is decoded: “Lock-on marker”, docs 11-15.)

Implementation notes for the rebuild

  1. pd_hud.gd: draw the icon row from the two tables exactly (25 px pitch, tint 0xff854322, the once-a-second swap between icon and signed number on plate 39, divide by 10 outside ±9, the five-per-row wrap for other players).
  2. Clock: truncate (not round up) the seconds; pulse in the last minute with the blend above (the counter’s speed is a placeholder until traced).
  3. Use one blend(from, to, a) helper with the >> 8 rule for all HUD colour animation.