summaryrefslogtreecommitdiff
path: root/dxr3palettemanager.h
diff options
context:
space:
mode:
authoraustriancoder <austriancoder>2004-08-05 23:05:21 +0000
committeraustriancoder <austriancoder>2004-08-05 23:05:21 +0000
commitc47666d42f7972e1b51f9de61ce0fa27c72f3127 (patch)
treee34a87e37901b7f892fb6f330ccb15bcba30039b /dxr3palettemanager.h
downloadvdr-plugin-dxr3-c47666d42f7972e1b51f9de61ce0fa27c72f3127.tar.gz
vdr-plugin-dxr3-c47666d42f7972e1b51f9de61ce0fa27c72f3127.tar.bz2
initial import
Diffstat (limited to 'dxr3palettemanager.h')
-rw-r--r--dxr3palettemanager.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/dxr3palettemanager.h b/dxr3palettemanager.h
new file mode 100644
index 0000000..94253b8
--- /dev/null
+++ b/dxr3palettemanager.h
@@ -0,0 +1,39 @@
+/*
+ * 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_*/