2017-10-13 15:09:36 +00:00
|
|
|
#ifndef GUARD_BATTLE_TOWER_H
|
|
|
|
#define GUARD_BATTLE_TOWER_H
|
|
|
|
|
2018-10-19 22:33:51 +00:00
|
|
|
#define BATTLE_TOWER_RECORD_MIXING_TRAINER_BASE_ID 300
|
|
|
|
#define BATTLE_TOWER_RECORD_APPRENTICE_BASE_ID 400
|
2018-10-20 22:06:42 +00:00
|
|
|
#define BATTLE_TOWER_EREADER_TRAINER_ID 500
|
2018-10-19 22:33:51 +00:00
|
|
|
|
2018-05-25 22:25:36 +00:00
|
|
|
struct RSBattleTowerRecord
|
|
|
|
{
|
2017-11-04 22:48:13 +00:00
|
|
|
/*0x00*/ u8 battleTowerLevelType; // 0 = level 50, 1 = level 100
|
|
|
|
/*0x01*/ u8 trainerClass;
|
|
|
|
/*0x02*/ u16 winStreak;
|
2018-09-01 20:03:21 +00:00
|
|
|
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
|
2017-11-04 22:48:13 +00:00
|
|
|
/*0x0C*/ u8 trainerId[4];
|
2018-10-20 22:06:42 +00:00
|
|
|
/*0x10*/ u16 greeting[6];
|
2017-11-04 22:48:13 +00:00
|
|
|
/*0x1C*/ struct UnknownPokemonStruct party[3];
|
|
|
|
/*0xA0*/ u32 checksum;
|
|
|
|
/*0xA4*/ u16 unk_11c8;
|
|
|
|
};
|
|
|
|
|
2018-05-25 22:25:36 +00:00
|
|
|
union BattleTowerRecord
|
|
|
|
{
|
2017-11-04 22:48:13 +00:00
|
|
|
struct RSBattleTowerRecord ruby_sapphire;
|
|
|
|
struct EmeraldBattleTowerRecord emerald;
|
|
|
|
};
|
|
|
|
|
2018-06-17 10:30:09 +00:00
|
|
|
struct BattleFrontierTrainer
|
|
|
|
{
|
2018-10-20 22:06:42 +00:00
|
|
|
u8 facilityClass;
|
|
|
|
u8 filler1[3];
|
|
|
|
u8 trainerName[PLAYER_NAME_LENGTH + 1];
|
2018-06-17 10:30:09 +00:00
|
|
|
u16 speechBefore[6];
|
|
|
|
u16 speechWin[6];
|
|
|
|
u16 speechLose[6];
|
2018-10-20 22:06:42 +00:00
|
|
|
const u16 *bfMonPool;
|
2018-06-17 10:30:09 +00:00
|
|
|
};
|
|
|
|
|
2018-08-26 13:27:06 +00:00
|
|
|
struct FacilityMon
|
|
|
|
{
|
|
|
|
u16 species;
|
|
|
|
u16 moves[4];
|
|
|
|
u8 itemTableId;
|
|
|
|
u8 evSpread;
|
|
|
|
u8 nature;
|
|
|
|
};
|
|
|
|
|
2018-10-20 22:06:42 +00:00
|
|
|
extern const u8 gTowerMaleFacilityClasses[30];
|
|
|
|
extern const u8 gTowerMaleTrainerGfxIds[30];
|
|
|
|
extern const u8 gTowerFemaleFacilityClasses[20];
|
|
|
|
extern const u8 gTowerFemaleTrainerGfxIds[20];
|
|
|
|
|
2018-08-25 16:46:15 +00:00
|
|
|
extern const struct BattleFrontierTrainer *gFacilityTrainers;
|
2018-08-26 13:27:06 +00:00
|
|
|
extern const struct FacilityMon *gFacilityTrainerMons;
|
2018-06-17 10:30:09 +00:00
|
|
|
|
2018-10-19 22:33:51 +00:00
|
|
|
u16 GetCurrentBattleTowerWinStreak(u8, u8);
|
2018-05-25 22:25:36 +00:00
|
|
|
void sub_81659DC(struct RSBattleTowerRecord *a0, struct RSBattleTowerRecord *a1);
|
2017-11-04 22:48:13 +00:00
|
|
|
bool32 sub_816587C(union BattleTowerRecord *, union BattleTowerRecord *);
|
2018-05-25 22:25:36 +00:00
|
|
|
void CalcEmeraldBattleTowerChecksum(struct EmeraldBattleTowerRecord *);
|
2018-10-20 22:06:42 +00:00
|
|
|
void PutNewBattleTowerRecord(union BattleTowerRecord *);
|
|
|
|
void SetBattleFacilityTrainerGfxId(u16 trainerId, u8 tempVarId);
|
2018-10-21 18:13:12 +00:00
|
|
|
void FrontierSpeechToString(const u16 *words);
|
2018-06-17 10:30:09 +00:00
|
|
|
void GetFrontierTrainerName(u8 *dest, u16 trainerIdx);
|
2018-08-08 08:37:12 +00:00
|
|
|
void GetEreaderTrainerName(u8 *dest);
|
2017-10-13 15:09:36 +00:00
|
|
|
|
|
|
|
#endif //GUARD_BATTLE_TOWER_H
|