[Previous] [Contents] [Next]

my_setpalette()

set the palette for subsequent draw operations

Synopsis:

int my_setpalette( int n, struct pal_entry *p );

Description:

This function sets the palette for subsequent draw operations. The arguments are:

n
The number of entries in the palette, usually 16 or 256. This number must not be greater than 256.
p
An array of RGB values to be used for subsequent drawing operations. Values range from 0 (darkest) to 255 (brightest).

Note: You don't need to keep a copy of the palette because this function is called whenever the palette is modified. Just keep a pointer to the palette.

Returns:

1
Success.
0
The operation couldn't be done.

Classification:

Photon

Safety:
Interrupt handler Not applicable
Signal handler Not applicable
Thread Not applicable

[Previous] [Contents] [Next]