Logo Search packages:      
Sourcecode: scummvm version File versions

void OSystem_PS2::grabPalette ( byte *  colors,
uint  start,
uint  num 
) [protected, virtual]

Grabs a specified part of the currently active palette. The format is the same as for setPalette.

This should return exactly the same RGB data as was setup via previous setPalette calls.

For example, for every valid value of start and num of the following code:

byte origPal[num*3]; // Setup origPal's data however you like g_system->setPalette(origPal, start, num); byte obtainedPal[num*3]; g_system->grabPalette(obtainedPal, start, num);

the following should be true:

memcmp(origPal, obtainedPal, num*3) == 0

See also:
colorsthe palette data, in interleaved RGB format
startthe first platte entry to be read
numthe number of palette entries to be read
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:

Implements PaletteManager.

Definition at line 547 of file systemps2.cpp.

      _screen->grabPalette(colors, (uint8)start, (uint16)num);

Generated by  Doxygen 1.6.0   Back to index