upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/pe_loader.cpp
diff options
context:
space:
mode:
authorKam471 <115741199+Kam471@users.noreply.github.com>2026-11-22 01:24:54 +0000
committerKam471 <115741199+Kam471@users.noreply.github.com>2026-11-22 01:24:54 +0000
commit739ef5df1e0615adc7980e88676e72ee37d67038 (patch)
tree662a2c2f41475b5a310fdc156bf38ce89d15e54a /runtime/src/pe_loader.cpp
parent22590c7bbcb4f35bdc902fc4db0e9c4f556f9c39 (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/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions