]> git.draconx.ca Git - upkg.git/blobdiff - src/engine/palette.h
engine: Implement Engine.Palette.
[upkg.git] / src / engine / palette.h
diff --git a/src/engine/palette.h b/src/engine/palette.h
new file mode 100644 (file)
index 0000000..45cbdd4
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ *  upkg: tool for manipulating Unreal Tournament packages.
+ *  Copyright © 2011 Nick Bowler
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef ENGINE_PALETTE_H_
+#define ENGINE_PALETTE_H_
+
+#include <uobject/uobject.h>
+
+#define ENGINE_PALETTE_TYPE (engine_palette_get_type())
+#define ENGINE_PALETTE(obj) \
+       G_TYPE_CHECK_INSTANCE_CAST(obj, ENGINE_PALETTE_TYPE, EnginePalette)
+#define ENGINE_PALETTE_CLASS(class) \
+       G_TYPE_CHECK_CLASS_CAST(class, ENGINE_PALETTE_TYPE, EnginePaletteClass)
+#define ENGINE_IS_PALETTE(obj) \
+       G_TYPE_CHECK_INSTANCE_TYPE(obj, ENGINE_PALETTE_TYPE)
+#define ENGINE_IS_PALETTE_CLASS(class) \
+       G_TYPE_CHECK_CLASS_TYPE(class, ENGINE_PALETTE_TYPE, EnginePaletteClass)
+
+typedef struct EnginePalette      EnginePalette;
+typedef struct EnginePaletteClass EnginePaletteClass;
+
+struct EnginePalette {
+       UObject parent;
+
+       unsigned entries;
+       unsigned char (*rgba)[4];
+};
+
+struct EnginePaletteClass {
+       UObjectClass parent;
+};
+
+GType engine_palette_get_type(void);
+void palette_register(GTypeModule *m);
+
+#endif