Pushover Palette Format

From ModdingWiki
Jump to navigation Jump to search

THEMES/*.PAL stores the 16-colour palettes used by Pushover theme graphics and sprites. These files are uncompressed.

File format

Offset Data type Description
0x00 UINT16BE[16] Sixteen RGB444 colours, each stored as 0RGB
0x20 BYTE[32] Zero padding in all 11 documented palettes

For a colour word w, red is (w >> 8) & 15, green is (w >> 4) & 15, and blue is w & 15. Multiply each component by 17 to obtain an 8-bit channel. For example 08 AE decodes to RGB(136,170,238).

The file is 64 bytes. Its second half is not another palette. Shared ant and domino sprites use the active theme palette; there is no separate colour table per sprite frame.

Notes

The 0RGB interpretation was established by comparative rendering across the palettes, rather than a traced palette-loader instruction. Transparency is determined by the image format, not by the palette colour alone.

Source code

From pushover, the open-source browser port and its reverse-engineering notes:

Credits

This file format was reverse engineered by VorticonCmdr. 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!)