Bound the last region by core_data's constant trailer
Comparing all 27 levels byte-for-byte from the end: the last 231,952 bytes (0x38A10) of every level's core_data are identical. Level-specific content therefore ends at len - 0x38A10, which is a real bound for the final region and is not core_data.len(). This closes shrub. Across the 24 levels that have a shrub region the bound gives 24,442,928 bytes total, and the disc test asserts on every level that the region ends strictly inside the lump rather than at its end. What the trailer is remains unestablished -- fixed data, or padding from a fixed-size decompression buffer -- but it is constant, which is all a bound needs. The data between the last shrub class and the trailer is high entropy: 183 to 256 distinct byte values per 4 KB block, mean 254, where texture data sits under 200. It is real content of unknown type and is the most likely home for moby_anim, now that the range between collision and moby has been ruled out as texture. A lump shorter than the trailer now yields end: None rather than a backwards bound, covered by a test.
This commit is contained in:
@@ -28,7 +28,7 @@ than inventing their own.
|
||||
| `collision`| `collision` | first moby class |
|
||||
| `moby` | first moby | first tie class |
|
||||
| `tie` | first tie | first shrub class |
|
||||
| `shrub` | first shrub | **unknown** |
|
||||
| `shrub` | first shrub | lump length − 0x38A10 |
|
||||
|
||||
Class regions start at the lowest non-zero geometry offset in their class
|
||||
table. A zero entry means *absent*, not position zero -- the same trap the
|
||||
@@ -36,7 +36,22 @@ occlusion and collision headers each fell into separately.
|
||||
|
||||
Not every level has every region: level 10 has no occlusion and no shrub.
|
||||
|
||||
## Open: where shrub ends
|
||||
## The constant trailer
|
||||
|
||||
Comparing all 27 levels byte-for-byte from the end: the last **231,952 bytes
|
||||
(0x38A10)** of every level's `core_data` are identical. Level-specific content
|
||||
therefore ends at `len - 0x38A10`, and the final region is bounded there rather
|
||||
than at `core_data.len()`.
|
||||
|
||||
This is what closes shrub. Across the 24 levels that have a shrub region it
|
||||
gives **24,442,928 bytes** total, and it is the same bound the disc test
|
||||
asserts on every level.
|
||||
|
||||
What the trailer *is* is not established. It may be fixed data, or padding
|
||||
from a fixed-size decompression buffer. Either way it is constant, which is
|
||||
all that is needed to bound the tail.
|
||||
|
||||
## Open: what was in the region before it
|
||||
|
||||
The offset ending the shrub region is not in the core index.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user