re: the screen parse generalises to the ARSENAL, plus kind 0x4 and the component model
examples/screen_layout.rs dumps a bundle's declaration table and placement region together. It reproduces the tutorial pause menu exactly and reads the ARSENAL the same way -- 23 elements that match the running game: eight buttons prbtn1..8.rat at X=242 evenly spaced (the config declares WEAPON_CATEGORIES = 8, and eight categories are what the Arsenal shows), prexp3.t32 declared SEVEN times at X=726 34px apart (the DATA SHEET rows), prexp1 sliding (726,143)->(1286,143) with prexp1a parented to it, and prmsg at (151,645). Two additions to the format: kind = 0x4 marks a REPEATED INSTANCE of a sprite -- prexp3.t32 appears once with 0x0 then six times with 0x4, each with its own placement. So the element name is not a key; the declaration index is. A screen composes from named .prt components. GP_HANGAR_ARSENAL.pak has 510 RATC entries because its config names components (Menu = prmain_scr.prt, etc.) and they resolve under the config's own PATH prefix: prmain_scr.prt is absent, eng\prmain_scr.prt is present -- the same <lang>+<member> convention the movie table uses. A sub-component reads identically: psselect_win1 declares 4 elements, three parented to element 0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -227,3 +227,37 @@ recording them because a static-only reading would have shipped them:
|
||||
[weapon-datasheet-runtime.md](../weapon-datasheet-runtime.md) is a ready-made oracle for it.
|
||||
- Tooling: `crates/sylpheed-formats/examples/ui_screen.rs` (inventory a screen pak, carve a
|
||||
named RATC child), `sylpheed-cli pak textures` (decode every sprite).
|
||||
|
||||
## It generalises: the ARSENAL screen, and how a multi-component screen composes
|
||||
|
||||
**2026-08-11.** [`examples/screen_layout.rs`](../../../crates/sylpheed-formats/examples/screen_layout.rs)
|
||||
dumps a bundle's declaration table and placement region together. It reproduces
|
||||
the tutorial pause menu exactly, and it reads the ARSENAL the same way
|
||||
([capture](../captures/arsenal-main-screen-layout.txt)) — 23 elements that match
|
||||
the running game:
|
||||
|
||||
- **Eight buttons** `prbtn1…8.rat` at **X=242**, Y `166, 220, 276, 331, 385, 441,
|
||||
496, 551` — evenly spaced, and eight is exactly what the screen's own config
|
||||
declares with `WEAPON_CATEGORIES = 8` (GUN, BEAM, LASER, MPM, ASM, B/R, CANNON,
|
||||
SPECIAL, the list photographed in the Arsenal).
|
||||
- **`prexp3.t32` declared seven times** at X=726, 34 px apart (`381 … 585`) — the
|
||||
DATA SHEET's rows.
|
||||
- `prexp1.t32` animates `(726,143) → (1286,143)`, sliding off the right edge, with
|
||||
`prexp1a.t32` **parented to it** (`parent = 13`).
|
||||
- `prmsg.t32` at (151,645) — the description line along the bottom.
|
||||
|
||||
### Two things this adds
|
||||
|
||||
- **`kind = 0x4` marks a repeated instance.** `prexp3.t32` appears once with
|
||||
`kind 0x0` and then six more times with `0x4`, each with its own placement — the
|
||||
game repeats one row template rather than shipping seven sprites. So the element
|
||||
*name* is not a key; the declaration index is.
|
||||
- **A screen is composed of named components.** The pause menu is one bundle, but
|
||||
`GP_HANGAR_ARSENAL.pak` holds **510** RATC entries because its screens are built
|
||||
from the `.prt` components its config names (`Menu = prmain_scr.prt`,
|
||||
`Select_Window = prselect_scr.prt`, `Detail_Window_Known = prselect_win3.prt`, …).
|
||||
Those resolve **under the config's own `PATH` prefix**: `prmain_scr.prt` is not
|
||||
present, `eng\prmain_scr.prt` is — the same `<lang>+<member>` convention the
|
||||
[movie table](../movie-subtitle-link.md) uses. A sub-component reads identically:
|
||||
`psselect_win1` declares 4 elements, three of them **parented to element 0**,
|
||||
which is the parent-index field doing real work on an independent pak.
|
||||
|
||||
Reference in New Issue
Block a user