summaryrefslogtreecommitdiff
path: root/tools/gbagfx/gfx.h
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2020-12-17 13:17:58 -0600
committerGitHub <noreply@github.com>2020-12-17 13:17:58 -0600
commit096de8d9b2ffd90c52e790296bfd7c5436d45ca3 (patch)
tree9c5af2e04dea05221c71946a5dfc06471f77801d /tools/gbagfx/gfx.h
parentbc504264f1e54b3c1e482710c592e5549828bfe1 (diff)
parentf90f3affeb9b0a66aa7df68f5fdecd692033faf9 (diff)
Merge pull request #12 from SethBarberee/master
Merge work from SethBarberee/pmd-red into pret.
Diffstat (limited to 'tools/gbagfx/gfx.h')
-rw-r--r--tools/gbagfx/gfx.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/gbagfx/gfx.h b/tools/gbagfx/gfx.h
index 5355ced..edb9e62 100644
--- a/tools/gbagfx/gfx.h
+++ b/tools/gbagfx/gfx.h
@@ -17,6 +17,21 @@ struct Palette {
int numColors;
};
+struct NonAffineTile {
+ unsigned short index:10;
+ unsigned short hflip:1;
+ unsigned short vflip:1;
+ unsigned short palno:4;
+} __attribute__((packed));
+
+struct Tilemap {
+ union {
+ struct NonAffineTile *non_affine;
+ unsigned char *affine;
+ } data;
+ int size;
+};
+
struct Image {
int width;
int height;
@@ -25,6 +40,8 @@ struct Image {
bool hasPalette;
struct Palette palette;
bool hasTransparency;
+ struct Tilemap tilemap;
+ bool isAffine;
};
void ReadImage(char *path, int tilesWidth, int bitDepth, int metatileWidth, int metatileHeight, struct Image *image, bool invertColors);