mirror of
https://github.com/pret/pokefirered.git
synced 2026-09-30 21:10:27 -05:00
changes to debug
This commit is contained in:
3
Makefile
3
Makefile
@@ -464,6 +464,9 @@ $(ROM): $(ELF)
|
||||
$(OBJCOPY) -O binary $< $@
|
||||
$(FIX) $@ -p --silent
|
||||
|
||||
firered: ; @$(MAKE) GAME_VERSION=FIRERED
|
||||
leafgreen: ; @$(MAKE) GAME_VERSION=LEAFGREEN
|
||||
|
||||
# Symbol file (`make syms`)
|
||||
$(SYM): $(ELF)
|
||||
$(OBJDUMP) -t $< | sort -u | grep -E "^0[2389]" | $(PERL) -p -e 's/^(\w{8}) (\w).{6} \S+\t(\w{8}) (\S+)$$/\1 \2 \3 \4/g' > $@
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
.if DEBUG_OVERWORLD_MENU == TRUE
|
||||
Debug_MessageEnd:
|
||||
waitmessage
|
||||
waitbuttonpress
|
||||
@@ -418,5 +417,3 @@ Debug_EventScript_InflictStatus1_Text_Freeze:
|
||||
|
||||
Debug_EventScript_InflictStatus1_Text_Frostbite:
|
||||
.string "Frostbite$"
|
||||
|
||||
.endif
|
||||
|
||||
@@ -536,9 +536,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 || (DEBUG_OVERWORLD_MENU && !gIsDebugBattle))
|
||||
{
|
||||
gBattleTerrain = BattleSetup_GetTerrainId();
|
||||
}
|
||||
@@ -571,9 +569,7 @@ static void CB2_InitBattleInternal(void)
|
||||
else
|
||||
SetMainCallback2(CB2_HandleStartBattle);
|
||||
|
||||
#if DEBUG_OVERWORLD_MENU == TRUE
|
||||
if (!gIsDebugBattle)
|
||||
#endif
|
||||
if (!DEBUG_OVERWORLD_MENU || (DEBUG_OVERWORLD_MENU && !gIsDebugBattle))
|
||||
{
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED)))
|
||||
{
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
#include "constants/weather.h"
|
||||
#include "save.h"
|
||||
|
||||
#if DEBUG_OVERWORLD_MENU == TRUE
|
||||
// *******************************
|
||||
enum DebugMenu
|
||||
{
|
||||
@@ -4449,5 +4448,3 @@ static void DebugAction_Party_ClearParty(u8 taskId)
|
||||
ScriptContext_Enable();
|
||||
Debug_DestroyMenu_Full(taskId);
|
||||
}
|
||||
|
||||
#endif //DEBUG_OVERWORLD_MENU == TRUE
|
||||
|
||||
@@ -155,14 +155,15 @@ void FieldGetPlayerInput(struct FieldInput *input, u16 newKeys, u16 heldKeys)
|
||||
input->dpadDirection = DIR_WEST;
|
||||
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
|
||||
}
|
||||
|
||||
}
|
||||
@@ -307,15 +308,13 @@ int ProcessPlayerFieldInput(struct FieldInput *input)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if DEBUG_OVERWORLD_MENU == TRUE && DEBUG_OVERWORLD_IN_MENU == FALSE
|
||||
if (input->input_field_1_2)
|
||||
if(input->input_field_1_2 && DEBUG_OVERWORLD_MENU && !DEBUG_OVERWORLD_IN_MENU)
|
||||
{
|
||||
PlaySE(SE_WIN_OPEN);
|
||||
FreezeObjectEvents();
|
||||
Debug_ShowMainMenu();
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -756,7 +756,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)
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
#include "constants/items.h"
|
||||
#include "constants/event_objects.h"
|
||||
|
||||
#if DEBUG_POKEMON_SPRITE_VISUALIZER == TRUE
|
||||
extern const struct BattleTerrain gBattleTerrainInfo[BATTLE_TERRAIN_COUNT];
|
||||
extern const struct CompressedSpriteSheet gSpriteSheet_EnemyShadow;
|
||||
extern const struct SpriteTemplate gSpriteTemplate_EnemyShadow;
|
||||
@@ -1726,5 +1725,3 @@ static void Exit_PokemonSpriteVisualizer(u8 taskId)
|
||||
m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1267,16 +1267,13 @@ static void Task_InputHandler_Info(u8 taskId)
|
||||
{
|
||||
sMonSummaryScreen->state3270 = PSS_STATE3270_ATEXIT_FADEOUT;
|
||||
}
|
||||
#if DEBUG_POKEMON_SPRITE_VISUALIZER == TRUE
|
||||
else if (JOY_NEW(SELECT_BUTTON) && !gMain.inBattle)
|
||||
else if (DEBUG_POKEMON_SPRITE_VISUALIZER && JOY_NEW(SELECT_BUTTON) && !gMain.inBattle)
|
||||
{
|
||||
sMonSummaryScreen->savedCallback = CB2_Pokemon_Sprite_Visualizer;
|
||||
// StopPokemonAnimations();
|
||||
PlaySE(SE_SELECT);
|
||||
// CloseSummaryScreen(taskId);
|
||||
sMonSummaryScreen->state3270 = PSS_STATE3270_ATEXIT_FADEOUT;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case PSS_STATE3270_FLIPPAGES:
|
||||
|
||||
@@ -222,7 +222,7 @@ static void SetUpStartMenu(void)
|
||||
SetUpStartMenu_UnionRoom();
|
||||
else if (GetSafariZoneFlag() == TRUE)
|
||||
SetUpStartMenu_SafariZone();
|
||||
else if (DEBUG_OVERWORLD_MENU == TRUE && DEBUG_OVERWORLD_IN_MENU == TRUE)
|
||||
else if (DEBUG_OVERWORLD_MENU && DEBUG_OVERWORLD_IN_MENU)
|
||||
SetUpStartMenu_Debug();
|
||||
else
|
||||
SetUpStartMenu_NormalField();
|
||||
@@ -401,12 +401,8 @@ static s8 DoDrawStartMenu(void)
|
||||
break;
|
||||
case 6:
|
||||
sStartMenuCursorPos = InitMenuNormal(GetStartMenuWindowId(), FONT_NORMAL, 0, 0, 15, sNumStartMenuItems, sStartMenuCursorPos);
|
||||
if (!MenuHelpers_IsLinkActive() && InUnionRoom() != TRUE && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_HELP)
|
||||
{
|
||||
#if DEBUG_OVERWORLD_MENU != TRUE
|
||||
if (DEBUG_OVERWORLD_MENU != TRUE && !MenuHelpers_IsLinkActive() && InUnionRoom() != TRUE && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_HELP)
|
||||
DrawHelpMessageWindowWithText(sStartMenuDescPointers[sStartMenuOrder[sStartMenuCursorPos]]);
|
||||
#endif
|
||||
}
|
||||
CopyWindowToVram(GetStartMenuWindowId(), COPYWIN_MAP);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -487,22 +483,16 @@ static bool8 StartCB_HandleInput(void)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
sStartMenuCursorPos = Menu_MoveCursor(-1);
|
||||
if (!MenuHelpers_IsLinkActive() && InUnionRoom() != TRUE && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_HELP)
|
||||
{
|
||||
#if DEBUG_OVERWORLD_MENU != TRUE
|
||||
if (DEBUG_OVERWORLD_MENU != TRUE && !MenuHelpers_IsLinkActive() && InUnionRoom() != TRUE && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_HELP)
|
||||
PrintTextOnHelpMessageWindow(sStartMenuDescPointers[sStartMenuOrder[sStartMenuCursorPos]], 2);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (JOY_NEW(DPAD_DOWN))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
sStartMenuCursorPos = Menu_MoveCursor(+1);
|
||||
if (!MenuHelpers_IsLinkActive() && InUnionRoom() != TRUE && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_HELP)
|
||||
if (DEBUG_OVERWORLD_MENU != TRUE && !MenuHelpers_IsLinkActive() && InUnionRoom() != TRUE && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_HELP)
|
||||
{
|
||||
#if DEBUG_OVERWORLD_MENU != TRUE
|
||||
PrintTextOnHelpMessageWindow(sStartMenuDescPointers[sStartMenuOrder[sStartMenuCursorPos]], 2);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
@@ -517,9 +507,8 @@ static bool8 StartCB_HandleInput(void)
|
||||
if (JOY_NEW(B_BUTTON | START_BUTTON))
|
||||
{
|
||||
DestroySafariZoneStatsWindow();
|
||||
#if DEBUG_OVERWORLD_MENU != TRUE
|
||||
DestroyHelpMessageWindow_();
|
||||
#endif
|
||||
if (DEBUG_OVERWORLD_MENU != TRUE)
|
||||
DestroyHelpMessageWindow_();
|
||||
CloseStartMenu();
|
||||
return TRUE;
|
||||
}
|
||||
@@ -621,9 +610,8 @@ static bool8 StartMenuOptionCallback(void)
|
||||
static bool8 StartMenuExitCallback(void)
|
||||
{
|
||||
DestroySafariZoneStatsWindow();
|
||||
#if DEBUG_OVERWORLD_MENU != TRUE
|
||||
DestroyHelpMessageWindow_();
|
||||
#endif
|
||||
if (DEBUG_OVERWORLD_MENU != TRUE)
|
||||
DestroyHelpMessageWindow_();
|
||||
CloseStartMenu();
|
||||
return TRUE;
|
||||
}
|
||||
@@ -633,19 +621,19 @@ static bool8 StartMenuDebugCallback(void)
|
||||
DestroySafariZoneStatsWindow();
|
||||
HideStartMenuDebug(); // Hide start menu without enabling movement
|
||||
|
||||
#if DEBUG_OVERWORLD_MENU == TRUE
|
||||
FreezeObjectEvents();
|
||||
Debug_ShowMainMenu();
|
||||
#endif
|
||||
if (DEBUG_OVERWORLD_MENU == TRUE)
|
||||
{
|
||||
FreezeObjectEvents();
|
||||
Debug_ShowMainMenu();
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool8 StartMenuSafariZoneRetireCallback(void)
|
||||
{
|
||||
DestroySafariZoneStatsWindow();
|
||||
#if DEBUG_OVERWORLD_MENU != TRUE
|
||||
DestroyHelpMessageWindow_();
|
||||
#endif
|
||||
if (DEBUG_OVERWORLD_MENU != TRUE)
|
||||
DestroyHelpMessageWindow_();
|
||||
CloseStartMenu();
|
||||
SafariZoneRetirePrompt();
|
||||
return TRUE;
|
||||
@@ -815,9 +803,8 @@ static u8 SaveDialogCB_PrintAskSaveText(void)
|
||||
{
|
||||
ClearStdWindowAndFrame(GetStartMenuWindowId(), FALSE);
|
||||
RemoveStartMenuWindow();
|
||||
#if DEBUG_OVERWORLD_MENU != TRUE
|
||||
DestroyHelpMessageWindow(0);
|
||||
#endif
|
||||
if (DEBUG_OVERWORLD_MENU != TRUE)
|
||||
DestroyHelpMessageWindow(0);
|
||||
PrintSaveStats();
|
||||
PrintSaveTextWithFollowupFunc(gText_WouldYouLikeToSaveTheGame, SaveDialogCB_AskSavePrintYesNoMenu);
|
||||
return SAVECB_RETURN_CONTINUE;
|
||||
|
||||
Reference in New Issue
Block a user