diff --git a/docs/re/structures/regn-map-grid.md b/docs/re/structures/regn-map-grid.md index eaa34e23..b5d2cba6 100644 --- a/docs/re/structures/regn-map-grid.md +++ b/docs/re/structures/regn-map-grid.md @@ -50,7 +50,34 @@ Two independent fields reproducing the grid is what rules out coincidence. So every map is a cube partitioned into 125 or 1 000 uniform cells — 10 km cells in a 100 km cube for the common case, and one pair of maps five times larger. -## ❔ The four sections +## ✅ Section 3 is the cell index — and it self-checks 11/11 + +The fourth section is a **one entry per cell** table of 8-byte records +`(count, offset)`, immediately followed by the records those offsets point at: + +``` +index = offsets[3] .. offsets[3] + cells*8 +payload = align16(index end) .. +record = 32 bytes (offsets step by 0x20) +``` + +Checked over all 11 objects: the lowest offset any cell refers to equals +**`align16(offsets[3] + cells × 8)` — 11 of 11**. On the six 10×10×10 maps +`cells × 8` is already 16-aligned and the payload butts straight up against the +index; on the three 5×5×5 maps `125 × 8 = 1000` is not, and the payload starts +8 bytes later, which is what makes the alignment rule visible rather than assumed. + +Two more invariants from the same sweep: + +* every occupied cell has count **exactly 1** — total items equals occupied cells + on all 11 objects, so this is "one record per cell", not a bucket list; +* **`counts[4] = occupied cells + 2`**, exactly, on all 11 (e.g. 997/995, + 880/878, 125/123). The `+2` is unexplained — two sentinels, or two cells + counted differently. + +Most cells are occupied: 878–998 of 1 000, 123 of 125. + +## ❔ The other three sections Their offsets scale with the object, and `counts[0..2]` scale with them — `(318, 1172, 2584)` for the 350 KB map against `(2936, 14967, 31155)` for the