Files
MechaCat02 62376dd4a1 style: rustfmt sweep — 107 files the lint gate never saw
This branch predates CI on `main`. `cargo fmt --all` only; no behaviour.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-12 16:34:40 +02:00

22 lines
671 B
Rust

use sylpheed_formats::{pak, t8ad, ui_layout};
fn main() {
let mut a = std::env::args().skip(1);
let pk = a.next().unwrap();
let i: usize = a.next().unwrap().parse().unwrap();
let ar = pak::PakArchive::open(pk).unwrap();
let by = ar.read(&ar.entries()[i]).unwrap();
let b = ui_layout::parse_build(&by).unwrap();
let mut v: Vec<(String, u32, u32)> = b
.sprites
.iter()
.filter_map(|(n, &(o, s))| {
let im = t8ad::parse(&by[o..o + s])?;
Some((n.clone(), im.width, im.height))
})
.collect();
v.sort();
for (n, w, h) in v {
println!(" {w:>5} x {h:<5} {n}");
}
}