blob: 7256853e95a64570f41b66eefa3d9e70adc72884 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
/*
* dxr3palettemanager.h:
*
* See the main source file 'dxr3.c' for copyright information and
* how to reach the author.
*
*/
#ifndef _DXR3PALETTEMANAGER_H_
#define _DXR3PALETTEMANAGER_H_
#include <assert.h>
#include <stdlib.h>
#include <stdint.h>
// ==================================
class cDxr3PaletteManager
{
public:
cDxr3PaletteManager();
~cDxr3PaletteManager() {};
void AddColor(int color);
void RemoveColor(int color);
int GetCount();
int operator[](int index);
int GetIndex(int color);
bool HasChanged();
uint32_t* GetPalette();
private:
static const int MAX_COLORS = 16;
int m_colors[MAX_COLORS];
uint32_t m_pal[MAX_COLORS];
int m_users[MAX_COLORS];
bool m_changed;
};
#endif /*_DXR3PALETTEMANAGER_H_*/
// Local variables:
// mode: c++
// c-file-style: "stroustrup"
// c-file-offsets: ((inline-open . 0))
// indent-tabs-mode: t
// End:
|