Battlezone HGT (Terrain Height)

A Terrain Height file has no header and contains an array of zone height blocks. The zone map controls the layout of these blocks in world space but Battlezone uses row-major order starting at the southwest corner of the map.

Zone Height Block

Each zone height block is a 128 by 128 array of height entries in row-major order starting at the southwest corner of the zone. Successive entries in a row are at increasing X positions (west to east). Successive rows are at increasing Z positions (south to north).

Height Entry

Each height entry is a 16-bit bitfield. The file data uses little-endian byte order so the byte containing the low 8 bits of the height comes first and the byte containing the high 4 bits of the height and the coplanar flags comes second.

15 14 1312 110
Coplanar
Triangles
Coplanar
Squares
(Unused) Height