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