Document Battle Pyramid

This commit is contained in:
DizzyEggg
2018-11-18 17:52:22 +01:00
parent 40a44a8508
commit 4e37723288
20 changed files with 626 additions and 1412 deletions
+5 -9
View File
@@ -34,6 +34,7 @@
#include "battle_tower.h"
#include "gym_leader_rematch.h"
#include "battle_pike.h"
#include "battle_pyramid.h"
#include "constants/map_types.h"
#include "constants/battle_frontier.h"
@@ -54,7 +55,6 @@ struct TrainerBattleParameter
u8 ptrType;
};
extern bool8 InBattlePyramid(void);
extern bool32 InTrainerHill(void);
extern bool32 FieldPoisonEffectIsRunning(void);
extern void RestartWildEncounterImmunitySteps(void);
@@ -63,17 +63,13 @@ extern void sub_81BE72C(void);
extern void sub_808BCF4(void);
extern void sub_80EECC8(void);
extern void sub_80AF6F0(void);
extern u16 sub_81A9AA8(u8 localId);
extern u16 sub_81D6180(u8 localId);
extern bool8 GetBattlePyramidTrainerFlag(u8 eventObjId);
extern bool8 GetTrainerHillTrainerFlag(u8 eventObjId);
extern bool8 sub_81D5C18(void);
extern void sub_81A9B04(void);
extern void sub_81D639C(void);
extern void sub_81D6384(void);
extern void sub_81D61E8(void);
extern void sub_80982B8(void);
extern void sub_81A9EDC(u16 a0);
extern void CopyTrainerHillTrainerText(u8 a0, u16 arg1);
// this file's functions
@@ -1131,12 +1127,12 @@ const u8 *BattleSetup_ConfigureTrainerBattle(const u8 *data)
{
TrainerBattleLoadArgs(sOrdinaryBattleParams, data);
SetMapVarsToTrainer();
gTrainerBattleOpponent_A = sub_81A9AA8(gSpecialVar_LastTalked);
gTrainerBattleOpponent_A = LocalIdToPyramidTrainerId(gSpecialVar_LastTalked);
}
else
{
TrainerBattleLoadArgs(sTrainerBOrdinaryBattleParams, data);
gTrainerBattleOpponent_B = sub_81A9AA8(gSpecialVar_LastTalked);
gTrainerBattleOpponent_B = LocalIdToPyramidTrainerId(gSpecialVar_LastTalked);
}
return EventScript_271362;
case TRAINER_BATTLE_SET_TRAINER_A:
@@ -1360,9 +1356,9 @@ void ShowTrainerIntroSpeech(void)
if (InBattlePyramid())
{
if (gNoOfApproachingTrainers == 0 || gNoOfApproachingTrainers == 1)
sub_81A9EDC(sub_81A9AA8(gSpecialVar_LastTalked));
CopyPyramidTrainerSpeechBefore(LocalIdToPyramidTrainerId(gSpecialVar_LastTalked));
else
sub_81A9EDC(sub_81A9AA8(gEventObjects[gApproachingTrainers[gApproachingTrainerId].eventObjectId].localId));
CopyPyramidTrainerSpeechBefore(LocalIdToPyramidTrainerId(gEventObjects[gApproachingTrainers[gApproachingTrainerId].eventObjectId].localId));
sub_80982B8();
}