Takes the port branch up to77320d5e-- the state the human play-tested on 2026-09-02 -- for SOURCE paths only. Not a branch merge: `auto/port-p6-audio` is 366 commits and 938 files, and most of that must not land. WHAT COMES IN (76 files, all human-confirmed working): * the logo splash animation.08ed3dd1found it: `pose_at` ASSIGNED the settle instant instead of clamping to it, so the splash never animated at all -- and the same bug manufactured a passing harness result, because the harness photographed t past the settle. Confirmed by play-test: "cannot notice any obvious difference from the actual game." * gamepad input -- (A)/(B) bound additively (`ui_accept` ships with NO joypad binding), stick latched with hysteresis at the game's own 61% digitise threshold. This is what made (A), video-skip and Extras work at all. * menu navigation and flow, menu audio, the exporter, the authored declarations, and 23 verification tools under tools/port/. WHAT IS DELIBERATELY LEFT ON THE BRANCH: * everything afterc0ae460a-- the F5/F6 title-timing investigation, whose own tip commit calls itself a "hand-off for one-minute human checks". Unchecked by definition; it goes through the new review gate like anything else. * the OPTIONS menu work of 2026-09-03. Real, probably good, NOT play-tested. * the F1 repeat mechanism, which its own commit calls "deliberately inert". WHAT MUST NOT LAND, AND WHY THE .gitignore CHANGED: 545 MB of extracted game content was committed on that branch -- 850 sprite, audio and transcoded video files under `export-probe/` and `export-probe2/`, plus 246 MB of loose .wav and .tsv at the repo root. This repository's own rule, in this file, is "never game content". The rule was not missing. It was written, and it was tightened on that very branch, with a careful comment explaining why BOTH `export/` and `data/base/` had to be listed -- while the exporter was writing to a third name that nobody had thought to list. Enumerating names is the thing that failed. So the ignore rules now describe the SHAPE: any top-level `export*/`, game media by extension, and loose capture output at the root. Verified both ways -- it catches all four offenders and ignores nothing currently tracked. Verified: `cargo check --workspace` clean; all nine GDScript files parse in project context, with a positive control (an injected syntax error is detected, 3 lines) so the clean result means something. `tools/port/check-all` was NOT run -- it needs the container, the export tree and a display.
66 lines
3.4 KiB
Rust
66 lines
3.4 KiB
Rust
//! Why do two "every pak, every timed record" scans disagree by 86 %?
|
|
//!
|
|
//! This port counts 1 781 timed nested records and reports `+0x08 == max t` at
|
|
//! 92.3 %. The Decoder counts 3 311 and reports 49.6 %. Both scans are described
|
|
//! the same way, so at least one of them is narrower than its own description --
|
|
//! and the exactness figure this port has quoted repeatedly is a property of
|
|
//! whichever subset it actually walks.
|
|
//!
|
|
//! Counts the survivors at each filter, so the gap is located rather than
|
|
//! guessed at.
|
|
use sylpheed_formats::{pak, ratc, ui_layout};
|
|
|
|
fn main() {
|
|
let root = std::env::var("SYLPHEED_DISC").unwrap_or_else(|_| "/disc".into());
|
|
let mut paks: Vec<_> = std::fs::read_dir(format!("{root}/dat")).expect("dat/")
|
|
.flatten().map(|e| e.path())
|
|
.filter(|p| p.extension().and_then(|s| s.to_str()) == Some("pak")).collect();
|
|
paks.sort();
|
|
let (mut records, mut in_bounds, mut magic, mut parsed, mut timed) = (0, 0, 0, 0, 0);
|
|
let (mut untimed, mut all_at_zero) = (0usize, 0usize);
|
|
for p in &paks {
|
|
let Ok(ar) = pak::PakArchive::open(p) else { continue };
|
|
for e in ar.entries() {
|
|
let Ok(by) = ar.read(e) else { continue };
|
|
if !ratc::is_ratc(&by) { continue }
|
|
let Some(b) = ui_layout::parse_build(&by) else { continue };
|
|
for (_, &(o, s)) in &b.records {
|
|
records += 1;
|
|
if o + 12 > by.len() || o + s > by.len() { continue }
|
|
in_bounds += 1;
|
|
if &by[o..o + 4] != b"RATC" { continue }
|
|
magic += 1;
|
|
let Some(lb) = ui_layout::parse_build(&by[o..o + s]) else { continue };
|
|
parsed += 1;
|
|
let maxt = lb.elements.iter()
|
|
.flat_map(|el| el.keyframes.iter().filter_map(|k| k.time))
|
|
.max().unwrap_or(0);
|
|
// 🔴 `maxt == 0` merges two different populations, and the
|
|
// Decoder's cause -- `.max()` returning `Some(0)` -- is only one
|
|
// of them. A record with NO timed keyframe has no largest
|
|
// keyframe time; a record whose keyframes all sit at t=0 has
|
|
// one, and it is 0. Only the first is a question without
|
|
// content. Both of us called all 1 530 "the question has no
|
|
// meaning"; that is true of one group and an assumption about
|
|
// the other.
|
|
let any_timed = lb.elements.iter()
|
|
.any(|el| el.keyframes.iter().any(|k| k.time.is_some()));
|
|
if maxt == 0 {
|
|
if any_timed { all_at_zero += 1 } else { untimed += 1 }
|
|
continue;
|
|
}
|
|
timed += 1;
|
|
}
|
|
}
|
|
}
|
|
println!(" records declared by parse_build : {records}");
|
|
println!(" within the entry's bounds : {in_bounds}");
|
|
println!(" carrying the RATC magic : {magic} <- {} dropped here",
|
|
in_bounds - magic);
|
|
println!(" parsing as a nested build : {parsed}");
|
|
println!(" with a largest keyframe time > 0: {timed}");
|
|
println!(" of the {} excluded:", untimed + all_at_zero);
|
|
println!(" NO timed keyframe at all : {untimed} <- the question has no content");
|
|
println!(" timed, but every pose at t=0 : {all_at_zero} <- a largest time EXISTS, and it is 0");
|
|
}
|