Show region bounds in probe, which exposed an unnamed 6.2 MB region
Printing the region table next to the header fields makes the gap visible without having to remember to consult core_layout, and it paid for itself immediately. On level 0 the collision region comes out 6216960 bytes, from 2615232 to the first moby class at 8832192. Collision's own header declares a payload of 903,248. So roughly 6.2 MB sits between the collision header and the first moby class, and almost none of it is collision. The successor rule is correct -- a region does end where the next one begins -- but "the next" is not yet known there. collision..moby is really collision + <something unnamed> .. moby. The name is wrong, not the bound. Candidates for the space, rough order of likelihood: moby and tie model animation data, which is what moby_anim would need, then volumes, then per-class runtime structures. Tfrag texture texels are already placed and sit earlier in the lump. Worth resolving before starting moby_anim, since that format is the most likely tenant. Until then, any probe reading between the collision header and the first moby class is reading something the region table does not describe.
This commit is contained in:
@@ -352,6 +352,27 @@ fn run_probe(args: &[String]) -> ExitCode {
|
||||
for (k, v) in &p.header {
|
||||
println!(" {k:<22} {v:>14}");
|
||||
}
|
||||
println!();
|
||||
println!("core_data regions (end = next region's start, never core_data.len())");
|
||||
println!("{}", "-".repeat(64));
|
||||
for r in &p.regions {
|
||||
let (lo, hi) = (r.start, r.start + p.core_len);
|
||||
let _ = (lo, hi);
|
||||
match r.end {
|
||||
Some(e) => println!(
|
||||
" {:<12} {:>10} .. {:<10} {:>10} bytes",
|
||||
r.name,
|
||||
r.start,
|
||||
e,
|
||||
e - r.start
|
||||
),
|
||||
None => println!(
|
||||
" {:<12} {:>10} .. {:<10} {:>10}",
|
||||
r.name, r.start, "?", "end unresolved"
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
for t in &p.classes {
|
||||
let sane = t.entries.iter().filter(|e| e.in_core(p.core_len)).count();
|
||||
println!();
|
||||
|
||||
Reference in New Issue
Block a user