This branch predates CI on `main`. `cargo fmt --all` only; no behaviour. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
42 lines
1.6 KiB
Rust
42 lines
1.6 KiB
Rust
use std::path::PathBuf;
|
|
use sylpheed_formats::{pak::PakArchive, ui_layout};
|
|
fn main() {
|
|
let root = PathBuf::from(std::env::var("SYLPHEED_DISC").unwrap());
|
|
println!("# Which elements the reference renderer now draws ADDITIVE, per screen.");
|
|
println!("# Source: T8aD +0x04 bit 0x02, docs/re/structures/ui-blend-mode-decoded.md.");
|
|
println!("# Generated after ui_layout::blit gained an additive path (2026-09-01).");
|
|
println!("# Before that change EVERY row below was drawn alpha-over by our renderer,");
|
|
println!("# which is why `verify-screen` was structurally incapable on these screens.");
|
|
for pak in ["GP_TITLE", "GP_OPTIONS"] {
|
|
let Ok(ar) = PakArchive::open(root.join(format!("dat/{pak}.pak"))) else {
|
|
continue;
|
|
};
|
|
let n = ar.entries().len();
|
|
for e in 0..n {
|
|
let Ok(by) = ar.read(&ar.entries()[e]) else {
|
|
continue;
|
|
};
|
|
let Some(b) = ui_layout::parse_build(&by) else {
|
|
continue;
|
|
};
|
|
let mut add: Vec<&String> = b
|
|
.sprites
|
|
.keys()
|
|
.filter(|s| ui_layout::blend_additive_by_name(&b, &by, s) == Some(true))
|
|
.collect();
|
|
if add.is_empty() {
|
|
continue;
|
|
}
|
|
add.sort();
|
|
println!(
|
|
"\n{pak} entry {e} -- {} of {} sprites additive",
|
|
add.len(),
|
|
b.sprites.len()
|
|
);
|
|
for s in add {
|
|
println!(" {s}");
|
|
}
|
|
}
|
|
}
|
|
}
|