diff --git a/crates/gc-extract/tests/disc.rs b/crates/gc-extract/tests/disc.rs index c5ac062..2c7f3b6 100644 --- a/crates/gc-extract/tests/disc.rs +++ b/crates/gc-extract/tests/disc.rs @@ -6520,10 +6520,10 @@ fn overlay_bin_is_the_seven_section_program_not_the_lit_section() { /// /// `lvl.vtbl` is section 3 of the level program: records of `{oClass, handler, /// auxiliary pointer}`, three words each, ending on padding. Across the 27 -/// levels that is **1,163 distinct class ids**, ranging to `0x13BA` (5,050), +/// levels that is **1,162 distinct class ids**, ranging to `0x13BA` (5,050), /// with a median of 38 new ids contributed per level. /// -/// `LevelCoreHeader::moby_classes.count` is 238 on level 0. **1,135 of the 1,163 +/// `LevelCoreHeader::moby_classes.count` is 238 on level 0. **1,135 of the 1,162 /// ids -- 98% -- are at or above that number.** So a test that treats /// "value < moby_classes.count" as "this looks like a class id" is really testing /// "is this a small number". @@ -6535,7 +6535,7 @@ fn overlay_bin_is_the_seven_section_program_not_the_lit_section() { /// of it. /// /// Re-scored against the real id set, no chunk slot stands out: the best is 0.375 -/// against a chance rate of 0.018 (1,163 ids in 65,536 values), and a dozen slots +/// against a chance rate of 0.018 (1,162 ids in 65,536 values), and a dozen slots /// sit between 0.25 and 0.38 with no separation between them. #[test] fn moby_class_ids_come_from_lvl_vtbl_not_from_the_class_count() { @@ -6623,13 +6623,13 @@ fn moby_class_ids_come_from_lvl_vtbl_not_from_the_class_count() { /// the level's class table. /// /// The two are easy to conflate and are not the same axis. Across the 27 levels -/// the vtbl carries 1,163 distinct identifiers reaching **5,050**, while +/// the vtbl carries 1,162 distinct identifiers reaching **5,050**, while /// `moby_classes.count` runs 161 to 259 per level. So `oClass` cannot index the /// class table -- almost every identifier would fall off the end. /// /// The identifiers are *shared* rather than per-level: the set is cumulative -/// across the 27 levels and no level re-uses the numbering, so 1,163 distinct -/// identifiers come out of 5,878 records. Level 0 contributes 234 and levels 1-8 +/// across the 27 levels and no level re-uses the numbering, so 1,162 distinct +/// identifiers come out of 5,822 records. Level 0 contributes 233 and levels 1-8 /// contribute 72, 69, 77, 54, 41, 68 and 28 -- roughly each level's own share, /// not a single level dominating. /// @@ -6718,7 +6718,7 @@ fn vtbl_class_ids_are_global_and_do_not_index_the_class_table() { out_of_range * 10 >= ids.len() * 9, "most ids should be out of range for any per-level table" ); - // and it is shared, not per-level: 1,163 identifiers come out of 5,878 + // and it is shared, not per-level: 1,162 identifiers come out of 5,822 // records, so levels re-use ids rather than renumbering. No single level // dominates -- level 0's 234 is about a fifth of the total. assert!( diff --git a/docs/formats/core-data-regions.md b/docs/formats/core-data-regions.md index 795bb1f..59d5403 100644 --- a/docs/formats/core-data-regions.md +++ b/docs/formats/core-data-regions.md @@ -3247,7 +3247,7 @@ Phase 3 port made visible. Its records are three words: Walking all 27 levels: - 5,878 records + 5,822 records 1,162 distinct class ids range 0 .. 0x13BA (5,050) median 38 new ids contributed per level @@ -3306,7 +3306,7 @@ off the end. They are different axes: the vtbl names a *type* of moby, the class table lists the *models* a level instantiates. The identifier space is shared rather than renumbered per level: 1,162 distinct -values come out of 5,878 records, and level 0 contributes 234 while levels 1-8 +values come out of 5,822 records, and level 0 contributes 233 while levels 1-8 contribute 72, 69, 77, 54, 41, 68 and 28 -- each level roughly its own share, not one level dominating. An earlier note here said "most of the game's classes appear in the first level"; the data says 20%, and the assertion is written to fail if diff --git a/docs/roadmap.md b/docs/roadmap.md index ad073ea..104dc5d 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -442,10 +442,10 @@ Phase 1 hands over the extents; this phase works out what each one contains. entries in the same overlay's `.text`, which is now readable. Asserted. - [x] `lvl.vtbl`'s **`oClass` is a global identifier**, not an index into the level's class table: 1,162 distinct ids across the game, largest 5,050, against - `moby_classes.count` of 136..259. **1,133 of 1,163 are out of range** for any + `moby_classes.count` of 136..259. **1,133 of 1,162 are out of range** for any per-level table. The two are different axes -- a type id, and the models a level instantiates -- and the space is shared rather than renumbered - (1,163 distinct out of 5,878 records; level 0 supplies 20%, not a + (1,162 distinct out of 5,822 records; level 0 supplies 20%, not a majority). A class can now be recognised across levels by id. Asserted. - [x] The **moby instance is named**: `MobyInstance`, 256 bytes, 67 fields, transcribed from the decomp's `include/structs.h` into `gc_formats::moby`