Stick to the new name
This commit is contained in:
+12
-12
@@ -405,7 +405,7 @@ static void DoStandardWildBattle(void)
|
||||
StopPlayerAvatar();
|
||||
gMain.savedCallback = CB2_EndWildBattle;
|
||||
gBattleTypeFlags = 0;
|
||||
if (InBattlePyramid())
|
||||
if (CurrentBattlePyramidLocation() != PYRAMID_LOCATION_NONE)
|
||||
{
|
||||
VarSet(VAR_TEMP_PLAYING_PYRAMID_MUSIC, 0);
|
||||
gBattleTypeFlags |= BATTLE_TYPE_PYRAMID;
|
||||
@@ -465,7 +465,7 @@ static void DoTrainerBattle(void)
|
||||
|
||||
static void DoBattlePyramidTrainerHillBattle(void)
|
||||
{
|
||||
if (InBattlePyramid())
|
||||
if (CurrentBattlePyramidLocation() != PYRAMID_LOCATION_NONE)
|
||||
CreateBattleStartTask(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_PYRAMID), 0);
|
||||
else
|
||||
CreateBattleStartTask(GetSpecialBattleTransition(B_TRANSITION_GROUP_TRAINER_HILL), 0);
|
||||
@@ -603,7 +603,7 @@ static void CB2_EndWildBattle(void)
|
||||
CpuFill16(0, (void *)(BG_PLTT), BG_PLTT_SIZE);
|
||||
ResetOamRange(0, 128);
|
||||
|
||||
if (IsPlayerDefeated(gBattleOutcome) == TRUE && !InBattlePyramid() && !InBattlePike())
|
||||
if (IsPlayerDefeated(gBattleOutcome) == TRUE && CurrentBattlePyramidLocation() == PYRAMID_LOCATION_NONE && !InBattlePike())
|
||||
{
|
||||
SetMainCallback2(CB2_WhiteOut);
|
||||
}
|
||||
@@ -621,7 +621,7 @@ static void CB2_EndScriptedWildBattle(void)
|
||||
|
||||
if (IsPlayerDefeated(gBattleOutcome) == TRUE)
|
||||
{
|
||||
if (InBattlePyramid())
|
||||
if (CurrentBattlePyramidLocation() != PYRAMID_LOCATION_NONE)
|
||||
SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
|
||||
else
|
||||
SetMainCallback2(CB2_WhiteOut);
|
||||
@@ -794,14 +794,14 @@ static u8 GetWildBattleTransition(void)
|
||||
|
||||
if (enemyLevel < playerLevel)
|
||||
{
|
||||
if (InBattlePyramid())
|
||||
if (CurrentBattlePyramidLocation() != PYRAMID_LOCATION_NONE)
|
||||
return B_TRANSITION_BLUR;
|
||||
else
|
||||
return sBattleTransitionTable_Wild[transitionType][0];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (InBattlePyramid())
|
||||
if (CurrentBattlePyramidLocation() != PYRAMID_LOCATION_NONE)
|
||||
return B_TRANSITION_GRID_SQUARES;
|
||||
else
|
||||
return sBattleTransitionTable_Wild[transitionType][1];
|
||||
@@ -1233,7 +1233,7 @@ u8 GetTrainerBattleMode(void)
|
||||
|
||||
bool8 GetTrainerFlag(void)
|
||||
{
|
||||
if (InBattlePyramid())
|
||||
if (CurrentBattlePyramidLocation() != PYRAMID_LOCATION_NONE)
|
||||
return GetBattlePyramidTrainerFlag(gSelectedObjectEvent);
|
||||
else if (InTrainerHill())
|
||||
return GetHillTrainerFlag(gSelectedObjectEvent);
|
||||
@@ -1275,7 +1275,7 @@ void BattleSetup_StartTrainerBattle(void)
|
||||
else
|
||||
gBattleTypeFlags = (BATTLE_TYPE_TRAINER);
|
||||
|
||||
if (InBattlePyramid())
|
||||
if (CurrentBattlePyramidLocation() != PYRAMID_LOCATION_NONE)
|
||||
{
|
||||
VarSet(VAR_TEMP_PLAYING_PYRAMID_MUSIC, 0);
|
||||
gBattleTypeFlags |= BATTLE_TYPE_PYRAMID;
|
||||
@@ -1315,7 +1315,7 @@ void BattleSetup_StartTrainerBattle(void)
|
||||
gWhichTrainerToFaceAfterBattle = 0;
|
||||
gMain.savedCallback = CB2_EndTrainerBattle;
|
||||
|
||||
if (InBattlePyramid() || InTrainerHillChallenge())
|
||||
if (CurrentBattlePyramidLocation() != PYRAMID_LOCATION_NONE || InTrainerHillChallenge())
|
||||
DoBattlePyramidTrainerHillBattle();
|
||||
else
|
||||
DoTrainerBattle();
|
||||
@@ -1331,7 +1331,7 @@ static void CB2_EndTrainerBattle(void)
|
||||
}
|
||||
else if (IsPlayerDefeated(gBattleOutcome) == TRUE)
|
||||
{
|
||||
if (InBattlePyramid() || InTrainerHillChallenge())
|
||||
if (CurrentBattlePyramidLocation() != PYRAMID_LOCATION_NONE || InTrainerHillChallenge())
|
||||
SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
|
||||
else
|
||||
SetMainCallback2(CB2_WhiteOut);
|
||||
@@ -1339,7 +1339,7 @@ static void CB2_EndTrainerBattle(void)
|
||||
else
|
||||
{
|
||||
SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
|
||||
if (!InBattlePyramid() && !InTrainerHillChallenge())
|
||||
if (CurrentBattlePyramidLocation() == PYRAMID_LOCATION_NONE && !InTrainerHillChallenge())
|
||||
{
|
||||
RegisterTrainerInMatchCall();
|
||||
SetBattledTrainersFlags();
|
||||
@@ -1376,7 +1376,7 @@ void BattleSetup_StartRematchBattle(void)
|
||||
|
||||
void ShowTrainerIntroSpeech(void)
|
||||
{
|
||||
if (InBattlePyramid())
|
||||
if (CurrentBattlePyramidLocation() != PYRAMID_LOCATION_NONE)
|
||||
{
|
||||
if (gNoOfApproachingTrainers == 0 || gNoOfApproachingTrainers == 1)
|
||||
CopyPyramidTrainerSpeechBefore(LocalIdToPyramidTrainerId(gSpecialVar_LastTalked));
|
||||
|
||||
Reference in New Issue
Block a user