summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/pokemon_storage_system.s6
-rw-r--r--data/debug_menu_3.s4
-rw-r--r--data/debug_mystery_event_menu.s4
-rw-r--r--data/unk_debug_menu_3.s3
-rw-r--r--src/debug/start_menu_debug.c3
-rw-r--r--src/engine/link.c2
-rw-r--r--src/engine/save.c4
-rw-r--r--src/pokemon/mail.c2
-rw-r--r--src/scene/title_screen.c2
9 files changed, 24 insertions, 6 deletions
diff --git a/asm/pokemon_storage_system.s b/asm/pokemon_storage_system.s
index b5f1f495f..6e6e17db3 100644
--- a/asm/pokemon_storage_system.s
+++ b/asm/pokemon_storage_system.s
@@ -1009,7 +1009,7 @@ _0809625C: .4byte gPokemonStorage + 0x8344
_08096260: .4byte gPCText_BOX
thumb_func_end ResetPokemonStorageSystem
-.ifdef DEBUG
+.if DEBUG
thumb_func_start debug_sub_80A3904
debug_sub_80A3904:
.syntax divided
@@ -2386,7 +2386,7 @@ _08096AF4: .4byte gMain
_08096AF8: .4byte 0x0000043c
thumb_func_end sub_80969A0
-.ifdef DEBUG
+.if DEBUG
thumb_func_start debug_sub_80A4300
debug_sub_80A4300:
@@ -15134,7 +15134,7 @@ sub_809CA8C: @ 809CA8C
bx r0
thumb_func_end sub_809CA8C
-.ifdef DEBUG
+.if DEBUG
thumb_func_start debug_sub_80AA40C
debug_sub_80AA40C:
.syntax divided
diff --git a/data/debug_menu_3.s b/data/debug_menu_3.s
index 1e0a79c9f..36356c18a 100644
--- a/data/debug_menu_3.s
+++ b/data/debug_menu_3.s
@@ -1,3 +1,5 @@
+.if DEBUG
+
.include "include/macros.inc"
.include "constants/constants.inc"
@@ -17,3 +19,5 @@ _845E422::
.incbin "baserom_de_debug.gba", 0x45E422, 33
_845E443::
.incbin "baserom_de_debug.gba", 0x45E443, 889
+
+.endif
diff --git a/data/debug_mystery_event_menu.s b/data/debug_mystery_event_menu.s
index a54a89715..06bf18377 100644
--- a/data/debug_mystery_event_menu.s
+++ b/data/debug_mystery_event_menu.s
@@ -1,3 +1,5 @@
+.if DEBUG
+
.include "include/macros.inc"
.include "constants/constants.inc"
@@ -14,3 +16,5 @@ Str_843DA98::
Str_843DAA3::
.string "completed。$"
+
+.endif
diff --git a/data/unk_debug_menu_3.s b/data/unk_debug_menu_3.s
index cb98f9bbf..2fd8381db 100644
--- a/data/unk_debug_menu_3.s
+++ b/data/unk_debug_menu_3.s
@@ -1,5 +1,8 @@
.section .rodata
+ .align 2
+
+@ Is this actually sJapaneseEggNickname?
Str_842E238: @ 0x842E238
.string "タマゴ$"
diff --git a/src/debug/start_menu_debug.c b/src/debug/start_menu_debug.c
index f8e10baa2..572251fb4 100644
--- a/src/debug/start_menu_debug.c
+++ b/src/debug/start_menu_debug.c
@@ -1,3 +1,5 @@
+#if DEBUG
+
__attribute__((naked))
void debug_sub_8076AC8()
{
@@ -6128,3 +6130,4 @@ void DebugMenu_OpenKiwa()
);
}
+#endif
diff --git a/src/engine/link.c b/src/engine/link.c
index a716d5c2b..f800f4aad 100644
--- a/src/engine/link.c
+++ b/src/engine/link.c
@@ -1404,7 +1404,7 @@ static void CB2_PrintErrorMessage(void)
{
case 0:
Menu_PrintTextPixelCoords(gMultiText_LinkError, 20, 56, 1);
-#ifdef DEBUG
+#if DEBUG
StringCopy(array, sColorCodes);
ConvertIntToHexStringN(array2, sErrorLinkStatus, STR_CONV_MODE_LEADING_ZEROS, 8);
diff --git a/src/engine/save.c b/src/engine/save.c
index 8217652f9..d11eebaac 100644
--- a/src/engine/save.c
+++ b/src/engine/save.c
@@ -783,7 +783,7 @@ u8 Save_WriteDataInternal(u8 saveType)
return 0;
}
-#ifdef DEBUG
+#if DEBUG
extern u32 gUnknown_Debug_03004BD0;
#endif
@@ -794,7 +794,7 @@ u8 Save_WriteData(u8 saveType) // TrySave
Save_WriteDataInternal(saveType);
if (!gDamagedSaveSectors
-#ifdef DEBUG
+#if DEBUG
&& gUnknown_Debug_03004BD0 == 0
#endif
)
diff --git a/src/pokemon/mail.c b/src/pokemon/mail.c
index db0c96938..3187fef9f 100644
--- a/src/pokemon/mail.c
+++ b/src/pokemon/mail.c
@@ -327,9 +327,11 @@ static void sub_80F8F58(void);
static void sub_80F8F78(void);
static void sub_80F8FB4(void);
+#if DEBUG
// some debug variable, I guess.
// TODO: where exactly is this located?
__attribute__((section(".bss"))) /*static*/ u8 gUnknown_0300074C = 0;
+#endif
#if DEBUG
__attribute__((naked))
diff --git a/src/scene/title_screen.c b/src/scene/title_screen.c
index 4ff02d93c..a1c8e081d 100644
--- a/src/scene/title_screen.c
+++ b/src/scene/title_screen.c
@@ -354,7 +354,9 @@ static void Task_TitleScreenPhase1(u8);
static void Task_TitleScreenPhase2(u8);
static void Task_TitleScreenPhase3(u8);
static void CB2_GoToMainMenu(void);
+#if DEBUG
static void CB2_GoToTestMenu(void);
+#endif
static void CB2_GoToClearSaveDataScreen(void);
static void CB2_GoToResetRtcScreen(void);
static void CB2_GoToCopyrightScreen(void);