MTek-GDL 0.100.4-muffintrap
Loading...
Searching...
No Matches
mgdl-palette.h
1#pragma once
2
3#include "mgdl-types.h"
4#include "mgdl-color.h"
5
6// A palette that can be filled with custom colors
7
8struct Palette
9{
10 Color4f* _colors;
11 u8 size;
12};
13typedef struct Palette Palette;
14
15#ifdef __cplusplus
16extern "C"
17{
18#endif
19 Palette* Palette_GetDefault(void);
20
21 Palette* Palette_Create(u32* colorsArray, u8 size);
22 Palette* Palette_Create4f(u32* colorsArray, u8 size);
23 Palette* Palette_CreateEmpty(u8 size);
24
25 //TODO Palette* Palette_FromTexture(const char* filename);
26 void Palette_SetColor(Palette* palette, u8 index, u32 color);
27 void Palette_SetColor4f(Palette* palette, u8 index, Color4f color);
28
29 u32 Palette_GetColor(Palette* palette, u8 index);
30 Color4f Palette_GetColor4f(Palette* palette, u8 index);
31
32 void Palette_Delete(Palette* palette);
33#ifdef __cplusplus
34}
35#endif
Color struct and functions.
Library types, macros, defines and enums header.
Definition mgdl-color.h:54
Definition mgdl-palette.h:9