MAT Format

From ModdingWiki
Jump to: navigation, search
MAT Format
MAT Format.png
Format typeTileset
Max tile count65536
Tile names?No
Minimum tile size (pixels)0
Maximum tile size (pixels)Unknown
Plane count5
Plane arrangementUnknown
Transparent pixels?Unknown
Hitmap pixels?No
Supports sub-tilesets?No
Compressed tiles?Yes
Hidden data?No

Mat files hold sprites and level tiles in Prehistorik.

File format


Data type Description
UINT16BE iCount Number of images

Image list

A number of image blocks immediately follow the signature byte, repeating iCount times:

Data type Description
UINT16BE iWidth Size of this sprite
UINT16BE iHeight Size of this sprite
UINT16BE iSize Length of image data
BYTE cData[iSize] Block of image data, iSize bytes long

If iSize is zero, that means the image is not compressed and is drawn as-is. If iSize is non-zero, then iSize bytes should be read and decompressed with LBM_Format decompression.


This file format was reverse engineered by Szevvy. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)