Nomad Palette Format

From ModdingWiki
Jump to: navigation, search
Nomad Palette Format
Format typePalette
HardwareVGA
Colour depth18-bit
Number of colours1 to 256
Games

The Nomad Palette Format is a minor variation of a standard 6-bit VGA Palette file. Instead of containing a fixed number of palette entries, these files may contain any number of colors from 1 to 256. This allows the game to leave existing palette data in place and replace only the subset of entries specified in the palette file.

Header

Data type Description
BYTE pad Fixed; always 00
BYTE startIndex The VGA palette index at which color data from this file should be written
BYTE numEntries Number of color entries in this file. A value is 00 is interpreted to mean 256 colors.

Data

Immediately following the three-byte header is the following repeating structure of 6-bit color data. This repeats numEntries times.

Data type Description
BYTE red Red component (6-bit)
BYTE green Green component (6-bit)
BYTE blue Blue component (6-bit)