diff options
| author | Kam471 <115741199+Kam471@users.noreply.github.com> | 2026-11-22 01:24:54 +0000 |
|---|---|---|
| committer | Kam471 <115741199+Kam471@users.noreply.github.com> | 2026-11-22 01:24:54 +0000 |
| commit | 739ef5df1e0615adc7980e88676e72ee37d67038 (patch) | |
| tree | 662a2c2f41475b5a310fdc156bf38ce89d15e54a /runtime/test/gameinput_test.cpp | |
| parent | 22590c7bbcb4f35bdc902fc4db0e9c4f556f9c39 (diff) | |
Decode the MHIU and PAMH heightmaps: row tables, max/min arrays and Z mapping
Both common.rpf payloads are heightmaps, not square/u16 grids. MHIU is a 2048x2048 single-layer map: u16 width@0x06, height@0x08, then height 8-byte row headers {u16 start, u16 count, i32 offset} and packed u8 heights with a measured default of 23. The two measured payloads fill 1,724/1,727 rows and their spans cover the packed bytes with 0 gaps and 0 overlaps; the old zero prefix is the empty rows' headers. PAMH is the GTA HMAP layout stored little-endian (version 1.2): a row table, width*height max u8 rows and width*height min u8 rows. The old u16 reading interleaved the two arrays. Both scale as min.z + value/255 * (max.z - min.z). Cross-check: MHIU vs PAMH max correlates at r=0.861 and r=0.870 in the natural orientation, with land-mask IoU 0.61. The MHIU 0x28 word is still unidentified and is not called a checksum. Tests are synthetic and cover the row table, the default fill, negative offsets, the max/min split and the 64 KiB stream join.
Diffstat (limited to 'runtime/test/gameinput_test.cpp')
0 files changed, 0 insertions, 0 deletions