diff options
author | Cameron Hall <cameronghall@cox.net> | 2018-01-17 12:10:41 -0600 |
---|---|---|
committer | Cameron Hall <cameronghall@cox.net> | 2018-01-17 12:10:41 -0600 |
commit | d79f440b8d4c5af26a98011719807b05745533e1 (patch) | |
tree | fb731f80808264ec8bc96a02b69d1f1e0f4328d3 /src | |
parent | bcf3fb87450883c9c26afec55f5f0ddc04864e84 (diff) |
use 'if DEBUG' instead of 'ifdef DEBUG'
Diffstat (limited to 'src')
-rw-r--r-- | src/battle/battle_2.c | 4 | ||||
-rw-r--r-- | src/battle/battle_interface.c | 2 | ||||
-rw-r--r-- | src/battle/battle_records.c | 2 | ||||
-rw-r--r-- | src/debug/kagaya_debug_menu.c | 2 | ||||
-rw-r--r-- | src/debug/nakamura_debug_menu.c | 2 | ||||
-rw-r--r-- | src/debug/nohara_debug_menu.c | 2 | ||||
-rw-r--r-- | src/debug/taya_debug_window.c | 2 | ||||
-rw-r--r-- | src/debug/tomomichi_debug_menu.c | 2 | ||||
-rw-r--r-- | src/debug/watanabe_debug_menu.c | 2 | ||||
-rw-r--r-- | src/engine/cable_club.c | 2 | ||||
-rw-r--r-- | src/engine/link.c | 4 | ||||
-rw-r--r-- | src/engine/rtc.c | 4 | ||||
-rw-r--r-- | src/engine/save.c | 2 | ||||
-rw-r--r-- | src/engine/sprite.c | 2 | ||||
-rw-r--r-- | src/engine/task.c | 2 | ||||
-rw-r--r-- | src/engine/trainer_card.c | 16 | ||||
-rw-r--r-- | src/field/bike.c | 6 | ||||
-rw-r--r-- | src/field/decoration_inventory.c | 2 | ||||
-rw-r--r-- | src/field/mauville_man.c | 2 | ||||
-rw-r--r-- | src/field/party_menu.c | 4 | ||||
-rw-r--r-- | src/field/roamer.c | 2 | ||||
-rw-r--r-- | src/field/slot_machine.c | 2 | ||||
-rw-r--r-- | src/field/start_menu.c | 4 | ||||
-rw-r--r-- | src/pokemon/pokemon_1.c | 2 | ||||
-rw-r--r-- | src/rom3.c | 4 | ||||
-rw-r--r-- | src/rom6.c | 2 | ||||
-rw-r--r-- | src/scene/new_game.c | 10 | ||||
-rw-r--r-- | src/scene/title_screen.c | 4 |
28 files changed, 48 insertions, 48 deletions
diff --git a/src/battle/battle_2.c b/src/battle/battle_2.c index 12b18bb52..5700d1b7e 100644 --- a/src/battle/battle_2.c +++ b/src/battle/battle_2.c @@ -1258,7 +1258,7 @@ void sub_800F02C(void) memcpy(gSharedMem, gUnknown_02023A00, 0x60); } -#ifdef DEBUG +#if DEBUG __attribute__((naked)) void sub_800F104() { @@ -1554,7 +1554,7 @@ void sub_800F104(void) } #endif -#ifdef DEBUG +#if DEBUG __attribute__((naked)) void sub_800F298() { diff --git a/src/battle/battle_interface.c b/src/battle/battle_interface.c index f7734301c..b19547d52 100644 --- a/src/battle/battle_interface.c +++ b/src/battle/battle_interface.c @@ -3045,7 +3045,7 @@ static u8 sub_80457E8(u8 a, u8 b) } } -#ifdef DEBUG +#if DEBUG __attribute__((naked)) void sub_8045A5C(u8 a, struct Pokemon *pkmn, u8 c) { diff --git a/src/battle/battle_records.c b/src/battle/battle_records.c index a03a215fd..17e2352ff 100644 --- a/src/battle/battle_records.c +++ b/src/battle/battle_records.c @@ -17,7 +17,7 @@ struct DebugStruct1 extern struct LinkPlayerMapObject gLinkPlayerMapObjects[4]; extern u8 gBattleOutcome; -#ifdef DEBUG +#if DEBUG const struct DebugStruct1 gUnknown_Debug_4245CC[] = { { 1, _("NUMBER1") }, diff --git a/src/debug/kagaya_debug_menu.c b/src/debug/kagaya_debug_menu.c index 6f2734b08..e54e0d17f 100644 --- a/src/debug/kagaya_debug_menu.c +++ b/src/debug/kagaya_debug_menu.c @@ -1,4 +1,4 @@ -#ifdef DEBUG +#if DEBUG #include "global.h" #include "menu.h" diff --git a/src/debug/nakamura_debug_menu.c b/src/debug/nakamura_debug_menu.c index 48b6d91b8..343d56bc2 100644 --- a/src/debug/nakamura_debug_menu.c +++ b/src/debug/nakamura_debug_menu.c @@ -1,4 +1,4 @@ -#ifdef DEBUG +#if DEBUG #include "global.h" #include "menu.h" diff --git a/src/debug/nohara_debug_menu.c b/src/debug/nohara_debug_menu.c index b7e62481b..2e739ef4d 100644 --- a/src/debug/nohara_debug_menu.c +++ b/src/debug/nohara_debug_menu.c @@ -1,4 +1,4 @@ -#ifdef DEBUG +#if DEBUG #include "global.h" #define BSS_DATA __attribute__((section(".bss"))) diff --git a/src/debug/taya_debug_window.c b/src/debug/taya_debug_window.c index 4f9b588d8..c20d9b87c 100644 --- a/src/debug/taya_debug_window.c +++ b/src/debug/taya_debug_window.c @@ -1,4 +1,4 @@ -#ifdef DEBUG +#if DEBUG #include "global.h" EWRAM_DATA u8 unk_2030224[4] = { 0 }; diff --git a/src/debug/tomomichi_debug_menu.c b/src/debug/tomomichi_debug_menu.c index f745f2993..eb2fd8a7e 100644 --- a/src/debug/tomomichi_debug_menu.c +++ b/src/debug/tomomichi_debug_menu.c @@ -1,4 +1,4 @@ -#ifdef DEBUG +#if DEBUG #include "global.h" #define BSS_DATA __attribute__((section(".bss"))) diff --git a/src/debug/watanabe_debug_menu.c b/src/debug/watanabe_debug_menu.c index fed5b4e52..dcb3bd90b 100644 --- a/src/debug/watanabe_debug_menu.c +++ b/src/debug/watanabe_debug_menu.c @@ -1,4 +1,4 @@ -#ifdef DEBUG +#if DEBUG #include "global.h" EWRAM_DATA u8 unk_debug_ewram_0[56] = { 0 }; diff --git a/src/engine/cable_club.c b/src/engine/cable_club.c index 03a64afc6..688560218 100644 --- a/src/engine/cable_club.c +++ b/src/engine/cable_club.c @@ -360,7 +360,7 @@ void sub_80831F8(u8 taskId) || sub_8082DF4(taskId) == TRUE) return; -#ifdef DEBUG +#if DEBUG sub_8082D60(taskId, GetLinkPlayerCount_2()); #endif diff --git a/src/engine/link.c b/src/engine/link.c index f93fb775f..5747915d7 100644 --- a/src/engine/link.c +++ b/src/engine/link.c @@ -544,7 +544,7 @@ static void ProcessRecvCmds(u8 unusedParam) else { SetBlockReceivedFlag(i); -#ifdef DEBUG +#if DEBUG debug_sub_808B838(i); #endif } @@ -979,7 +979,7 @@ static void PrintHex(u32 num, u8 x, u8 y, u8 maxDigits) } } -#ifdef DEBUG +#if DEBUG EWRAM_DATA u16 *debugCharacterBase = NULL; EWRAM_DATA void *unk_20238C8 = NULL; diff --git a/src/engine/rtc.c b/src/engine/rtc.c index a56fcd44e..5462298ed 100644 --- a/src/engine/rtc.c +++ b/src/engine/rtc.c @@ -268,7 +268,7 @@ void FormatHexDate(u8 *dest, s32 year, s32 month, s32 day) *dest = EOS; } -#ifdef DEBUG +#if DEBUG void debug_sub_800987C(u8 *dest) { @@ -370,7 +370,7 @@ u32 RtcGetMinuteCount() return (24 * 60) * RtcGetDayCount(&sRtc) + 60 * sRtc.hour + sRtc.minute; } -#ifdef DEBUG +#if DEBUG void debug_sub_8009A60() { RtcGetRawInfo(&sRtc); diff --git a/src/engine/save.c b/src/engine/save.c index d7df98e5f..5564a6ce3 100644 --- a/src/engine/save.c +++ b/src/engine/save.c @@ -663,7 +663,7 @@ static u16 CalculateChecksum(void *data, u16 size) return ((checksum >> 16) + checksum); } -#ifdef DEBUG +#if DEBUG __attribute__((naked)) void sub_813B79C() { diff --git a/src/engine/sprite.c b/src/engine/sprite.c index ed143ae8e..eaffedfdc 100644 --- a/src/engine/sprite.c +++ b/src/engine/sprite.c @@ -841,7 +841,7 @@ void RequestSpriteCopy(const void *src, u8 *dest, u16 size) gSpriteCopyRequests[gSpriteCopyRequestCount].size = size; gSpriteCopyRequestCount++; } -#ifdef DEBUG +#if DEBUG else { unref_sub_80AB084(sDmaOverErrorMsg); diff --git a/src/engine/task.c b/src/engine/task.c index ed17d28bb..d1f2cb5df 100644 --- a/src/engine/task.c +++ b/src/engine/task.c @@ -51,7 +51,7 @@ u8 CreateTask(TaskFunc func, u8 priority) } } -#ifdef DEBUG +#if DEBUG unref_sub_80AB084(gError_NoTasksLeft); #endif diff --git a/src/engine/trainer_card.c b/src/engine/trainer_card.c index daa513145..f9adc5777 100644 --- a/src/engine/trainer_card.c +++ b/src/engine/trainer_card.c @@ -63,7 +63,7 @@ const u8 gBadgesTiles[] = INCBIN_U8("graphics/trainer_card/badges.4bpp"); // XXX: what is this? u8 *const ewram_ = gSharedMem; -#ifdef DEBUG +#if DEBUG const struct TrainerCard gUnknown_Debug_083E0448 = { .gender = FEMALE, @@ -204,13 +204,13 @@ static void TrainerCard_Back_PrintPokemonTrades_Label(void); static void TrainerCard_Back_PrintPokemonTrades(void); void unref_sub_8094588(u16 left, u16 top); -#ifdef DEBUG +#if DEBUG static u8 gDebug_03000748; #endif void TrainerCard_ShowPlayerCard(Callback arg1) { -#ifdef DEBUG +#if DEBUG gDebug_03000748 = 0; #endif TrainerCard_InitScreenForPlayer(arg1); @@ -220,7 +220,7 @@ void TrainerCard_ShowPlayerCard(Callback arg1) void TrainerCard_ShowLinkCard(u8 playerIndex, Callback arg2) { -#ifdef DEBUG +#if DEBUG gDebug_03000748 = 0; #endif TrainerCard_InitScreenForLinkPlayer(playerIndex, arg2); @@ -228,7 +228,7 @@ void TrainerCard_ShowLinkCard(u8 playerIndex, Callback arg2) ewram0_2.language = gLinkPlayers[gLinkPlayerMapObjects[playerIndex].linkPlayerId].language; } -#ifdef DEBUG +#if DEBUG void debug_sub_80A0710(Callback callback) { gDebug_03000748 = TRUE; @@ -619,7 +619,7 @@ static void TrainerCard_FillFlags(void) } } -#ifdef DEBUG +#if DEBUG if (gDebug_03000748 != 0) { ewram0_2.showHallOfFame = TRUE; @@ -723,7 +723,7 @@ bool8 TrainerCard_WaitForKeys(struct Task *task) } return TRUE; } -#ifdef DEBUG +#if DEBUG else if (gDebug_03000748 && gMain.newKeys & R_BUTTON) { ewram0_2.starCount++; @@ -1462,7 +1462,7 @@ static void TrainerCard_Front_PrintPokedexCount(void) u8 buffer[16]; if ( -#ifdef DEBUG +#if DEBUG gDebug_03000748 == 0 && #endif !ewram0_2.showPokedexCount) diff --git a/src/field/bike.c b/src/field/bike.c index 736dbc837..eb9d56a64 100644 --- a/src/field/bike.c +++ b/src/field/bike.c @@ -14,7 +14,7 @@ extern bool8 gBikeCyclingChallenge; extern u8 gBikeCollisions; extern u8 gUnusedBikeCameraAheadPanback; -#ifdef DEBUG +#if DEBUG extern u8 gUnknown_020297ED; u8 debug_sub_805F2B0(u8); #endif @@ -131,7 +131,7 @@ static const struct BikeHistoryInputInfo gAcroBikeTricksList[] = void MovePlayerOnBike(u8 direction, u16 newKeys, u16 heldKeys) { -#ifdef DEBUG +#if DEBUG if (gUnknown_020297ED && debug_sub_805F2B0(direction)) { Bike_SetBikeStill(); @@ -284,7 +284,7 @@ static void MachBikeTransition_TrySlowDown(u8 var) // the acro bike requires the input handler to be executed before the transition can. static void MovePlayerOnAcroBike(u8 newDirection, u16 newKeys, u16 heldKeys) { -#ifdef DEBUG +#if DEBUG if (gUnknown_020297ED && debug_sub_805F2B0(newDirection)) { Bike_SetBikeStill(); diff --git a/src/field/decoration_inventory.c b/src/field/decoration_inventory.c index 21ced1be8..8f7f5eb92 100644 --- a/src/field/decoration_inventory.c +++ b/src/field/decoration_inventory.c @@ -166,7 +166,7 @@ u8 sub_81341D4(void) } -#ifdef DEBUG +#if DEBUG void debug_sub_814A3A8(void) { u8 decor; diff --git a/src/field/mauville_man.c b/src/field/mauville_man.c index 1b53df6be..00368c2f5 100644 --- a/src/field/mauville_man.c +++ b/src/field/mauville_man.c @@ -250,7 +250,7 @@ void SetupMauvilleOldMan(void) sub_80F83D0(); } -#ifdef DEBUG +#if DEBUG __attribute__((naked)) void debug_sub_810B32C() { diff --git a/src/field/party_menu.c b/src/field/party_menu.c index c099fd8f4..7994dd60c 100644 --- a/src/field/party_menu.c +++ b/src/field/party_menu.c @@ -4025,7 +4025,7 @@ void TeachMonTMMove(u8 taskId, u16 move, TaskFunc func) CreateTask(Task_TeamMonTMMove, 5); } -#ifdef DEBUG +#if DEBUG extern u8 gUnknown_020297ED; #endif @@ -4044,7 +4044,7 @@ void Task_TeamMonTMMove(u8 taskId) else { if ( -#ifdef DEBUG +#if DEBUG !gUnknown_020297ED && #endif !CanMonLearnTMHM(ewram1C000.pokemon, ewram1C000.unk6 - 33)) diff --git a/src/field/roamer.c b/src/field/roamer.c index 16a42e9f1..6ed5b6c89 100644 --- a/src/field/roamer.c +++ b/src/field/roamer.c @@ -227,7 +227,7 @@ void GetRoamerLocation(u8 *mapGroup, u8 *mapNum) *mapNum = sRoamerLocation[MAP_NUM]; } -#ifdef DEBUG +#if DEBUG void debug_sub_814A714(void) { if (gSaveBlock1.location.mapGroup == 0) diff --git a/src/field/slot_machine.c b/src/field/slot_machine.c index e231f686d..311679cb7 100644 --- a/src/field/slot_machine.c +++ b/src/field/slot_machine.c @@ -2855,7 +2855,7 @@ static void sub_8104C5C(void) static void LoadSlotMachineWheelOverlay(void); -#ifdef DEBUG +#if DEBUG // should be static __attribute__((section(".bss"))) u8 unk_debug_bss_1[0xC] = { 0 }; #endif diff --git a/src/field/start_menu.c b/src/field/start_menu.c index 105ef1756..36295b3f8 100644 --- a/src/field/start_menu.c +++ b/src/field/start_menu.c @@ -44,7 +44,7 @@ enum { MENU_ACTION_PLAYER_LINK }; -#ifdef DEBUG +#if DEBUG static u32 _debugStartMenu_0 __attribute__((unused)); static u32 _debugStartMenu_1 __attribute__((unused)); #endif @@ -137,7 +137,7 @@ static bool32 sub_80719FC(u8 *ptr); static void sub_8071B54(void); static void Task_8071B64(u8 taskId); -#ifdef DEBUG +#if DEBUG __attribute__((naked)) void debug_sub_8075C30() { diff --git a/src/pokemon/pokemon_1.c b/src/pokemon/pokemon_1.c index 079bcf489..fd4684832 100644 --- a/src/pokemon/pokemon_1.c +++ b/src/pokemon/pokemon_1.c @@ -524,7 +524,7 @@ void CalculateMonStats(struct Pokemon *mon) SetMonData(mon, MON_DATA_HP, ¤tHP); } -#ifdef DEBUG +#if DEBUG __attribute__((naked)) void debug_sub_803F55C() { diff --git a/src/rom3.c b/src/rom3.c index 0fe67dcec..efaa1d97f 100644 --- a/src/rom3.c +++ b/src/rom3.c @@ -67,7 +67,7 @@ void sub_800B858(void) } } -#ifdef DEBUG +#if DEBUG extern u8 gUnknown_02023A14_50; #endif @@ -98,7 +98,7 @@ void setup_poochyena_battle(void) gUnknown_020239FC = 0; gUnknown_02024C78 = 0; -#ifdef DEBUG +#if DEBUG if (gUnknown_02023A14_50 & 0x80) { ewram[0x160fd] = 0; diff --git a/src/rom6.c b/src/rom6.c index 1c0654538..b23f1c15a 100644 --- a/src/rom6.c +++ b/src/rom6.c @@ -117,7 +117,7 @@ static void sub_810B4CC(u8 taskId) DestroyTask(taskId); } -#ifdef DEBUG +#if DEBUG void debug_sub_8120968(void) { if (npc_before_player_of_type(MAP_OBJ_GFX_BREAKABLE_ROCK) == TRUE) diff --git a/src/scene/new_game.c b/src/scene/new_game.c index d954fb3c8..cec7134a3 100644 --- a/src/scene/new_game.c +++ b/src/scene/new_game.c @@ -31,7 +31,7 @@ #include "text.h" #include "tv.h" -#ifdef DEBUG +#if DEBUG extern u8 gUnknown_020297ED; #endif @@ -50,7 +50,7 @@ static const struct ContestWinner sEmptyMuseumPortrait = .trainerName = {EOS}, }; -#ifdef DEBUG +#if DEBUG const s8 gUnknown_Debug_0823C788[][2] = { { MAP_GROUP(INSIDE_OF_TRUCK), MAP_NUM(INSIDE_OF_TRUCK) }, @@ -114,7 +114,7 @@ void ZeroBattleTowerData(void) CpuFill32(0, &gSaveBlock2.battleTower, sizeof(gSaveBlock2.battleTower)); } -#ifdef DEBUG +#if DEBUG void debug_sub_8052E04() { u8 i; @@ -153,7 +153,7 @@ void ClearSav2(void) void sub_8052E4C(void) { gDifferentSaveFile = 0; -#ifdef DEBUG +#if DEBUG gUnknown_020297ED = 0; #endif sub_808C0A0(); @@ -209,7 +209,7 @@ void NewGameInitData(void) ScriptContext2_RunNewScript(gUnknown_0819FA81); } -#ifdef DEBUG +#if DEBUG extern void debug_sub_80A3904(void); extern void debug_sub_80A3714(void); extern void debug_sub_8120F98(void); diff --git a/src/scene/title_screen.c b/src/scene/title_screen.c index 8d5c4da13..4ff02d93c 100644 --- a/src/scene/title_screen.c +++ b/src/scene/title_screen.c @@ -831,7 +831,7 @@ static void Task_TitleScreenPhase3(u8 taskId) BeginNormalPaletteFade(-1, 0, 0, 0x10, 0); SetMainCallback2(CB2_GoToResetRtcScreen); } -#ifdef DEBUG +#if DEBUG else if (gMain.heldKeys == SELECT_BUTTON) { BeginNormalPaletteFade(-1, 0, 0, 16, 0); @@ -864,7 +864,7 @@ static void CB2_GoToMainMenu(void) SetMainCallback2(CB2_InitMainMenu); } -#ifdef DEBUG +#if DEBUG static void CB2_GoToTestMenu(void) { if (!UpdatePaletteFade()) |