Cleanup format of GbaImageData

This commit is contained in:
2017-05-07 21:41:52 -05:00
parent c4da8394d2
commit 8a2ba6c171
4 changed files with 26 additions and 17 deletions
+8 -4
View File
@@ -17,14 +17,18 @@ typedef struct { uint32_t data[8]; } __attribute__((aligned(4))) Tile, Tile4;
// d-tile: double-sized tile (8bpp)
typedef struct { uint32_t data[16]; } __attribute__((aligned(4))) Tile8;
// tile block: 32x16 tiles, 16x16 d-tiles
typedef uint16_t Pallete[256];
typedef uint16_t Palette[256];
typedef Tile CharBlock[512];
typedef Tile8 CharBlock8[256];
struct __attribute__((packed)) GbaImageData {
Pallete pal;
uint16_t tileCount;
struct __attribute__((packed)) GbaImageDataHeader {
uint8_t bpp;
uint16_t tileCount;
};
struct __attribute__((packed)) GbaImageData {
GbaImageDataHeader header;
Palette __attribute__((packed)) pal;
uint8_t tiles[1];
};