From 8814df843bff33c75303506d3ea654184dda3d6b Mon Sep 17 00:00:00 2001 From: "Claude (auto-RE)" Date: Tue, 11 Aug 2026 21:50:13 +0000 Subject: [PATCH] re: the RATC declaration table IS the screen's draw list, and +32 is a parent index The doc's open gap was "where does the screen's draw list live" -- the eff/deli/msg sprites have no .rat and loop1.rat turned out to be an animation. It is the bundle's own declaration table, which is NOT the child listing: children are grouped by type (all .t32, then all .rat) while the declaration table names ELEMENTS in a plausible back-to-front order and contains exactly the missing set. For the in-mission pause menu it lists 23 elements ending with loop1.rat, and it omits the focused button variants -- those are reached via each base record's "opt " link -- so it is the screen's element set, not an inventory. Also corrects the entry layout: it is FIVE words after the name, not "u32 x4 flags", and word +32 is a PARENT ELEMENT INDEX (0xffffffff = none). pgpeff02a carries 3 and element 3 is pgpeff02; pgpeff03a carries 5 and element 5 is pgpeff03. Verified on two independent language builds, no out-of-range value in any bundle, and the tutorial bundle (no "a" variants) is 0xffffffff throughout. Bounded honestly: what is drawn and in what order is now answered; WHERE the eff/deli/msg sprites land is not -- the declaration entry has a pivot but no X/Y. Co-Authored-By: Claude Opus 5 (1M context) --- docs/re/structures/ui-rat-layout.md | 34 ++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/docs/re/structures/ui-rat-layout.md b/docs/re/structures/ui-rat-layout.md index a089dbe..f1f8c7a 100644 --- a/docs/re/structures/ui-rat-layout.md +++ b/docs/re/structures/ui-rat-layout.md @@ -34,12 +34,27 @@ the elements themselves follow as children: 0x14 u32 entry count 0x20 entry[count], 60 bytes each: +0 char[28] element name, NUL-padded ("pgp_ttrl_eff10.t32", "pgp_ttrl_btn10.rat") - +28 u32 ×4 flags (0xffffffff / 0xffffffff / 0 / 0xffffffff on every entry seen) + +28 u32 0 on every entry seen + +32 u32 PARENT element index, or 0xffffffff for "none" ← see below + +36 u32 0xffffffff on every entry seen + +40 u32 kind flags 0 for a plain sprite, 0x3002 for a button record, + 1 for an element that has a parent + +44 u32 0xffffffff, but 0 on button records +48 u32 pivot X +52 u32 pivot Y +56 u32 0 ``` +**Corrected 2026-08-11:** this was previously written as "`+28` u32 ×4 flags" — it +is **five** words, and the second of them is not a flag. + +**`+32` is a parent element index.** In the in-mission pause bundle, +`pgpeff02a.t32` carries `3` and element 3 is `pgpeff02.t32`; `pgpeff03a.t32` +carries `5` and element 5 is `pgpeff03.t32` — each `…a` variant naming its base +element. Verified on two independent language builds of that screen (4 links, no +out-of-range value anywhere in any bundle), and the tutorial bundle, which has no +`…a` variants, carries `0xffffffff` throughout. + The table lists **both** sprites and `.rat` records — it is the screen's element list. `pgp_ttrl` declares 11: six `eff*`, `msg`, and four `.rat`s (`title`, `btn10..12`). @@ -171,10 +186,19 @@ recording them because a static-only reading would have shipped them: ## Next -- **The `eff*` / `deli*` / `msg` placements are still missing** — those sprites have no - `.rat` of their own, and `loop1.rat` turned out to be an animation, not a composition. - So the screen's draw list lives somewhere not yet found (the parent RATC's own header - region, or title code). That is the gap between the rebuild above and a complete screen. +- **Half of this gap is now closed.** The `eff*` / `deli*` / `msg` sprites have no + `.rat` of their own, and `loop1.rat` is an animation, so the question was where the + screen's draw list lives. **It is the bundle's own declaration table** (above): that + table is not the child listing — the children are grouped by type (every `.t32`, then + every `.rat`), while the declaration table names *elements*, in a plausible back-to-front + order, and it is exactly the missing set that appears there. For the in-mission pause + menu it lists 23: `eff11/12/10`, `eff02(+a)`, `eff03(+a)`, `eff01`, `title.rat`, + `btn00/01/04/05.rat`, `msg`, `deli1…4`, `eff30…33`, `loop1.rat`. Note what it does + **not** list: the focused button variants, which are reached through each base record's + `opt ` link — so the table is the screen's element set, not a resource inventory. +- **What is still missing is only the position** for the elements that have no `.rat`: + the declaration entry carries a pivot but no X/Y. So *what* is drawn and *in what order* + is answered; *where* the `eff*` / `deli*` / `msg` sprites land is not. - The same method should now unroll the other screens directly; `GP_HANGAR_ARSENAL.pak` (789 T8aD + 510 RATC) is the big one, and the ARSENAL `DATA SHEET` panel documented in [weapon-datasheet-runtime.md](../weapon-datasheet-runtime.md) is a ready-made oracle for it.