summaryrefslogtreecommitdiff
path: root/include/gba
diff options
context:
space:
mode:
authorgarak <garakmon@gmail.com>2018-09-24 08:40:33 -0400
committergarak <garakmon@gmail.com>2018-09-24 08:40:33 -0400
commit72f9afcbf4a81909019f21acad0484b72ed217f6 (patch)
treebc7e9a48b8056e28403e251dab7ac64f649ad9e4 /include/gba
parent3964dbd4822f1b22bbc696add7e56ff0c5b2caea (diff)
parent7ceabffc842dfdf127fd594055f895a0803f54f6 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/gba')
-rw-r--r--include/gba/defines.h3
-rw-r--r--include/gba/io_reg.h4
-rw-r--r--include/gba/m4a_internal.h2
-rw-r--r--include/gba/types.h11
4 files changed, 17 insertions, 3 deletions
diff --git a/include/gba/defines.h b/include/gba/defines.h
index 1eed6303d..16f1315d0 100644
--- a/include/gba/defines.h
+++ b/include/gba/defines.h
@@ -61,6 +61,9 @@
#define TILE_SIZE_4BPP 32
#define TILE_SIZE_8BPP 64
+#define TILE_OFFSET_4BPP(n) ((n) * TILE_SIZE_4BPP)
+#define TILE_OFFSET_8BPP(n) ((n) * TILE_SIZE_8BPP)
+
#define TOTAL_OBJ_TILE_COUNT 1024
#define WIN_RANGE(a, b) (((a) << 8) | (b))
diff --git a/include/gba/io_reg.h b/include/gba/io_reg.h
index 01d8c311e..03faa1a87 100644
--- a/include/gba/io_reg.h
+++ b/include/gba/io_reg.h
@@ -550,12 +550,14 @@
#define WININ_WIN0_BG1 (1 << 1)
#define WININ_WIN0_BG2 (1 << 2)
#define WININ_WIN0_BG3 (1 << 3)
+#define WININ_WIN0_BG_ALL (WININ_WIN0_BG0 | WININ_WIN0_BG1 | WININ_WIN0_BG2 | WININ_WIN0_BG3)
#define WININ_WIN0_OBJ (1 << 4)
#define WININ_WIN0_CLR (1 << 5)
#define WININ_WIN1_BG0 (1 << 8)
#define WININ_WIN1_BG1 (1 << 9)
#define WININ_WIN1_BG2 (1 << 10)
#define WININ_WIN1_BG3 (1 << 11)
+#define WININ_WIN1_BG_ALL (WININ_WIN1_BG0 | WININ_WIN1_BG1 | WININ_WIN1_BG2 | WININ_WIN1_BG3)
#define WININ_WIN1_OBJ (1 << 12)
#define WININ_WIN1_CLR (1 << 13)
@@ -572,8 +574,6 @@
#define WINOUT_WINOBJ_OBJ (1 << 12)
#define WINOUT_WINOBJ_CLR (1 << 13)
-#define WINHV_COORDS(m, n) (((m) << 8) | (n))
-
// BLDCNT
// Bits 0-5 select layers for the 1st target
#define BLDCNT_TGT1_BG0 (1 << 0)
diff --git a/include/gba/m4a_internal.h b/include/gba/m4a_internal.h
index 659302fd5..339a0774e 100644
--- a/include/gba/m4a_internal.h
+++ b/include/gba/m4a_internal.h
@@ -368,7 +368,7 @@ extern const u8 gNoiseTable[];
extern const struct PokemonCrySong gPokemonCrySongTemplate;
-extern const struct ToneData voicegroup_pokemon_cry;
+extern const struct ToneData voicegroup000;
extern char gNumMusicPlayers[];
extern char gMaxLines[];
diff --git a/include/gba/types.h b/include/gba/types.h
index 9f63489aa..a7dbf3e03 100644
--- a/include/gba/types.h
+++ b/include/gba/types.h
@@ -28,6 +28,17 @@ typedef u8 bool8;
typedef u16 bool16;
typedef u32 bool32;
+struct BgCnt
+{
+ u16 priority:2;
+ u16 charBaseBlock:2;
+ u16 dummy:4;
+ u16 screenBaseBlock:5;
+ u16 areaOverflowMode:1;
+ u16 screenSize:2;
+};
+typedef volatile struct BgCnt vBgCnt;
+
struct PlttData
{
u16 r:5; // red