feat: try adding a debug menu

This commit is contained in:
2022-05-25 13:40:25 +00:00
parent d754515c78
commit 8980f61306
5 changed files with 161 additions and 0 deletions

View File

@ -3,6 +3,7 @@
#include "bike.h"
#include "coord_event_weather.h"
#include "daycare.h"
#include "debug.h"
#include "faraway_island.h"
#include "event_data.h"
#include "event_object_movement.h"
@ -132,6 +133,14 @@ void FieldGetPlayerInput(struct FieldInput *input, u16 newKeys, u16 heldKeys)
input->dpadDirection = DIR_WEST;
else if (heldKeys & DPAD_RIGHT)
input->dpadDirection = DIR_EAST;
#if DEBUG
if ((heldKeys & R_BUTTON) && input->pressedStartButton)
{
input->input_field_1_2 = TRUE;
input->pressedStartButton = FALSE;
}
#endif
}
int ProcessPlayerFieldInput(struct FieldInput *input)
@ -194,6 +203,15 @@ int ProcessPlayerFieldInput(struct FieldInput *input)
if (input->pressedRButton && EnableAutoRun())
return TRUE;
#if DEBUG
if (input->input_field_1_2)
{
PlaySE(SE_WIN_OPEN);
Debug_ShowMainMenu();
return TRUE;
}
#endif
return FALSE;
}