re: EXTRAS complete -- ptframe4, pteff21/22/23 and pteff10 are all ADDITIVE

The four elements the port measured as the worst on EXTRAS, and which appeared
in no draw, were in a draw all along: the 24-index additive batch holds six
quads and Canary printed the first two. Cap raised to 64, screen re-captured,
all six named. Same draw as ptframe3, whose state was already measured -- the
one-way implication doing real work.

pteff10 is identified too, and it needed the resting SCALE: it ships as 409x144
and is drawn at 200 % x 500 % = 816x720. The matcher's 'try 1x and 2x' rule
could not name it at any scale and reported a near miss against something else,
which is a failure wearing the clothes of an answer. Candidates are now the
declaration's pivot*2 scaled by the resting keyframe as well as the texture at
1x and 2x, and the tolerance is the log's own NDC print quantisation rather than
a chosen number.

Flagged rather than buried: pteff10 measuring additive is in tension with the
port measuring it nearly exact under alpha-over. Both can be true for a dim
semi-transparent glow over a dark background, and it is the one row a rendering
check does not corroborate.

Also stated: the three full-screen alpha-over draws are NOT individually
identified -- four elements declare 1280x720 -- so the label on those rows is a
candidate, not an identification.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wuu56cE8vJGTBtn1ppsk8v
This commit is contained in:
sylph-decoder
2026-08-31 06:59:11 +00:00
parent f0b4f0ad5f
commit fa887b4e5f
5 changed files with 389 additions and 29 deletions

View File

@@ -0,0 +1,32 @@
//! The resting SCALE of each element, so a drawn quad's size can be predicted.
//!
//! One additive draw on both the main menu and `EXTRAS` measures 819.2 x 720 px
//! and matches no sprite at 1x or 2x. Scale is the missing factor: the keyframe
//! carries scale_x / scale_y in percent, and a sprite drawn at 200 % x 500 % is
//! nothing like its stored size.
//!
//! cargo run -p sylpheed-formats --example rest_scale_of -- 5 6 4
use sylpheed_formats::{pak::PakArchive, ui_layout};
use std::path::PathBuf;
fn main() {
let root = PathBuf::from(std::env::var("SYLPHEED_DISC").expect("SYLPHEED_DISC"));
let ar = PakArchive::open(root.join("dat/GP_TITLE.pak")).expect("GP_TITLE");
let builds: Vec<usize> = std::env::args().skip(1).filter_map(|a| a.parse().ok()).collect();
for build in if builds.is_empty() { vec![5usize, 6] } else { builds } {
let by = ar.read(&ar.entries()[build]).expect("entry");
let b = ui_layout::parse_build(&by).expect("build");
println!("=== GP_TITLE entry {build} ===");
println!("{:<22} {:>10} {:>7} {:>7} {:>12} {}", "element", "pivot(w,h)", "sx%", "sy%", "drawn px", "at 1x/2x of pivot*2");
for e in &b.elements {
let k = match e.rest() { Some(k) => k, None => continue };
let w = e.pivot_x * 2;
let h = e.pivot_y * 2;
let dw = w as f64 * k.scale_x as f64 / 100.0;
let dh = h as f64 * k.scale_y as f64 / 100.0;
println!("{:<22} {:>4},{:<5} {:>7} {:>7} {:>6.1}x{:<5.1} {:>6.1}x{:<5.1}",
e.name, w, h, k.scale_x, k.scale_y, dw, dh, dw * 2.0, dh * 2.0);
}
println!();
}
}