summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arm9/lib/include/ioreg_GX.h32
-rw-r--r--arm9/lib/include/registers.h28
-rw-r--r--arm9/lib/include/tp.h4
-rw-r--r--arm9/src/game_init.c24
4 files changed, 40 insertions, 48 deletions
diff --git a/arm9/lib/include/ioreg_GX.h b/arm9/lib/include/ioreg_GX.h
deleted file mode 100644
index d6f7f448..00000000
--- a/arm9/lib/include/ioreg_GX.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef NITRO_IOREG_GX_H_
-#define NITRO_IOREG_GX_H_
-
-#define REG_GX_POWCNT_GE_SHIFT 3
-#define REG_GX_POWCNT_GE_SIZE 1
-#define REG_GX_POWCNT_GE_MASK 0x0008
-
-#define REG_GX_POWCNT_RE_SHIFT 2
-#define REG_GX_POWCNT_RE_SIZE 1
-#define REG_GX_POWCNT_RE_MASK 0x0004
-
-#define REG_GX_POWCNT_E2DG_SHIFT 1
-#define REG_GX_POWCNT_E2DG_SIZE 1
-#define REG_GX_POWCNT_E2DG_MASK 0x0002
-
-#define REG_GX_POWCNT_LCD_SHIFT 0
-#define REG_GX_POWCNT_LCD_SIZE 1
-#define REG_GX_POWCNT_LCD_MASK 0x0001
-
-#define REG_GX_POWCNT_LCDB_SHIFT 8
-#define REG_GX_POWCNT_LCDB_SIZE 1
-#define REG_GX_POWCNT_LCDB_MASK 0x0100
-
-#define REG_GX_POWCNT_E2DGB_SHIFT 9
-#define REG_GX_POWCNT_E2DGB_SIZE 1
-#define REG_GX_POWCNT_E2DGB_MASK 0x0200
-
-#define REG_GX_POWCNT_DSEL_SHIFT 15
-#define REG_GX_POWCNT_DSEL_SIZE 1
-#define REG_GX_POWCNT_DSEL_MASK 0x8000
-
-#endif //NITRO_IOREG_GX_H_
diff --git a/arm9/lib/include/registers.h b/arm9/lib/include/registers.h
index b2915f8c..ae5b7adc 100644
--- a/arm9/lib/include/registers.h
+++ b/arm9/lib/include/registers.h
@@ -485,4 +485,32 @@
((u32)(a) << REG_PAD_KEYCNT_A_SHIFT))
#endif
+#define REG_GX_POWCNT_GE_SHIFT 3
+#define REG_GX_POWCNT_GE_SIZE 1
+#define REG_GX_POWCNT_GE_MASK 0x0008
+
+#define REG_GX_POWCNT_RE_SHIFT 2
+#define REG_GX_POWCNT_RE_SIZE 1
+#define REG_GX_POWCNT_RE_MASK 0x0004
+
+#define REG_GX_POWCNT_E2DG_SHIFT 1
+#define REG_GX_POWCNT_E2DG_SIZE 1
+#define REG_GX_POWCNT_E2DG_MASK 0x0002
+
+#define REG_GX_POWCNT_LCD_SHIFT 0
+#define REG_GX_POWCNT_LCD_SIZE 1
+#define REG_GX_POWCNT_LCD_MASK 0x0001
+
+#define REG_GX_POWCNT_LCDB_SHIFT 8
+#define REG_GX_POWCNT_LCDB_SIZE 1
+#define REG_GX_POWCNT_LCDB_MASK 0x0100
+
+#define REG_GX_POWCNT_E2DGB_SHIFT 9
+#define REG_GX_POWCNT_E2DGB_SIZE 1
+#define REG_GX_POWCNT_E2DGB_MASK 0x0200
+
+#define REG_GX_POWCNT_DSEL_SHIFT 15
+#define REG_GX_POWCNT_DSEL_SIZE 1
+#define REG_GX_POWCNT_DSEL_MASK 0x8000
+
#endif //POKEDIAMOND_ARM9_REGISTERS_H
diff --git a/arm9/lib/include/tp.h b/arm9/lib/include/tp.h
index 6692863f..d2687545 100644
--- a/arm9/lib/include/tp.h
+++ b/arm9/lib/include/tp.h
@@ -1,7 +1,3 @@
-//
-// Created by Scott Norton on 8/20/20.
-//
-
#ifndef NITRO_TP_H_
#define NITRO_TP_H_
diff --git a/arm9/src/game_init.c b/arm9/src/game_init.c
index 8fdeb44b..327c66c6 100644
--- a/arm9/src/game_init.c
+++ b/arm9/src/game_init.c
@@ -9,7 +9,7 @@
#include "tp.h"
#include "unk_0201B4E8.h"
#include "game_init.h"
-#include "ioreg_GX.h"
+#include "registers.h"
#pragma thumb on
@@ -462,19 +462,19 @@ void FUN_02016568(void)
gMain.unk4C |= PAD_BUTTON_X;
break;
case 2: // Swap X and Y; unused in the retail game
- {
- u32 r1 = 0;
- if (gMain.unk48 & PAD_BUTTON_X)
- {
- r1 |= PAD_BUTTON_Y;
- }
- if (gMain.unk48 & PAD_BUTTON_Y)
{
- r1 |= PAD_BUTTON_X;
+ u32 r1 = 0;
+ if (gMain.unk48 & PAD_BUTTON_X)
+ {
+ r1 |= PAD_BUTTON_Y;
+ }
+ if (gMain.unk48 & PAD_BUTTON_Y)
+ {
+ r1 |= PAD_BUTTON_X;
+ }
+ gMain.unk48 &= 0xF3FF;
+ gMain.unk48 |= r1;
}
- gMain.unk48 &= 0xF3FF;
- gMain.unk48 |= r1;
- }
{
u32 r1 = 0;
if (gMain.unk44 & PAD_BUTTON_X)