Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add debug build target #4664

Closed
wants to merge 70 commits into from
Closed
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
bef2fca
inital port of BSBob's map pop-ups
Jan 10, 2024
143332e
update readme
Jan 10, 2024
499354d
fix performance issues, add config for alpha blend and 24 hour time, …
Jan 15, 2024
c0fe25c
forgot to remove gif as well
Jan 15, 2024
8041200
clean up extra space in graphics.c
Jan 15, 2024
6d2a869
add better support for theming, rename a few things to match vanilla
Jan 15, 2024
f67c012
fix dumb rtc mistake, disable blending when the weather conflicts wit…
Jan 24, 2024
5530eb7
merge with pret
ravepossum Apr 6, 2024
8098b6e
Merge with pret
ravepossum Apr 15, 2024
b4537e2
add configuration to remove the clock entirely
ravepossum Apr 15, 2024
406f87c
first stab at making configable BW map pop-ups in expansion
ravepossum Apr 15, 2024
7e4daea
rip out preprocs in favor of inlines, fix typo/wording
ravepossum Apr 15, 2024
8499f68
remove unnecessary ubfix check
ravepossum Apr 15, 2024
46f11ca
cleanup for bw theme
ravepossum Apr 15, 2024
a7701dd
fix BW theme table names
ravepossum Apr 15, 2024
0620ac3
add newline to end of config file
ravepossum Apr 16, 2024
86800d2
add restore newline at end of menu.c
ravepossum Apr 16, 2024
afb66b4
preproc assets, move config to overworld config, add some antialiasin…
ravepossum May 8, 2024
00b3e29
add debug build target
u8-Salem May 30, 2024
ebf57f5
fix maybe uninitialized error
u8-Salem May 31, 2024
5031acb
add option to undef NDEBUG
u8-Salem May 31, 2024
2c158ec
debug for agbcc
u8-Salem May 31, 2024
098ff93
init instead of ignore to not break agbcc
u8-Salem May 31, 2024
29bacfc
make clean removes modern and agbcc artifacts. explicit use of -O0 ag…
u8-Salem Jun 1, 2024
92bf7de
automatically enable debug menu when building for debug
u8-Salem Jun 1, 2024
fc81787
automatically enable debug menu when building for debug
u8-Salem Jun 1, 2024
2d93a92
automatically enable debug menu when building for debug
u8-Salem Jun 1, 2024
fc9a00e
Merge branch 'noopt' of github.com:u8-Salem/pokeemerald into noopt
u8-Salem Jun 1, 2024
e2b5a82
clean up previous mess omg
u8-Salem Jun 1, 2024
69b367e
PR feedback - 32 bit params, multiline condition formatting
ravepossum Jun 3, 2024
a14f166
remove preproc around debug menus
u8-Salem Jun 4, 2024
2180493
automatically enable debug menu when building for debug
u8-Salem Jun 1, 2024
db12b18
clean up previous mess omg
u8-Salem Jun 1, 2024
f084b56
remove preproc around debug menus
u8-Salem Jun 4, 2024
9a42cc3
Merge branch 'noopt' of github.com:u8-Salem/pokeemerald into noopt
u8-Salem Jun 4, 2024
e2d933b
Merge branch 'upcoming' into noopt
u8-Salem Jun 4, 2024
7fd0239
Rampage moves always confuse on final turn (#4722)
Sneed69 Jun 5, 2024
8e15603
Fix center crash (#4725)
Bassoonian Jun 5, 2024
d0a8e9f
Use AI_DATA->abilities in more places (#4729)
Sneed69 Jun 6, 2024
7f5afc2
Apply suggestions from code review
u8-Salem Jun 6, 2024
5770446
Update Makefile
u8-Salem Jun 6, 2024
dad462b
Update field_control_avatar.c
u8-Salem Jun 6, 2024
1241cbe
FIx mummy and lingering aroma abilities (#4731)
Sneed69 Jun 7, 2024
8b09ef0
Merge branch '_RHH/master' into _RHH/upcoming
AsparagusEduardo Jun 7, 2024
fa81861
Add newer generation Heal Bell interactions with Soundproof (#4732)
Sneed69 Jun 7, 2024
0a049ea
Add followers to readme & update migration script readme (#4719)
Bassoonian Jun 7, 2024
78f1da4
Adds 1 vs 2 macro (#4741)
AlexOn1ine Jun 8, 2024
d83f90d
Tera Shell AI calcs (#4742)
AlexOn1ine Jun 8, 2024
650127e
clean and generate src/data/map_group_count.h (#4727)
rayrobdod Jun 9, 2024
bbc0523
Make Pokémon Sprite Visualizer name official (#4745)
Bassoonian Jun 9, 2024
7df0219
BW2 Style Map Pop-Ups (#4396)
AsparagusEduardo Jun 9, 2024
911af21
Merge remote-tracking branch 'ravepossum/bsbob_map_popups' into _RHH/…
AsparagusEduardo Jun 9, 2024
43e4835
Fix conflicts with RavePossum's standalone BW pop up (#4752)
AlexOn1ine Jun 9, 2024
e68abd0
add debug build target
u8-Salem May 30, 2024
8b59a02
fix maybe uninitialized error
u8-Salem May 31, 2024
52438c3
add option to undef NDEBUG
u8-Salem May 31, 2024
5d0f8bc
debug for agbcc
u8-Salem May 31, 2024
007c467
init instead of ignore to not break agbcc
u8-Salem May 31, 2024
2950f4d
make clean removes modern and agbcc artifacts. explicit use of -O0 ag…
u8-Salem Jun 1, 2024
b7c195a
automatically enable debug menu when building for debug
u8-Salem Jun 1, 2024
e5d4827
automatically enable debug menu when building for debug
u8-Salem Jun 1, 2024
e325c79
automatically enable debug menu when building for debug
u8-Salem Jun 1, 2024
83a69d9
clean up previous mess omg
u8-Salem Jun 1, 2024
49e0dd4
remove preproc around debug menus
u8-Salem Jun 4, 2024
95ce876
automatically enable debug menu when building for debug
u8-Salem Jun 1, 2024
fad12d6
clean up previous mess omg
u8-Salem Jun 1, 2024
3e56417
Apply suggestions from code review
u8-Salem Jun 6, 2024
d2f1af4
Update Makefile
u8-Salem Jun 6, 2024
a0544a2
Update field_control_avatar.c
u8-Salem Jun 6, 2024
77870d0
Merge branch 'noopt' of github.com:u8-Salem/pokeemerald into noopt
u8-Salem Jun 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 50 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ MODERN ?= 1
TEST ?= 0
ANALYZE ?= 0
UNUSED_ERROR ?= 0
DEBUG ?= 0
u8-Salem marked this conversation as resolved.
Show resolved Hide resolved

ifeq (agbcc,$(MAKECMDGOALS))
MODERN := 0
Expand All @@ -53,6 +54,10 @@ ifeq (check,$(MAKECMDGOALS))
TEST := 1
endif

ifeq (debug,$(MAKECMDGOALS))
DEBUG := 1
endif

# use arm-none-eabi-cpp for macOS
# as macOS's default compiler is clang
# and clang's preprocessor will warn on \u
Expand Down Expand Up @@ -89,10 +94,16 @@ SYM = $(ROM:.gba=.sym)
TEST_OBJ_DIR_NAME_MODERN := build/modern-test
TEST_OBJ_DIR_NAME_AGBCC := build/test

DEBUG_OBJ_DIR_NAME_MODERN := build/modern-debug
DEBUG_OBJ_DIR_NAME_AGBCC := build/debug

ifeq ($(MODERN),0)
TEST_OBJ_DIR_NAME := $(TEST_OBJ_DIR_NAME_AGBCC)
DEBUG_OBJ_DIR_NAME := $(DEBUG_OBJ_DIR_NAME_AGBCC)
else
TEST_OBJ_DIR_NAME := $(TEST_OBJ_DIR_NAME_MODERN)
DEBUG_OBJ_DIR_NAME := $(DEBUG_OBJ_DIR_NAME_MODERN)

endif
TESTELF = $(ROM:.gba=-test.elf)
HEADLESSELF = $(ROM:.gba=-test-headless.elf)
Expand Down Expand Up @@ -120,14 +131,14 @@ ASFLAGS := -mcpu=arm7tdmi --defsym MODERN=$(MODERN)

ifeq ($(MODERN),0)
CC1 := tools/agbcc/bin/agbcc$(EXE)
override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm -g
override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -fhex-asm
ROM := $(ROM_NAME)
OBJ_DIR := $(OBJ_DIR_NAME)
LIBPATH := -L ../../tools/agbcc/lib
LIB := $(LIBPATH) -lgcc -lc -L../../libagbsyscall -lagbsyscall
else
CC1 = $(shell $(PATH_MODERNCC) --print-prog-name=cc1) -quiet
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast -std=gnu17 -Werror -Wall -Wno-strict-aliasing -Wno-attribute-alias -Woverride-init
override CFLAGS += -mthumb -mthumb-interwork -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast -std=gnu17 -Werror -Wall -Wno-strict-aliasing -Wno-attribute-alias -Woverride-init
ifeq ($(ANALYZE),1)
override CFLAGS += -fanalyzer
endif
Expand All @@ -143,19 +154,37 @@ LIBPATH := -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libgcc.a)
LIB := $(LIBPATH) -lc -lnosys -lgcc -L../../libagbsyscall -lagbsyscall
endif

ifeq ($(DEBUG),1)
ifeq ($(MODERN),1)
override CFLAGS += -Og -g
else
override CFLAGS += -O1 -g
endif
else
override CFLAGS += -O2
endif

ifeq ($(TESTELF),$(MAKECMDGOALS))
TEST := 1
endif

ifeq ($(TEST),1)
OBJ_DIR := $(TEST_OBJ_DIR_NAME)
endif
ifeq ($(DEBUG),1)
OBJ_DIR := $(DEBUG_OBJ_DIR_NAME)
endif


CPPFLAGS := -iquote include -iquote $(GFLIB_SUBDIR) -Wno-trigraphs -DMODERN=$(MODERN) -DTESTING=$(TEST)
ifneq ($(MODERN),1)
CPPFLAGS += -I tools/agbcc/include -I tools/agbcc -nostdinc -undef
endif

ifeq ($(DEBUG),1)
CPPFLAGS += -DDEBUG_TARGET
endif

SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c
GFX := tools/gbagfx/gbagfx$(EXE)
AIF := tools/aif2pcm/aif2pcm$(EXE)
Expand Down Expand Up @@ -191,15 +220,15 @@ MAKEFLAGS += --no-print-directory
# Secondary expansion is required for dependency variables in object rules.
.SECONDEXPANSION:

.PHONY: all rom clean compare tidy tools check-tools mostlyclean clean-tools clean-check-tools $(TOOLDIRS) $(CHECKTOOLDIRS) libagbsyscall agbcc modern tidymodern tidynonmodern check history
.PHONY: all rom clean compare tidy tools check-tools mostlyclean clean-tools clean-check-tools $(TOOLDIRS) $(CHECKTOOLDIRS) libagbsyscall agbcc modern tidymodern tidynonmodern check history debug

infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))

# Build tools when building the rom
# Disable dependency scanning for clean/tidy/tools
# Use a separate minimal makefile for speed
# Since we don't need to reload most of this makefile
ifeq (,$(filter-out all rom compare agbcc modern check libagbsyscall syms $(TESTELF),$(MAKECMDGOALS)))
ifeq (,$(filter-out all rom compare agbcc modern check libagbsyscall syms $(TESTELF) debug,$(MAKECMDGOALS)))
$(call infoshell, $(MAKE) -f make_tools.mk)
else
NODEP ?= 1
Expand Down Expand Up @@ -291,7 +320,7 @@ clean-tools:
clean-check-tools:
@$(foreach tooldir,$(CHECKTOOLDIRS),$(MAKE) clean -C $(tooldir);)

mostlyclean: tidynonmodern tidymodern tidycheck
mostlyclean: tidynonmodern tidymodern tidycheck tidydebug
find sound -iname '*.bin' -exec rm {} +
rm -f $(MID_SUBDIR)/*.s
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.rl' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} +
Expand All @@ -301,7 +330,7 @@ mostlyclean: tidynonmodern tidymodern tidycheck
rm -f $(AUTO_GEN_TARGETS)
@$(MAKE) clean -C libagbsyscall

tidy: tidynonmodern tidymodern tidycheck
tidy: tidynonmodern tidymodern tidycheck tidydebug

tidynonmodern:
rm -f $(ROM_NAME) $(ELF_NAME) $(MAP_NAME)
Expand All @@ -317,6 +346,10 @@ tidycheck:
rm -rf $(TEST_OBJ_DIR_NAME_AGBCC)


tidydebug:
rm -rf $(DEBUG_OBJ_DIR_NAME_MODERN)
rm -rf $(DEBUG_OBJ_DIR_NAME_AGBCC)

ifneq ($(MODERN),0)
$(C_BUILDDIR)/berry_crush.o: override CFLAGS += -Wno-address-of-packed-member
endif
Expand Down Expand Up @@ -375,6 +408,15 @@ ifeq ($(DINFO),1)
override CFLAGS += -g
endif

ifeq ($(NOOPT),1)
override CFLAGS := $(filter-out -O1 -Og -O2,$(CFLAGS))
override CFLAGS += -O0
endif

ifeq ($(DPRINT),1)
override CPPFLAGS += -DDEBUG_TARGET
endif

# The dep rules have to be explicit or else missing files won't be reported.
# As a side effect, they're evaluated immediately instead of when the rule is invoked.
# It doesn't look like $(shell) can be deferred so there might not be a better way.
Expand Down Expand Up @@ -513,6 +555,8 @@ agbcc: all

modern: all

debug: all

LD_SCRIPT_TEST := ld_script_test.ld

$(OBJ_DIR)/ld_script_test.ld: $(LD_SCRIPT_TEST) $(LD_SCRIPT_DEPS)
Expand Down
3 changes: 0 additions & 3 deletions data/scripts/debug.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.if DEBUG_OVERWORLD_MENU == TRUE
Debug_MessageEnd:
waitmessage
waitbuttonpress
Expand Down Expand Up @@ -430,5 +429,3 @@ Debug_EventScript_InflictStatus1_Text_Freeze:

Debug_EventScript_InflictStatus1_Text_Frostbite:
.string "Frostbite$"

.endif
4 changes: 4 additions & 0 deletions include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
// Ruby's actual debug build does not use the AGBPrint features.
#define NDEBUG

#ifdef DEBUG_TARGET
#undef NDEBUG
#endif

// To enable printf debugging, comment out "#define NDEBUG". This allows
Bassoonian marked this conversation as resolved.
Show resolved Hide resolved
// the various AGBPrint functions to be used. (See include/gba/isagbprint.h).
// See below for enabling different pretty printing versions.
Expand Down
18 changes: 15 additions & 3 deletions include/config/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,28 @@
#define GUARD_CONFIG_DEBUG_H

// Overworld Debug
#define DEBUG_OVERWORLD_MENU TRUE // Enables an overworld debug menu to change flags, variables, giving pokemon and more, accessed by holding R and pressing START while in the overworld by default.
#define DEBUG_OVERWORLD_MENU FALSE // Enables an overworld debug menu to change flags, variables, giving pokemon and more, accessed by holding R and pressing START while in the overworld by default.
#define DEBUG_OVERWORLD_HELD_KEYS (R_BUTTON) // The keys required to be held to open the debug menu.
#define DEBUG_OVERWORLD_TRIGGER_EVENT pressedStartButton // The event that opens the menu when holding the key(s) defined in DEBUG_OVERWORLD_HELD_KEYS.
#define DEBUG_OVERWORLD_IN_MENU FALSE // Replaces the overworld debug menu button combination with a start menu entry (above Pokédex).

// Battle Debug Menu
#define DEBUG_BATTLE_MENU TRUE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button.
#define DEBUG_BATTLE_MENU FALSE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button.
#define DEBUG_AI_DELAY_TIMER FALSE // If set to TRUE, displays the number of frames it takes for the AI to choose a move. Replaces the "What will PKMN do" text. Useful for devs or anyone who modifies the AI code and wants to see if it doesn't take too long to run.

// Pokémon Debug
#define DEBUG_POKEMON_MENU TRUE // Enables a debug menu for pokemon sprites and icons, accessed by pressing SELECT in the summary screen.
#define DEBUG_POKEMON_MENU FALSE // Enables a debug menu for pokemon sprites and icons, accessed by pressing SELECT in the summary screen.

// Automatically enable all debug menus if building with debug target
#ifdef DEBUG_TARGET
#undef DEBUG_OVERWORLD_MENU
#define DEBUG_OVERWORLD_MENU TRUE

#undef DEBUG_BATTLE_MENU
#define DEBUG_BATTLE_MENU TRUE

#undef DEBUG_POKEMON_MENU
#define DEBUG_POKEMON_MENU TRUE
#endif

#endif // GUARD_CONFIG_DEBUG_H
4 changes: 1 addition & 3 deletions src/battle_ai_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,12 @@ void BattleAI_SetupFlags(void)
else
AI_THINKING_STRUCT->aiFlags[B_POSITION_PLAYER_LEFT] = 0; // player has no AI

#if DEBUG_OVERWORLD_MENU == TRUE
if (gIsDebugBattle)
if (DEBUG_OVERWORLD_MENU && gIsDebugBattle)
{
AI_THINKING_STRUCT->aiFlags[B_POSITION_OPPONENT_LEFT] = gDebugAIFlags;
AI_THINKING_STRUCT->aiFlags[B_POSITION_OPPONENT_RIGHT] = gDebugAIFlags;
return;
}
#endif

if (IsWildMonSmart() && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_TRAINER)))
{
Expand Down
4 changes: 1 addition & 3 deletions src/battle_controller_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,13 +413,11 @@ static void HandleInputChooseAction(u32 battler)
{
SwapHpBarsWithHpText();
}
#if DEBUG_BATTLE_MENU == TRUE
else if (JOY_NEW(SELECT_BUTTON))
else if (JOY_NEW(SELECT_BUTTON) && DEBUG_BATTLE_MENU)
u8-Salem marked this conversation as resolved.
Show resolved Hide resolved
{
BtlController_EmitTwoReturnValues(battler, BUFFER_B, B_ACTION_DEBUG, 0);
PlayerBufferExecCompleted(battler);
}
#endif
#if B_LAST_USED_BALL == TRUE && B_LAST_USED_BALL_CYCLE == FALSE
else if (JOY_NEW(B_LAST_USED_BALL_BUTTON) && CanThrowLastUsedBall())
{
Expand Down
8 changes: 2 additions & 6 deletions src/battle_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,7 @@ static void CB2_InitBattleInternal(void)
gBattle_BG3_X = 0;
gBattle_BG3_Y = 0;

#if DEBUG_OVERWORLD_MENU == TRUE
if (!gIsDebugBattle)
#endif
if ((DEBUG_OVERWORLD_MENU && !gIsDebugBattle) || !DEBUG_OVERWORLD_MENU)
u8-Salem marked this conversation as resolved.
Show resolved Hide resolved
{
gBattleTerrain = BattleSetup_GetTerrainId();
}
Expand Down Expand Up @@ -550,9 +548,7 @@ static void CB2_InitBattleInternal(void)
else
SetMainCallback2(CB2_HandleStartBattle);

#if DEBUG_OVERWORLD_MENU == TRUE
if (!gIsDebugBattle)
#endif
if ((DEBUG_OVERWORLD_MENU && !gIsDebugBattle) || !DEBUG_OVERWORLD_MENU)
u8-Salem marked this conversation as resolved.
Show resolved Hide resolved
{
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED)))
{
Expand Down
3 changes: 0 additions & 3 deletions src/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
#include "constants/weather.h"
#include "save.h"

#if DEBUG_OVERWORLD_MENU == TRUE
// *******************************
enum DebugMenu
{
Expand Down Expand Up @@ -5112,5 +5111,3 @@ static void DebugAction_Party_ClearParty(u8 taskId)
ScriptContext_Enable();
Debug_DestroyMenu_Full(taskId);
}

#endif //DEBUG_OVERWORLD_MENU == TRUE
26 changes: 14 additions & 12 deletions src/field_control_avatar.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,14 @@ void FieldGetPlayerInput(struct FieldInput *input, u16 newKeys, u16 heldKeys)
else if (heldKeys & DPAD_RIGHT)
input->dpadDirection = DIR_EAST;

#if DEBUG_OVERWORLD_MENU == TRUE && DEBUG_OVERWORLD_IN_MENU == FALSE
if ((heldKeys & DEBUG_OVERWORLD_HELD_KEYS) && input->DEBUG_OVERWORLD_TRIGGER_EVENT)
if(DEBUG_OVERWORLD_MENU && !DEBUG_OVERWORLD_IN_MENU)
{
input->input_field_1_2 = TRUE;
input->DEBUG_OVERWORLD_TRIGGER_EVENT = FALSE;
if ((heldKeys & DEBUG_OVERWORLD_HELD_KEYS) && input->DEBUG_OVERWORLD_TRIGGER_EVENT)
{
input->input_field_1_2 = TRUE;
input->DEBUG_OVERWORLD_TRIGGER_EVENT = FALSE;
}
}
#endif
}

int ProcessPlayerFieldInput(struct FieldInput *input)
Expand Down Expand Up @@ -200,15 +201,16 @@ int ProcessPlayerFieldInput(struct FieldInput *input)
if (input->pressedSelectButton && UseRegisteredKeyItemOnField() == TRUE)
return TRUE;

#if DEBUG_OVERWORLD_MENU == TRUE && DEBUG_OVERWORLD_IN_MENU == FALSE
if (input->input_field_1_2)
if(DEBUG_OVERWORLD_MENU && !DEBUG_OVERWORLD_IN_MENU)
{
PlaySE(SE_WIN_OPEN);
FreezeObjectEvents();
Debug_ShowMainMenu();
return TRUE;
if (input->input_field_1_2)
u8-Salem marked this conversation as resolved.
Show resolved Hide resolved
{
PlaySE(SE_WIN_OPEN);
FreezeObjectEvents();
Debug_ShowMainMenu();
return TRUE;
}
}
#endif

return FALSE;
}
Expand Down
2 changes: 1 addition & 1 deletion src/librfu_rfu.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ static void rfu_CB_pollConnectParent(u8 reqCommand, u16 reqResult)
u16 id;
u8 slot;
u8 bm_slot_flag, i;
struct RfuTgtData *target_p;
struct RfuTgtData *target_p = NULL;
struct RfuTgtData target_local;

if (reqResult == 0)
Expand Down
3 changes: 0 additions & 3 deletions src/pokemon_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include "constants/items.h"
#include "constants/event_objects.h"

#if DEBUG_POKEMON_MENU == TRUE
extern const struct BattleBackground sBattleTerrainTable[];
extern const struct CompressedSpriteSheet gSpriteSheet_EnemyShadow;
extern const struct SpriteTemplate gSpriteTemplate_EnemyShadow;
Expand Down Expand Up @@ -1763,5 +1762,3 @@ static void Exit_Debug_Pokemon(u8 taskId)
m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100);
}
}

#endif
4 changes: 1 addition & 3 deletions src/pokemon_summary_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1640,15 +1640,13 @@ static void Task_HandleInput(u8 taskId)
PlaySE(SE_SELECT);
BeginCloseSummaryScreen(taskId);
}
#if DEBUG_POKEMON_MENU == TRUE
else if (JOY_NEW(SELECT_BUTTON) && !gMain.inBattle)
else if (JOY_NEW(SELECT_BUTTON) && !gMain.inBattle && DEBUG_POKEMON_MENU)
u8-Salem marked this conversation as resolved.
Show resolved Hide resolved
{
sMonSummaryScreen->callback = CB2_Debug_Pokemon;
StopPokemonAnimations();
PlaySE(SE_SELECT);
CloseSummaryScreen(taskId);
}
#endif
}
}

Expand Down
9 changes: 5 additions & 4 deletions src/start_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,10 +784,11 @@ static bool8 StartMenuDebugCallback(void)
RemoveExtraStartMenuWindows();
HideStartMenuDebug(); // Hide start menu without enabling movement

#if DEBUG_OVERWORLD_MENU == TRUE
FreezeObjectEvents();
Debug_ShowMainMenu();
#endif
if (DEBUG_OVERWORLD_MENU)
{
FreezeObjectEvents();
Debug_ShowMainMenu();
}

return TRUE;
}
Expand Down
Loading