From a36445ea11cb889dba82fffe1f91699ac3a9e147 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Thu, 2 Dec 2021 18:16:41 +0100 Subject: [PATCH] Changed opening to summary screen SELECT --- src/field_control_avatar.c | 24 ------------------------ src/pokemon_summary_screen.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index c3fb5edd9..6ec280fd0 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -20,7 +20,6 @@ #include "metatile_behavior.h" #include "overworld.h" #include "pokemon.h" -#include "pokemon_debug.h" #include "safari_zone.h" #include "script.h" #include "secret_base.h" @@ -131,14 +130,6 @@ void FieldGetPlayerInput(struct FieldInput *input, u16 newKeys, u16 heldKeys) input->dpadDirection = DIR_WEST; else if (heldKeys & DPAD_RIGHT) input->dpadDirection = DIR_EAST; - - #ifdef P_ENABLE_DEBUG - if ((heldKeys & R_BUTTON) && input->pressedStartButton) - { - input->input_field_1_2 = TRUE; - input->pressedStartButton = FALSE; - } - #endif } int ProcessPlayerFieldInput(struct FieldInput *input) @@ -198,21 +189,6 @@ int ProcessPlayerFieldInput(struct FieldInput *input) if (input->pressedSelectButton && UseRegisteredKeyItemOnField() == TRUE) return TRUE; - - #ifdef P_ENABLE_DEBUG - if (input->input_field_1_2) - { - //PlaySE(SE_WIN_OPEN); - //Debug_ShowMainMenu(); - - //PlayRainStoppingSoundEffect(); - CleanupOverworldWindowsAndTilemaps(); - SetMainCallback2(CB2_Debug_Pokemon); - - return TRUE; - } - #endif - return FALSE; } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 3ffd612ac..5545feab9 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -28,6 +28,7 @@ #include "palette.h" #include "pokeball.h" #include "pokemon.h" +#include "pokemon_debug.h" #include "pokemon_storage_system.h" #include "pokemon_summary_screen.h" #include "region_map.h" @@ -1555,6 +1556,15 @@ static void Task_HandleInput(u8 taskId) PlaySE(SE_SELECT); BeginCloseSummaryScreen(taskId); } + #ifdef P_ENABLE_DEBUG + else if (JOY_NEW(SELECT_BUTTON)) + { + sMonSummaryScreen->callback = CB2_Debug_Pokemon; + StopPokemonAnimations(); + PlaySE(SE_SELECT); + CloseSummaryScreen(taskId); + } + #endif } }