PALETTESTRUCT Struct Reference

#include <fileformatdefs.h>

List of all members.

Public Attributes

uint8 palette [768]
uint16 numpalookups
uint8(* palookup )[256]
uint8 transluc [256][256]


Detailed Description

Palette data format

Definition at line 192 of file fileformatdefs.h.


Member Data Documentation

uint16 PALETTESTRUCT::numpalookups
 

The number of shading tables used. Usually this number is 32, but 16 or 64 have also been used. Each of the 256 colors of the VGA palette can take on any of "numpalookups" number of shades.

Definition at line 208 of file fileformatdefs.h.

uint8 PALETTESTRUCT::palette[768]
 

This 768 byte array is exactly the palette you want. The format is: Red0, Green0, Blue0, Red1, Green1, Blue1, ..., Blue255 The colors are based on the VGA 262,144 color palette. The values range from 0-63, so if you want to convert it to a windows palette you will have to multiply each byte by 4.

Definition at line 201 of file fileformatdefs.h.

uint8(* PALETTESTRUCT::palookup)[256]
 

The shading table. If numpalookups = 32, then this table is: (32 shades) * (256 colors) = 8192 bytes (8K). The shade tables are often made to go from normal brightness (shade #0) down to pitch black (shade #31) So the first 256 bytes of the table would be for shade #0, etc...

Definition at line 216 of file fileformatdefs.h.

uint8 PALETTESTRUCT::transluc[256][256]
 

64K translucent lookup table. Given any 2 colors of the palette, this lookup table gives the best match of the 2 colors when mixed together.

Definition at line 222 of file fileformatdefs.h.


The documentation for this struct was generated from the following file:
Generated on Sat Jan 11 23:36:59 2003 for Build-Lib by doxygen1.2.18