Logo Search packages:      
Sourcecode: scummvm version File versions

virtual void OSystem::setPalette ( const byte *  colors,
uint  start,
uint  num 
) [pure virtual]

Replace the specified range of the palette with new colors. The palette entries from 'start' till (start+num-1) will be replaced - so a full palette update is accomplished via start=0, num=256.

The palette data is specified in interleaved RGBA format. That is, the first byte of the memory block 'colors' points at is the red component of the first new color; the second byte the blue component of the first new color; the third byte the green component, the last byte to the alpha (transparency) value. Then the second color starts, and so on. So memory looks like this: R1-G1-B1-A1-R2-G2-B2-A2-R3-...

colors the new colors, in interleaved RGB format
start the first palette entry to be updated
num the number of palette entries to be updated
It is an error if start+num exceeds 256, behaviour is undefined in that case (the backend may ignore it silently or assert).

The alpha value is not actually used, and future revisions of this API are probably going to remove it.

Generated by  Doxygen 1.6.0   Back to index