|
Jo Engine
2024.04.28
Jo Sega Saturn Engine
|
Go to the documentation of this file.
35 #ifndef __JO_PALETTE_H__
36 # define __JO_PALETTE_H__
41 # define JO_PALETTE_MAX_COLORS (255)
46 # define JO_PALETTE_MAX (8)
61 while (size-- > 0) *(cram_addr++) = *(data++);
88 #ifdef JO_COMPILE_WITH_PRINTF_SUPPORT
94 static __jo_force_inline void jo_set_printf_palette_color(
const unsigned short index,
const unsigned short color)
jo_color jo_get_palette_register(const unsigned short palette_index)
Get palette color from index.
void jo_set_palette_register(const unsigned short palette_index, const jo_color color)
Set palette index color.
jo_color * data
Definition: types.h:251
Palette contents struct.
Definition: types.h:250
static __jo_force_inline void jo_create_palette_from(jo_palette *const output, unsigned short *data, unsigned int size)
Create a new palette from existing data.
Definition: palette.h:70
#define JO_MULT_BY_256(X)
Multiply a variable by 256.
Definition: math.h:108
unsigned short jo_color
15 bits color type
Definition: types.h:42
#define __jo_force_inline
force inline attribute (and prevent Doxygen prototype parsing bug)
Definition: types.h:39
static __jo_force_inline void jo_palette_to_cram(unsigned short *restrict data, unsigned short *restrict cram_addr, unsigned int size)
Copies the image palette data to CRAM.
Definition: palette.h:59
void jo_create_palette(jo_palette *const output)
Create a new palette with 255 entries maximum.