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:
@@ -29,6 +29,9 @@ pub struct LevelProbe {
|
||||
pub index_len: usize,
|
||||
/// Rendered field-by-field dump of the core header.
|
||||
pub header: Vec<(String, String)>,
|
||||
/// Region bounds, computed from successor boundaries. Shown next to the
|
||||
/// header so a probe never re-derives them inline.
|
||||
pub regions: Vec<gc_formats::regions::Region>,
|
||||
/// The three class tables, in the order the header lists them.
|
||||
pub classes: Vec<ClassTable>,
|
||||
}
|
||||
@@ -92,6 +95,8 @@ pub fn probe_level(dir: &Path, level: u32) -> Result<LevelProbe> {
|
||||
header.push((name.into(), range(v)));
|
||||
}
|
||||
|
||||
let regions = gc_formats::regions::core_layout(&index, &h);
|
||||
|
||||
let mut classes = Vec::new();
|
||||
for (name, r, stride) in [
|
||||
("moby", h.moby_classes, CLASS_ENTRY_BYTES),
|
||||
@@ -110,6 +115,7 @@ pub fn probe_level(dir: &Path, level: u32) -> Result<LevelProbe> {
|
||||
core_len: core.len(),
|
||||
index_len: index.len(),
|
||||
header,
|
||||
regions,
|
||||
classes,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user