Everything the battle screen draws around the fight: the actor-name plaque, the party status readout, the command chips, banners, status and element badges, the item and magic windows. Retail does not draw this per frame from game state. It keeps a list of retained text actors, rebuilds that list from disc data at every state transition, and frames each actor with sprites looked up in two static tables. Knowing those two tables is enough to derive every seat, plate and palette on the screen.
SCUS_942.54 0x80076C10, 24-byte records, 103 initialised; parser legaia_ui_formats::screen_elementsSCUS_942.54 0x800732A4, 12-byte records, 0x9D of them; parser legaia_ui_formats::ui_widgetsPTR_DAT_801F4D34): which records are up in which phaseFUN_801D8DE8(record, mode) (PROT 0898)FUN_8003541C; retained handle list ctx[+0x1074], forty handles(896, 256), palette row 511; text from the menu-glyph atlas at (896, 0), row 510engine-battle-hud, draw builder engine-ui::battle_hud; both hosts draw one shared surfaceRetail’s battle HUD is a list of retained text actors - ctx[+0x1074], forty handles - that the two battle state machines rebuild at every transition. Three pieces of disc data decide everything the list holds and how it looks.
The menu state machine runs one sub-draw step per state edge. The steps decide which of the four HUD surfaces is up - and because they are disc data, the table below is read straight off them and agrees, element for element, with the handle lists of the catalogued save states.
| Transition | Roster panels | Active-actor bar | Breadcrumb tab + plaque | AP plate |
|---|---|---|---|---|
| round prompt opens | up | - | - | - |
| command ring opens | park | up | both slide in | slides in |
| item / magic window | back up | park | snap | leaves |
| item / magic target step | park | up, pointed member | snap | - |
| attack-mode prompt (Auto / Command) | - | snap | snap | snap |
| target cursor cancelled back to the prompt | - | up | snap | slides in |
| attack target cursor | - | park | snap | leaves |
| arts entry | - | park (the AP bar takes the seat) | snap | snap |
| all members committed | - | - | tab only | leaves |
The roster panels belong to the round prompt and the browsed windows; the full-width bar to the ring, the attack-mode prompt and the target steps; the AP plate to the ring, the attack-mode prompt and the arts entry. The attack-mode prompt is the ring with its arms swapped: its step opens the Auto and Command chips on the left and right arm seats, sends the other three arms off and keeps everything else where it stands.
Parked is below the screen, not gone. When the bar takes over, retail moves the whole panel cluster to y = 230, just under the 228-line display window. The port’s stage is 240 lines tall, so it simply emits no panel draws while retail parks them. Inside an action the panels come back for a party-wide target, and a cast module can raise them itself - Orb’s heal glides them up so its HP readout counts up in them.
Terra’s numbers are question marks. The readout spawner FUN_801D8DE8 tests each member’s present-party id, and for id 4 - Terra, Noa’s Ra-Seru, fighting beside her - it registers the HP and MP number records as a different type. The per-frame draw renders that type as one ? cell per digit and never reads the value: ??? / ??? for HP, ?? / ?? for MP, on the panel and on the bar alike. Her panel also has no level or status cell, because its frame style (her id plus 0x32) is not one of the three the status element is drawn for. Retail never levels her either: the level-up applier returns at once for her record, so she stays at the template’s 400 HP and 200 MP.
The HP readout counts down a quarter a pass. The number on the bar is the displayed HP +0x172, not the live +0x14C. The head of each actor’s node tick FUN_80047430 moves a quarter of the outstanding damage +0x10 onto it, once per main-loop pass and with no frame-step scaling, so a slow fight running a pass every three vsyncs counts a hit down three times as slowly as a step-1 one. The port runs the ramp with the anim pass on retail’s cadence; a per-vsync ramp had Blade Breath’s readout landing on the final value while retail’s was still rolling.
The combo cluster - the 3 HIT / TOTAL 29 pair beside the damage numerals - is not opened by each hit. A melee string banks its hits: each swing’s damage is added to a word on the target and its numeral pops, but live HP is untouched. One arm of the melee kernel then writes the whole bank to HP, and that arm is the kernel’s only store to the readout flag. The readout pass, which runs at the top of every action-machine pass, answers the raised flag by spawning the cluster at its off-screen seat and gliding it in. So the cluster appears once, as the string’s total lands, already reading the full count.
Two library states pin both sides. A Somersault capture shows the cluster gliding in beside the third hit’s 15, twelve frames into its sixteen. A Muscle Dome capture holds three swings’ 430 in the Skeleton’s bank at full HP, the total word at zero and no cluster up as the Hyper Art commits. The port counts a melee hit hidden and opens (or restarts) the cluster on the hit event that applies the bank; a cast hit opens it as it lands.
The action seed lists every living monster in a row table when the target is the every-enemy code 9 and no lone survivor replaced it, and always for spells 0x82, 0x86 and 0x8D. The finisher then adds each hit to its target’s halfword in a value window with the combo flag left down, so the flag pass finds no cluster to open. It opens a pair of records per row instead: the row’s name plate rising from y = 236 to 194, and its value record gliding in at the same x. One row rests at x = 244, four at 16 / 92 / 168 / 244, and the DAMAGE word draws once, over the last row. A hit that keeps the flag down counts without opening: spell 0x8D holds its running total in the window from arm 8 on and shows the rows only at arm 0xD.
A party-wide cast on a lone survivor is the other side of the same seed: the HUD reads the target code before the cast begins, ahead of the rewrite to the survivor’s slot, so the panels stay up through the whole action.
Row walk 0x801E8128.., digits FUN_801E805C, value window 0x801F6980, seed FUN_801E6D84. Port: BattleHud::multi_readout, battle_value_readout::multi_row_cluster.
Each record is one element's pair of seats plus a shared content box. The two seats are the element's from and to: which one is the parked seat is per record, so some elements slide in from the right and others from the left or the top.
Mode bit 0 picks the spawn seat (A for 0, B for 1) and the glide runs to the other; bit 1 suppresses the glide.
(x, y - 2). Both seat arms subtract two from the seat's y before spawning the text actor.+0x14 is the string being drawn. Name banners measure their string, write the width into +0x06 and centre both seats on it - which is how the move name stays centred on the screen whatever its length.FUN_8004AD80, 0x8004BB5C..0x8004BC40) places and opens the move name. An art staged behind its starter waits out the starter’s clip with no name on screen, so a Hyper Art’s name appears as the art itself begins.Three small routines copy geometry and content between records - never the id, the box height or the frame - which is how one row can borrow another's content:
| Routine | Role |
|---|---|
FUN_801D5718 | lands an element: both seats become the source's seat B, so nothing is left to glide |
FUN_801D57E8 | adopts a source's whole geometry into a row that keeps its identity |
FUN_801D5778 | launches it: seat B becomes the source's seat B minus 0x140 - one display width, so it glides a screen to the left |
The commit log uses all three: each committed member's name, command and target are landed into a row of three records, and earlier rows are launched off as the party commits.
Every sprite the chrome draws comes out of one array. A placement record's frame-style bytes are indices into it: style 0x01 is the blue plate body, style 0x02 the carved-gold one. The join holds for all 103 placement records.
FUN_8002C488 draws exactly one sprite at the caller's position and never applies the bias; FUN_8002C69C draws a sized widget, applies the bias, then follows the chain. The bias converts the glyph pen to the frame origin - the plate run's (-8, -4) takes the plaque's pen (16, 12) to a plate at (8, 8).The table's end is structural: it runs exactly up to the frame tile-set pool the class arms read next.
0x28: retail films of Bloody Horns and Scythe Wind hold no name on the seed’s frame and the name on the next.- otherwise. An unavailable command still gets its chip; a forbidden one wears a red cross-out mark instead.(8, 4), 296 wide and 28 tall, with a fixed 280-pixel content box - it is not measured from the message. The frame is filled: under the border sprites the frame emitter FUN_8002BDC4 tiles a blue-marbled 32×32 patch in columns, with a top-to-bottom grey ramp. It shares its seat with the actor-name plaque; the two are alternatives, not layers.0x5B) carries the steal captions and the petrify result line on the active-actor bar’s seat. It has the bar’s content box but the banner’s frame style, so it is a framed window rather than a plate run. Nighto's and Aluru's result lines rise on it too, composed at run time from the victim's name and the module's own string.FUN_801D9D3C lays them out itself with immediate geometry: one label per run of identical monsters (the second member turns the name into name * 2, each further one bumps the digit), centred over the group’s average battle X, then relaxed apart pair by pair and clamped to the screen until a pass moves nothing. They spawn at their final seat - no slide - and retail sweeps them on the pass the intro timer expires, so no action ever runs under the names. The port does not hold the round prompt back for that span, and sweeps the labels when it hands a round to the action SM early.State 0x3C opens a list window on the right and a description window below-left, both drawn from the system-UI window skin, with a pointing-hand cursor on a 14-pixel row pitch, eight rows a page and a PAGE n/m header. The breadcrumb trail replaces the actor plaque while it is up.
0x46) is the same frame with spell content: a leading element icon per row, a two-line description (name, then scope), and two gold tabs top right for the highlighted spell’s level and MP cost.Both are composed by engine-ui::battle_item_ui through the shared menu-window chrome and drawn by both hosts. The rows, the hand and the description line sit on the pens the list kernel and the placement table give them, in the menu font’s ink 7 (ink 0 for a disabled row); the breadcrumb tabs are the HUD’s own trail, not the window’s, and the magic rows draw each spell’s element or Ra-Seru icon through the same font escape the pause Magic list uses. At target select the pointed member’s name tag is the target-select plaque. That plaque prints the target’s own name buffer, so a monster whose name carries the element escape shows its element badge there as it does on the bottom-right target plaque, and each cursor move slides the new name in from the right while the old one slides out to x = 328, both over sixteen frames. Still not drawn: the camera’s re-frame onto the target and the magic target step’s All plate.
NEW ARTS!!, HYPER ARTS!!, MIRACLE ARTS!! and SUPER ARTS!! are one banner: two textured quads from the value-readout glyph sheet - a position-selected first word and the shared ARTS!! - whose halves march toward a seam as a slide clock runs. Each live frame draws it four times at four points of its own travel, at 5 / 10 / 20 / 50 percent brightness, so the word arrives trailing ghosts that switch off as it lands.
Stage byte ctx[+0x28B] | Banner | Raised when | |
|---|---|---|---|
1 | NEW | the queue builder | the queue builder marks a newly learned art | rsquo;s build loop leaves its mark in the side array
2 | HYPER | the default: the byte is still zero after the other two writes | |
3 | MIRACLE | the queue builder raised the seat’s Miracle flag | |
4 | SUPER | the Super tail-replace leaves its mark in the side array | |
5..=8 | none | a commit on the running actor retires a live banner |
The raises sit in the executable’s anim commit FUN_8004AD80 and fire only for a party actor committing the SpecialStarter clip. The three writes run in sequence and the later one wins - they are not an if / else chain. Each raise restarts the slide and queues the character’s Arts fanfare. Port: engine-battle-vm::battle_action::flash_ramp, stepped once per battle frame and drawn by both hosts.
engine-battle-hud is the renderer-agnostic model: per-slot HP / MP / AP and status, damage popups and log lines, fed by the world’s strike, status and round events. engine-ui::battle_hud::battle_hud_draws_for turns one frame of it into two draw lists - glyphs off the dialog-font atlas and sprites off the resident system-UI sheet - which both hosts composite in the slot they already use for menu chrome.
+0x172, MP through +0x174), through the ports of retail’s readout-tint laws; a cast’s MP counts down rather than dropping at once, and a dead member’s row dims.LEGAIA_DIAG_HUD; it is off on both hosts, and retail draws none of it.The full write-up - each plate's packet-pinned derivation, the opening glides, the badge sheet and per-badge palettes, the commit log, the record-41/42 shift and every capture behind them - is in docs/subsystems/battle-hud.md.