summaryrefslogtreecommitdiff
path: root/tools/gbagfx/gfx.h
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-01-19 02:17:21 -0500
committerGitHub <noreply@github.com>2021-01-19 02:17:21 -0500
commit419c897292dbfbc4f6d43880eb94597987e09e2c (patch)
tree36094eda149165d0e4dad545924b95f582d83838 /tools/gbagfx/gfx.h
parentac62e8e563f9e74493a394a21c1bd8fa1570b184 (diff)
parenta52d6e43794e0fa773f10dcebb820bd2bca8fc40 (diff)
Merge pull request #380 from GriffinRichards/sync-scaninc
Sync tools with pokeemerald
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 5355ced85..edb9e62c4 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);