|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Color palette management API of the PowerVR More...
Files | |
| file | pvr_pal.h |
| Palette API for the PowerVR. | |
Enumerations | |
| enum | pvr_palfmt_t { PVR_PAL_ARGB1555 , PVR_PAL_RGB565 , PVR_PAL_ARGB4444 , PVR_PAL_ARGB8888 } |
| Color palette formats of the PowerVR. More... | |
Functions | |
| void | pvr_set_pal_format (pvr_palfmt_t fmt) |
| Set the palette format. | |
| static void | pvr_set_pal_entry (uint32_t idx, uint32_t value) |
| Set a palette value. | |
Color palette management API of the PowerVR
In addition to its 16-bit truecolor modes, the PVR also supports some nice paletted modes.
| enum pvr_palfmt_t |
Color palette formats of the PowerVR.
Entries in the PVR's palettes can be of any of these formats. Note that you can only have one format active at a time.
| Enumerator | |
|---|---|
| PVR_PAL_ARGB1555 | 16-bit ARGB1555 palette format |
| PVR_PAL_RGB565 | 16-bit RGB565 palette format |
| PVR_PAL_ARGB4444 | 16-bit ARGB4444 palette format |
| PVR_PAL_ARGB8888 | 32-bit ARGB8888 palette format |
|
inlinestatic |
Set a palette value.
Note that while the color format is variable, each entry is still 32-bits in length regardless (and you only get a total of 1024 of them). If using one of the 16-bit palette formats, only the low-order 16-bits of the entry are valid, and the high bits should be filled in with 0.
| idx | The index to set to (0-1023) |
| value | The color value to set in that palette entry |
References PVR_PALETTE_TABLE_BASE, and PVR_SET.
| void pvr_set_pal_format | ( | pvr_palfmt_t | fmt | ) |
Set the palette format.
This function sets the currently active palette format on the PVR. Each entry in the palette table is 32-bits in length, regardless of what color format is in use.
| fmt | The format to use |