set the palette for subsequent draw operations
int my_setpalette( int n, struct pal_entry *p );
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).
 |
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. |
- 1
- Success.
- 0
- The operation couldn't be done.
Photon
Safety: | |
Interrupt handler |
Not applicable |
Signal handler |
Not applicable |
Thread |
Not applicable |