Mat files hold sprites and level tiles in Prehistorik.
|UINT16BE iCount||Number of images|
A number of image blocks immediately follow the signature byte, repeating iCount times:
|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!)