mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-03-21 18:04:50 -05:00
Fix free match call compile fail (#9416)
This commit is contained in:
parent
e9040d6327
commit
87078e355d
|
|
@ -21,4 +21,9 @@ void LoadMatchCallWindowGfx(u32 windowId, u32 destOffset, u32 paletteId);
|
|||
void DrawMatchCallTextBoxBorder(u32 windowId, u32 tileOffset, u32 paletteId);
|
||||
void RedrawMatchCallTextBoxBorder(void);
|
||||
|
||||
bool32 GetActiveTrainerRematches(u32 matchCallId);
|
||||
void SetActiveTrainerRematches(u32 matchCallId, u32 value);
|
||||
u32 GetTrainerRematchStepCounter(void);
|
||||
void SetTrainerRematchStepCounter(u32 value);
|
||||
|
||||
#endif //GUARD_MATCH_CALL_H
|
||||
|
|
|
|||
17
src/debug.c
17
src/debug.c
|
|
@ -26,6 +26,7 @@
|
|||
#include "m4a.h"
|
||||
#include "main.h"
|
||||
#include "main_menu.h"
|
||||
#include "match_call.h"
|
||||
#include "malloc.h"
|
||||
#include "map_name_popup.h"
|
||||
#include "menu.h"
|
||||
|
|
@ -1082,18 +1083,18 @@ static u8 Debug_GenerateListTrainerMenu(void)
|
|||
}
|
||||
break;
|
||||
case 6:
|
||||
if (I_VS_SEEKER_CHARGING || !isRealFight || rematchTableId == -1)
|
||||
if (FREE_MATCH_CALL || I_VS_SEEKER_CHARGING || !isRealFight || rematchTableId == -1)
|
||||
{
|
||||
noDraw = TRUE;
|
||||
break;
|
||||
}
|
||||
if (gSaveBlock1Ptr->trainerRematches[rematchTableId])
|
||||
if (GetActiveTrainerRematches(rematchTableId))
|
||||
StringCopy(gStringVar1, COMPOUND_STRING("{COLOR GREEN} TRUE"));
|
||||
else
|
||||
StringCopy(gStringVar1, COMPOUND_STRING("{COLOR RED} FALSE"));
|
||||
break;
|
||||
case 8:
|
||||
if (I_VS_SEEKER_CHARGING == 0)
|
||||
if (FREE_MATCH_CALL || I_VS_SEEKER_CHARGING == 0)
|
||||
noDraw = TRUE;
|
||||
break;
|
||||
}
|
||||
|
|
@ -2140,12 +2141,12 @@ static void DebugAction_Trainers_SetRematch(u8 taskId)
|
|||
|
||||
static void DebugAction_Trainers_SetRematchReadiness(u8 taskId)
|
||||
{
|
||||
if (gSaveBlock1Ptr->trainerRematches[sDebugMenuListData->data[1]] == -1)
|
||||
if (sDebugMenuListData->data[1] == -1)
|
||||
return;
|
||||
if (gSaveBlock1Ptr->trainerRematches[sDebugMenuListData->data[1]])
|
||||
gSaveBlock1Ptr->trainerRematches[sDebugMenuListData->data[1]] = FALSE;
|
||||
if (GetActiveTrainerRematches(sDebugMenuListData->data[1]))
|
||||
SetActiveTrainerRematches(sDebugMenuListData->data[1], FALSE);
|
||||
else
|
||||
gSaveBlock1Ptr->trainerRematches[sDebugMenuListData->data[1]] = TRUE;
|
||||
SetActiveTrainerRematches(sDebugMenuListData->data[1], TRUE);
|
||||
}
|
||||
|
||||
static void DebugAction_Trainers_TryBattle(u8 taskId)
|
||||
|
|
@ -2192,7 +2193,7 @@ static void DebugAction_Trainers_TryBattle(u8 taskId)
|
|||
|
||||
static void DebugAction_Trainers_RechargeVsSeeker(u8 taskId)
|
||||
{
|
||||
gSaveBlock1Ptr->trainerRematchStepCounter = VSSEEKER_RECHARGE_STEPS;
|
||||
SetTrainerRematchStepCounter(VSSEEKER_RECHARGE_STEPS);
|
||||
MapResetTrainerRematches(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum);
|
||||
ScriptContext_SetupScript(EventScript_VsSeekerChargingDone);
|
||||
Debug_DestroyMenu_Full(taskId);
|
||||
|
|
|
|||
|
|
@ -2041,3 +2041,35 @@ void DrawMatchCallTextBoxBorder(u32 windowId, u32 tileOffset, u32 paletteId)
|
|||
{
|
||||
DrawMatchCallTextBoxBorder_Internal(windowId, tileOffset, paletteId);
|
||||
}
|
||||
|
||||
u32 GetTrainerRematchStepCounter(void)
|
||||
{
|
||||
#if FREE_MATCH_CALL == FALSE
|
||||
return gSaveBlock1Ptr->trainerRematchStepCounter;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetTrainerRematchStepCounter(u32 value)
|
||||
{
|
||||
#if FREE_MATCH_CALL == FALSE
|
||||
gSaveBlock1Ptr->trainerRematchStepCounter = value;
|
||||
#endif
|
||||
}
|
||||
|
||||
u32 GetActiveTrainerRematches(u32 matchCallId)
|
||||
{
|
||||
#if FREE_MATCH_CALL == FALSE
|
||||
return gSaveBlock1Ptr->trainerRematches[matchCallId];
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetActiveTrainerRematches(u32 matchCallId, u32 value)
|
||||
{
|
||||
#if FREE_MATCH_CALL == FALSE
|
||||
gSaveBlock1Ptr->trainerRematches[matchCallId] = value;
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user