summaryrefslogtreecommitdiff
path: root/src/battle_setup.c
diff options
context:
space:
mode:
authorSlawter666 <38655737+Slawter666@users.noreply.github.com>2018-11-12 14:14:50 +0000
committerSlawter666 <38655737+Slawter666@users.noreply.github.com>2018-11-12 14:14:50 +0000
commit1b895ff52c011d51a9516791148cd5088ba411b5 (patch)
tree3f1dee86f96098d38131426e11a0f9c39a1244fe /src/battle_setup.c
parentbe33878b94cc38913447682d3e34e674df68619f (diff)
parent65f053fd89e09b13e407ac53488043b728660e6e (diff)
Merge branch 'master' of https://github.com/pret/pokeemerald into synchronise
Diffstat (limited to 'src/battle_setup.c')
-rw-r--r--src/battle_setup.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/battle_setup.c b/src/battle_setup.c
index d74fef9cc..6465db00f 100644
--- a/src/battle_setup.c
+++ b/src/battle_setup.c
@@ -31,6 +31,7 @@
#include "string_util.h"
#include "overworld.h"
#include "field_weather.h"
+#include "battle_tower.h"
#include "gym_leader_rematch.h"
#include "constants/map_types.h"
#include "constants/battle_frontier.h"
@@ -67,8 +68,6 @@ extern u16 sub_81D6180(u8 localId);
extern bool8 GetBattlePyramidTrainerFlag(u8 eventObjId);
extern bool8 GetTrainerHillTrainerFlag(u8 eventObjId);
extern bool8 sub_81D5C18(void);
-extern void sub_816306C(u8 a0);
-extern void sub_8163048(u8 a0);
extern void sub_81A9B04(void);
extern void sub_81D639C(void);
extern void sub_81D6384(void);
@@ -885,8 +884,8 @@ u8 sub_80B100C(s32 arg0)
return sUnknown_0854FE98[Random() % ARRAY_COUNT(sUnknown_0854FE98)];
}
- var = gSaveBlock2Ptr->frontier.field_CB4[gSaveBlock2Ptr->frontier.field_CB2 * 2 + 0]
- + gSaveBlock2Ptr->frontier.field_CB4[gSaveBlock2Ptr->frontier.field_CB2 * 2 + 1];
+ var = gSaveBlock2Ptr->frontier.field_CB4[gSaveBlock2Ptr->frontier.curChallengeBattleNum * 2 + 0]
+ + gSaveBlock2Ptr->frontier.field_CB4[gSaveBlock2Ptr->frontier.curChallengeBattleNum * 2 + 1];
return sUnknown_0854FE98[var % ARRAY_COUNT(sUnknown_0854FE98)];
}
@@ -1264,7 +1263,7 @@ void BattleSetup_StartTrainerBattle(void)
if (gNoOfApproachingTrainers == 2)
{
- sub_816306C(1);
+ FillFrontierTrainersParties(1);
ZeroMonData(&gEnemyParty[1]);
ZeroMonData(&gEnemyParty[2]);
ZeroMonData(&gEnemyParty[4]);
@@ -1272,7 +1271,7 @@ void BattleSetup_StartTrainerBattle(void)
}
else
{
- sub_8163048(1);
+ FillFrontierTrainerParty(1);
ZeroMonData(&gEnemyParty[1]);
ZeroMonData(&gEnemyParty[2]);
}