summaryrefslogtreecommitdiff
path: root/include/gba/types.h
diff options
context:
space:
mode:
authorPhlosioneer <mattmdrr2@gmail.com>2019-04-07 01:56:36 -0400
committerPhlosioneer <mattmdrr2@gmail.com>2019-04-07 01:56:36 -0400
commitd84d94e29a1424dd1d12ff821957bb6b1bc847d6 (patch)
treec5ba0778afca66a91f71815cd53fe9abef1bdac6 /include/gba/types.h
parentad2a97935e1c1f4362f0dffa58ef437d191bab4e (diff)
parentc3cfd6065825ec8ddd5e1782998071518efaa322 (diff)
Merge branch 'master' into pokenav-decomp-again
Diffstat (limited to 'include/gba/types.h')
-rw-r--r--include/gba/types.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/gba/types.h b/include/gba/types.h
index 3d78b5b5e..9f2594703 100644
--- a/include/gba/types.h
+++ b/include/gba/types.h
@@ -87,6 +87,29 @@ struct OamData
#define ST_OAM_H_RECTANGLE 1
#define ST_OAM_V_RECTANGLE 2
+#define ST_OAM_SIZE_0 0
+#define ST_OAM_SIZE_1 1
+#define ST_OAM_SIZE_2 2
+#define ST_OAM_SIZE_3 3
+
+#define SPRITE_SIZE_8x8 ((ST_OAM_SIZE_0 << 2) | (ST_OAM_SQUARE))
+#define SPRITE_SIZE_16x16 ((ST_OAM_SIZE_1 << 2) | (ST_OAM_SQUARE))
+#define SPRITE_SIZE_32x32 ((ST_OAM_SIZE_2 << 2) | (ST_OAM_SQUARE))
+#define SPRITE_SIZE_64x64 ((ST_OAM_SIZE_3 << 2) | (ST_OAM_SQUARE))
+
+#define SPRITE_SIZE_16x8 ((ST_OAM_SIZE_0 << 2) | (ST_OAM_H_RECTANGLE))
+#define SPRITE_SIZE_32x8 ((ST_OAM_SIZE_1 << 2) | (ST_OAM_H_RECTANGLE))
+#define SPRITE_SIZE_32x16 ((ST_OAM_SIZE_2 << 2) | (ST_OAM_H_RECTANGLE))
+#define SPRITE_SIZE_64x32 ((ST_OAM_SIZE_3 << 2) | (ST_OAM_H_RECTANGLE))
+
+#define SPRITE_SIZE_8x16 ((ST_OAM_SIZE_0 << 2) | (ST_OAM_V_RECTANGLE))
+#define SPRITE_SIZE_8x32 ((ST_OAM_SIZE_1 << 2) | (ST_OAM_V_RECTANGLE))
+#define SPRITE_SIZE_16x32 ((ST_OAM_SIZE_2 << 2) | (ST_OAM_V_RECTANGLE))
+#define SPRITE_SIZE_32x64 ((ST_OAM_SIZE_3 << 2) | (ST_OAM_V_RECTANGLE))
+
+#define SPRITE_SIZE(dim) ((SPRITE_SIZE_##dim >> 2) & 0x03)
+#define SPRITE_SHAPE(dim) (SPRITE_SIZE_##dim & 0x03)
+
struct BgAffineSrcData
{
s32 texX;