diff options
author | PikalaxALT <PikalaxALT@gmail.com> | 2020-04-24 08:47:22 -0400 |
---|---|---|
committer | PikalaxALT <PikalaxALT@gmail.com> | 2020-04-24 08:47:22 -0400 |
commit | 14f76fbe03d740d76c6867a87713fb469ae7eaa7 (patch) | |
tree | 804e2e3b537c585aeabea82ddf6e94e4e9f9854c /tools/gbagfx/gfx.h | |
parent | dc126e30169bd145d28c6d84e4bb466d96394d29 (diff) |
Add tilemap rendering capability to gbagfx
Diffstat (limited to 'tools/gbagfx/gfx.h')
-rw-r--r-- | tools/gbagfx/gfx.h | 17 |
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); |