Logo Search packages:      
Sourcecode: scummvm version File versions

void OSystem_PS2::setPalette ( const byte *  colors,
uint  start,
uint  num 
) [protected, 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 RGB 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 green component of the first new color; the third byte the blue 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-R2-G2-B2-R3-...

Parameters:
colorsthe new palette data, in interleaved RGB format
startthe first palette entry to be updated
numthe number of palette entries to be updated
Note:
It is an error if start+num exceeds 256, behaviour is undefined in that case (the backend may ignore it silently or assert).
It is an error if this function gets called when the pixel format in use (the return value of getScreenFormat) has more than one byte per pixel.
See also:
getScreenFormat

Implements PaletteManager.

Definition at line 543 of file systemps2.cpp.

                                                                     {
      _screen->setPalette(colors, (uint8)start, (uint16)num);
}

Generated by  Doxygen 1.6.0   Back to index