mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-19 01:44:20 +01:00
Changed preproc defines to TRUE/FALSE, small cleanup
This commit is contained in:
parent
8c9a59ec1c
commit
bed5639074
@ -1,8 +1,8 @@
|
||||
#ifndef GUARD_DEBUG_H
|
||||
#define GUARD_DEBUG_H
|
||||
|
||||
#define TX_DEBUGGING
|
||||
#define TX_DEBUG_MENU_OPTION FALSE
|
||||
#define TX_DEBUG_SYSTEM TRUE // Enables a overworld debug menu for changing flags, variables, giving pokemon and more, accessed by pressing R plus START.
|
||||
#define TX_DEBUG_SYSTEM_IN_MENU FALSE // Replaces the overworld debug menu button combination with a start menu entry (replaces the exit entry).
|
||||
|
||||
|
||||
void Debug_ShowMainMenu(void);
|
||||
|
@ -4001,21 +4001,25 @@ static void HandleTurnActionSelectionState(void)
|
||||
}
|
||||
break;
|
||||
case B_ACTION_USE_ITEM:
|
||||
#ifdef TX_DEBUGGING
|
||||
if (FlagGet(FLAG_SYS_NO_BAG_USE) || (gBattleTypeFlags & (BATTLE_TYPE_LINK //DEBUG
|
||||
#if TX_DEBUG_SYSTEM == TRUE
|
||||
if (FlagGet(FLAG_SYS_NO_BAG_USE))
|
||||
{
|
||||
RecordedBattle_ClearBattlerAction(gActiveBattler, 1);
|
||||
gSelectionBattleScripts[gActiveBattler] = BattleScript_ActionSelectionItemsCantBeUsed;
|
||||
gBattleCommunication[gActiveBattler] = STATE_SELECTION_SCRIPT;
|
||||
*(gBattleStruct->selectionScriptFinished + gActiveBattler) = FALSE;
|
||||
*(gBattleStruct->stateIdAfterSelScript + gActiveBattler) = STATE_BEFORE_ACTION_CHOSEN;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((gBattleTypeFlags & (BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_FRONTIER_NO_PYRAMID
|
||||
| BATTLE_TYPE_EREADER_TRAINER
|
||||
| BATTLE_TYPE_RECORDED_LINK))
|
||||
// Or if currently held by Sky Drop
|
||||
|| gStatuses3[gActiveBattler] & STATUS3_SKY_DROPPED)
|
||||
{
|
||||
#else //DEBUG
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_FRONTIER_NO_PYRAMID
|
||||
| BATTLE_TYPE_EREADER_TRAINER
|
||||
| BATTLE_TYPE_RECORDED_LINK))
|
||||
{
|
||||
#endif
|
||||
RecordedBattle_ClearBattlerAction(gActiveBattler, 1);
|
||||
gSelectionBattleScripts[gActiveBattler] = BattleScript_ActionSelectionItemsCantBeUsed;
|
||||
gBattleCommunication[gActiveBattler] = STATE_SELECTION_SCRIPT;
|
||||
|
@ -4630,7 +4630,7 @@ u8 GetCollisionAtCoords(struct ObjectEvent *objectEvent, s16 x, s16 y, u32 dir)
|
||||
{
|
||||
u8 direction = dir;
|
||||
|
||||
#ifdef TX_DEBUGGING //DEBUG
|
||||
#if TX_DEBUG_SYSTEM == TRUE
|
||||
if (FlagGet(FLAG_SYS_NO_COLLISION))
|
||||
return COLLISION_NONE;
|
||||
#endif //
|
||||
|
@ -131,10 +131,7 @@ void FieldGetPlayerInput(struct FieldInput *input, u16 newKeys, u16 heldKeys)
|
||||
else if (heldKeys & DPAD_RIGHT)
|
||||
input->dpadDirection = DIR_EAST;
|
||||
|
||||
//DEBUG
|
||||
#ifdef TX_DEBUGGING
|
||||
if (!TX_DEBUG_MENU_OPTION)
|
||||
{
|
||||
#if TX_DEBUG_SYSTEM == TRUE && TX_DEBUG_SYSTEM_IN_MENU == FALSE
|
||||
if (heldKeys & R_BUTTON)
|
||||
{
|
||||
if(input->pressedSelectButton)
|
||||
@ -159,7 +156,6 @@ void FieldGetPlayerInput(struct FieldInput *input, u16 newKeys, u16 heldKeys)
|
||||
input->pressedStartButton = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -220,16 +216,13 @@ int ProcessPlayerFieldInput(struct FieldInput *input)
|
||||
if (input->pressedSelectButton && UseRegisteredKeyItemOnField() == TRUE)
|
||||
return TRUE;
|
||||
|
||||
#ifdef TX_DEBUGGING
|
||||
if (!TX_DEBUG_MENU_OPTION)
|
||||
{
|
||||
#if TX_DEBUG_SYSTEM == TRUE && TX_DEBUG_SYSTEM_IN_MENU == FALSE
|
||||
if (input->input_field_1_2)
|
||||
{
|
||||
PlaySE(SE_WIN_OPEN);
|
||||
Debug_ShowMainMenu();
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return FALSE;
|
||||
@ -712,9 +705,9 @@ void RestartWildEncounterImmunitySteps(void)
|
||||
|
||||
static bool8 CheckStandardWildEncounter(u16 metatileBehavior)
|
||||
{
|
||||
#ifdef TX_DEBUGGING
|
||||
if (FlagGet(FLAG_SYS_NO_ENCOUNTER)) //DEBUG
|
||||
return FALSE;//
|
||||
#if TX_DEBUG_SYSTEM == TRUE
|
||||
if (FlagGet(FLAG_SYS_NO_ENCOUNTER))
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
if (sWildEncounterImmunitySteps < 4)
|
||||
|
@ -982,8 +982,8 @@ static const u8 sText_CantThrowPokeBall_TwoMons[] = _("Cannot throw a ball!\nThe
|
||||
static const u8 sText_CantThrowPokeBall_SemiInvulnerable[] = _("Cannot throw a ball!\nThere's no Pokémon in sight!\p");
|
||||
void ItemUseInBattle_PokeBall(u8 taskId)
|
||||
{
|
||||
#ifdef TX_DEBUGGING
|
||||
if (FlagGet(FLAG_SYS_NO_CATCHING)){ //DEBUG
|
||||
#if TX_DEBUG_SYSTEM == TRUE
|
||||
if (FlagGet(FLAG_SYS_NO_CATCHING)){
|
||||
static const u8 sText_BallsCannotBeUsed[] = _("Poké Balls cannot be used\nright now!\p");
|
||||
DisplayItemMessage(taskId, 1, sText_BallsCannotBeUsed, CloseItemMessage);
|
||||
return;
|
||||
|
@ -284,7 +284,7 @@ static void BuildStartMenuActions(void)
|
||||
{
|
||||
BuildMultiPartnerRoomStartMenu();
|
||||
}
|
||||
#if defined(TX_DEBUGGING) && TX_DEBUG_MENU_OPTION
|
||||
#if TX_DEBUG_SYSTEM == TRUE && TX_DEBUG_SYSTEM_IN_MENU == TRUE
|
||||
else
|
||||
{
|
||||
BuildDebugStartMenu();
|
||||
@ -772,7 +772,7 @@ static bool8 StartMenuDebugCallback(void)
|
||||
RemoveExtraStartMenuWindows();
|
||||
HideStartMenuDebug(); // Hide start menu without enabling movement
|
||||
|
||||
#ifdef TX_DEBUGGING
|
||||
#if TX_DEBUG_SYSTEM == TRUE
|
||||
Debug_ShowMainMenu();
|
||||
#endif
|
||||
|
||||
|
@ -193,10 +193,10 @@ bool8 CheckForTrainersWantingBattle(void)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
#ifdef TX_DEBUGGING //DEBUG
|
||||
#if TX_DEBUG_SYSTEM == TRUE
|
||||
if (FlagGet(FLAG_SYS_NO_TRAINER_SEE))
|
||||
return FALSE;
|
||||
#endif //
|
||||
#endif
|
||||
|
||||
gNoOfApproachingTrainers = 0;
|
||||
gApproachingTrainerId = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user