User:Pkmnfrk/.T (new)

From OHRRPGCE-Wiki
Jump to navigation Jump to search

###.t holds the tilemap for a map. It it comprised of two sections: A header, and a body. The header is in the Standard Header format, where as the body is simply a flat array of tiles, size width * height (with each type consisting of 2 bytes). Each layer has such an array, so the final lump size will be 2 * width * height * layers + header.

Formal Specs[edit]

About Formal Specs

Header:

Data Offset Meaning
INT 0 Standard Header Magic Number (0x1234)
INT 2 Header Size (0x8, but may vary in future versions.)
INT 4 Map width
INT 6 Map height

Body:

Each tile's position can be defined using this formula: 2 * (layer * width * height + y * width + x), where x and y are the tile's co-ordinates, width and height are the size of the map, and layer is which layer the tile is on (0-2). Thus, the offsets listed below are relative to this formula.

Data Offset Meaning
BYTE 0 Tile ID
BYTE 1 Flags (TBD)