PALLETES.BIN stores all the 256 colour palettes in a game. Currently, the only 256 colour palette is the master palette. It is a replacement for the ugly .MAS lump, and adds the possibility of multiple palettes: in the future we plan to give each sprite and backdrop its own 8 bit palette. If a PALETTES.BIN lump exists, any .MAS lump should be ignored.
The colour components are 0-255 (8 bit) instead of 0-63 (6 bit) as in MAS.
The lump starts with a header:
|0||INT||Size of the header, in bytes (currently 4)|
|1||INT||Size of each palette record, in bytes (currently 256 * 3 = 768)|
Following the header is one record per palette:
|Offset (in INTs)||Type||Meaning|
|0 - 383:
256 colour records
|256 * 3 * BYTEs||