summaryrefslogtreecommitdiff
path: root/tools/gbagfx/gfx.h
diff options
context:
space:
mode:
authorxenonnsmb <xenonnsmb@users.noreply.github.com>2017-12-03 19:55:01 -0600
committerxenonnsmb <xenonnsmb@users.noreply.github.com>2017-12-03 19:55:01 -0600
commite649e3d2481faef109006b9157eeb22e1bff9fe2 (patch)
tree3348ffb6bbe7358a4082059960ef6bea8cf7e636 /tools/gbagfx/gfx.h
parenteeaa59d8376045ddf008276e6c13c860f23eedaa (diff)
adding tools from pokeruby
Diffstat (limited to 'tools/gbagfx/gfx.h')
-rw-r--r--tools/gbagfx/gfx.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/tools/gbagfx/gfx.h b/tools/gbagfx/gfx.h
new file mode 100644
index 000000000..ecd436652
--- /dev/null
+++ b/tools/gbagfx/gfx.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2015 YamaArashi
+
+#ifndef GFX_H
+#define GFX_H
+
+#include <stdint.h>
+#include <stdbool.h>
+
+struct Color {
+ unsigned char red;
+ unsigned char green;
+ unsigned char blue;
+};
+
+struct Palette {
+ struct Color colors[256];
+ int numColors;
+};
+
+struct Image {
+ int width;
+ int height;
+ int bitDepth;
+ unsigned char *pixels;
+ bool hasPalette;
+ struct Palette palette;
+ bool hasTransparency;
+};
+
+void ReadImage(char *path, int tilesWidth, int bitDepth, struct Image *image, bool invertColors);
+void WriteImage(char *path, int numTiles, int bitDepth, struct Image *image, bool invertColors);
+void FreeImage(struct Image *image);
+void ReadGbaPalette(char *path, struct Palette *palette);
+void WriteGbaPalette(char *path, struct Palette *palette);
+
+#endif // GFX_H