from the boreholio dept.
Dumping this here just for the hell of it. Would be more readable if I didn't have to work around the stupid filter.
Overall Structure
-----------------
Bytes 0001 - 0010 : ASCIIZ : "TERRANMAP"
Bytes 0011 - 0015 : -????- : 1A 05 00 00 00
Bytes 0016 - 0019 : INT-32 : Width
Bytes 0020 - 0023 : INT-32 : Height
Bytes 0024 - 0043 : -????- : ???
Byte: 0044 - ---- : -????- : 01 = flat map
Bytes 0045 - 0047 : -????- : ???
Bytes 0048 - 0051 : INT-32 : LabelCount
Bytes 0052 - 2611 : STRUCT : array(1..64) of Label
Bytes 2612 - 2651 : -????- : ???
Bytes 2652 - 2731 : ASCIIZ : Filename
Bytes 2732 - 2739 : -????- : ???
Bytes 2740 - ???? : STRUCT : array(1..(Height), 1..(Width / 2)) of MapData
Bytes ???? - EOF. : -????- : Landmass ID map?
Label Struct
------------
Bytes 01 - 04 : INT-32 : X
Bytes 05 - 08 : INT-32 : Y
Bytes 09 - 40 : ASCIIZ : Label text
MapData Struct
--------------
Byte: 01 : BITS : Flags:
- 00001000 = Moist
- 00010000 = Rainy
- 00100000 = Ocean
- 01000000 = Ocean Shelf
- 01100000 = Just above sea level
- 10000000 = One level above sea level
- 10100000 = Two levels above sea level
- 11000000 = Three levels above sea level
- 11100000 = Four levels above sea level
Byte: 02 - -- : BYTE : Altitude (0x3C = 10m; lower values are depth)
Bytes 03 - 04 : ???? : ???
Byte: 05 - -- : BYTE : 0x00
Byte: 06 - -- : BITS : Flags:
- 01000000 = Rolling
- 10000000 = Rocky
Byte: 07 - -- : ???? : ???
Byte: 08 - -- : BYTE : Tile owner (should be 0xFF)
Bytes 09 - 12 : BITS : Flags:
- 00 00 00 01 = Borehole
- 00 00 00 10 = Pod?
- 00 00 00 80 = Sensor
- 00 00 04 00 = Airbase
- 00 00 10 00 = Landmark?
- 00 00 20 00 = Forest
- 00 00 40 00 = Condenser
- 00 00 80 00 = Mirror
- 00 01 00 00 = River source/Aquifer
- 00 04 00 20 = Nutrients
- 00 04 01 20 = Energy
- 00 04 02 20 = Minerals
- 00 08 00 00 = Bunker
- 00 20 00 00 = Monolith
- 00 80 00 00 = Farm/Kelp
- 00 80 08 00 = Farm, Enricher
- 04 00 00 00 = Road
- 0C 00 00 00 = Tube
- 10 00 00 00 = Mine
- 20 00 00 00 = Fungus
- 40 00 00 00 = Solar/Tidal
- 80 00 00 00 = River?
Bytes 13 - 14 : BITS : Flags:
- 00 01 = Mesa
- 00 04 = Geothermal Shallows
- 00 10 = Cluster Borehole
- 00 20 = Nexus
- 01 00 = Crater
- 04 00 = Jungle
- 08 00 = Uranium
- 40 00 = Desert
- 80 00 = Fresh water (sea); ??? (land)
Byte: 15 . -- : BYTE : 0x40
Byte: 16 . -- : BYTE : Art ref?
Bytes 17 - 44 : BITS : array(1..7) of INT32 = (Flags2 AND 7F FF FF FF)