A snapshot of the non-game files as of0148cb8("port: F5/F6 hand-off -- one-minute human checks, and a refutation attempt that survived", 2026-09-04), the tip of auto/port-p6-audio. The branch was deleted from the server on 2026-09-17 during the consolidation cleanup; issue #7 asks for this work as a reviewable PR, so it is recovered here before the commits are garbage collected. Contents: the 84 files the branch changed relative to its fork pointb305aa4, which is this commit's parent. The tree is therefore 0148cb8's tree with the 854 exported game assets left out -- export-probe/, export-probe2/, three .wav renders of game audio and adv-v2-screenlog.tsv. Game data stays out of git; the exporter regenerates those from the disc. docs/port/DECISIONS.md still refers to them by name. Not recovered: the branch's own 366 commits. Keeping them would make those assets reachable again, so this is one snapshot instead. The original commits stay unreferenced in the server's object store, and in this clone under the local branch archive/port-p6-audio, until either is garbage collected. Refs #7. The OPTIONS work that issue #6 asks for is a subset of this branch, also recovered as recover/options-menu. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
50 lines
2.5 KiB
Rust
50 lines
2.5 KiB
Rust
//! Probe: does a `.rat` leaf record carry geometry the parent element does not?
|
||
//!
|
||
//! The GPU capture says the title submits `ptloop01`/`ptloop02` scaled 600 %/800 %
|
||
//! and rotated +30.26°/−45.28°, while the export writes scale 100 % and rotation
|
||
//! 0 for both. `ui_layout`'s own note says the rotated quads come from the
|
||
//! **nested `.rat` leaf records**, which is where `export_screen` already looks
|
||
//! for focus records and nowhere else.
|
||
use sylpheed_formats::{pak::PakArchive, ui_layout};
|
||
|
||
fn main() {
|
||
let disc = std::env::var("SYLPHEED_DISC").unwrap_or_else(|_| "/disc".into());
|
||
let ar = PakArchive::open(format!("{disc}/dat/GP_TITLE.pak")).expect("open");
|
||
let e = &ar.entries()[4]; // entry 4 = the English title
|
||
let bundle = ar.read(e).expect("read");
|
||
let b = ui_layout::parse_build(&bundle).expect("parse");
|
||
println!("build has {} elements, {} records", b.elements.len(), b.records.len());
|
||
let mut names: Vec<&String> = b.records.keys().collect();
|
||
names.sort();
|
||
println!("records: {names:?}");
|
||
for el in &b.elements {
|
||
if !el.name.starts_with("ptloop") { continue; }
|
||
let r = el.rest();
|
||
println!("\nPARENT {} sprite={:?} -> rest scale {:?} rot {:?}", el.name, el.sprite,
|
||
r.map(|r| (r.scale_x, r.scale_y)), r.map(|r| r.rotation_deg));
|
||
if let Some(&(off, size)) = b.records.get(&el.name) {
|
||
match ui_layout::parse_build(&bundle[off..off + size]) {
|
||
Some(leaf) => {
|
||
println!(" LEAF {} parses: {} element(s)", el.name, leaf.elements.len());
|
||
for le in &leaf.elements {
|
||
let lr = le.rest();
|
||
println!(" {:<20} rest scale {:?} rot {:?} pos {:?}",
|
||
le.name,
|
||
lr.map(|r| (r.scale_x, r.scale_y)),
|
||
lr.map(|r| r.rotation_deg),
|
||
lr.map(|r| (r.x, r.y)));
|
||
for k in &le.keyframes {
|
||
println!(" t={:?} scale=({},{}) rot={} pos=({},{}) fade={:#010x} u4={} u8={}",
|
||
k.time, k.scale_x, k.scale_y, k.rotation_deg, k.x, k.y,
|
||
k.fade, k.unknown_4, k.unknown_8);
|
||
}
|
||
}
|
||
}
|
||
None => println!(" LEAF {} does NOT parse as a build", el.name),
|
||
}
|
||
} else {
|
||
println!(" no record named {}", el.name);
|
||
}
|
||
}
|
||
}
|