ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.
Difference between revisions of "PAL"
From ModEnc
Line 12: | Line 12: | ||
Each byte only stores 6 bits of data, for example pure red would be represented as "00111111" (in binary) in the red byte. | Each byte only stores 6 bits of data, for example pure red would be represented as "00111111" (in binary) in the red byte. | ||
+ | |||
+ | [[Category:General_Editing_Information]] | ||
+ | [[Category:File Formats]] |
Revision as of 08:29, 16 June 2007
Format
The PAL file format is very simple. It is a series of colours, represented by 3 bytes each in the format
struct colour{ Uint8 red; Uint8 green; Uint8 blue; };
SHP files refer to an index in this file. 0 is the first colour (3 bytes), which is used as the transparent colour in the SHP file.
Index 1 of a palet file would be bytes 4, 5 and 6.
Each byte only stores 6 bits of data, for example pure red would be represented as "00111111" (in binary) in the red byte.