YMAP file type

From Sunshine Wiki
Jump to navigation Jump to search

General Info[edit | edit source]

The YMP pollution heightmaps (ymap.ymp) contain pollution region info and heightmap images for the detection of goop.

File Structure
* Header
* Region Entry
* Heightmap

Header Section[edit | edit source]

Intro part of the file, holds info about the future sections of the file (0x08 bytes)

Section Offset Byte Length Description
0x00 2 uint16 Region Count
0x02 2 uint16 ???
0x04 4 uint32 Offset to Region entries

Region Entry[edit | edit source]

Region entries hold the information about a specific region of pollution (0x2C bytes)

Section Offset Byte Length Description
0x00 2 uint16 Pollution type
0x02 2 uint16 Pollution Bit Flag (&2 for disappearing goop, &1 for unused goop spread?)
0x04 2 uint16 Layer Type
0x06 2 uint16 ???
0x08 4 flt32 Point Y position
0x0C 4 flt32 World to texture scale (32 in all ymaps)
0x10 4 flt32 Point X start position
0x14 4 flt32 Point Z start position
0x18 4 flt32 Point X end position
0x1C 4 flt32 Point Z end position
0x20 2 uint16 Image width (exponent powered to 2)
0x22 2 uint16 Image Height (exponent powered to 2)
0x24 4? ??? (only filled in Bianco Hills heightmaps)
0x28 4 uint32 Offset to Heightmap

padding added (if applicable) to align file

Heightmap[edit | edit source]

After the pollution entries comes an array of heightmap images. These images are I8 BTIs.