More battle tower.
This commit is contained in:
@@ -14,5 +14,6 @@ bool8 InBattlePike(void);
|
||||
void sub_81AA078(u16*, u8);
|
||||
void sub_81A4C30(void);
|
||||
bool8 sub_81A6BF4(void);
|
||||
u8 sub_81A6CA8(u8, u8);
|
||||
|
||||
#endif // GUARD_BATTLE_FRONTIER_2_H
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#ifndef GUARD_BATTLE_TOWER_H
|
||||
#define GUARD_BATTLE_TOWER_H
|
||||
|
||||
#define BATTLE_TOWER_EREADER_TRAINER_ID 200
|
||||
#define BATTLE_TOWER_RECORD_MIXING_TRAINER_BASE_ID 300
|
||||
#define BATTLE_TOWER_RECORD_APPRENTICE_BASE_ID 400
|
||||
#define BATTLE_TOWER_EREADER_TRAINER_ID 500
|
||||
|
||||
struct RSBattleTowerRecord
|
||||
{
|
||||
@@ -12,9 +12,7 @@ struct RSBattleTowerRecord
|
||||
/*0x02*/ u16 winStreak;
|
||||
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0C*/ u8 trainerId[4];
|
||||
/*0x10*/ struct {
|
||||
u16 easyChat[6];
|
||||
} greeting;
|
||||
/*0x10*/ u16 greeting[6];
|
||||
/*0x1C*/ struct UnknownPokemonStruct party[3];
|
||||
/*0xA0*/ u32 checksum;
|
||||
/*0xA4*/ u16 unk_11c8;
|
||||
@@ -26,16 +24,15 @@ union BattleTowerRecord
|
||||
struct EmeraldBattleTowerRecord emerald;
|
||||
};
|
||||
|
||||
#define FRONTIER_TRAINER_NAME_LENGTH 7
|
||||
|
||||
struct BattleFrontierTrainer
|
||||
{
|
||||
u32 facilityClass;
|
||||
u8 trainerName[FRONTIER_TRAINER_NAME_LENGTH + 1];
|
||||
u8 facilityClass;
|
||||
u8 filler1[3];
|
||||
u8 trainerName[PLAYER_NAME_LENGTH + 1];
|
||||
u16 speechBefore[6];
|
||||
u16 speechWin[6];
|
||||
u16 speechLose[6];
|
||||
const u16 *btMonPool;
|
||||
const u16 *bfMonPool;
|
||||
};
|
||||
|
||||
struct FacilityMon
|
||||
@@ -47,6 +44,11 @@ struct FacilityMon
|
||||
u8 nature;
|
||||
};
|
||||
|
||||
extern const u8 gTowerMaleFacilityClasses[30];
|
||||
extern const u8 gTowerMaleTrainerGfxIds[30];
|
||||
extern const u8 gTowerFemaleFacilityClasses[20];
|
||||
extern const u8 gTowerFemaleTrainerGfxIds[20];
|
||||
|
||||
extern const struct BattleFrontierTrainer *gFacilityTrainers;
|
||||
extern const struct FacilityMon *gFacilityTrainerMons;
|
||||
|
||||
@@ -54,8 +56,8 @@ u16 GetCurrentBattleTowerWinStreak(u8, u8);
|
||||
void sub_81659DC(struct RSBattleTowerRecord *a0, struct RSBattleTowerRecord *a1);
|
||||
bool32 sub_816587C(union BattleTowerRecord *, union BattleTowerRecord *);
|
||||
void CalcEmeraldBattleTowerChecksum(struct EmeraldBattleTowerRecord *);
|
||||
void sub_81628A0(union BattleTowerRecord *);
|
||||
void sub_8162614(u16 trainerId, u8);
|
||||
void PutNewBattleTowerRecord(union BattleTowerRecord *);
|
||||
void SetBattleFacilityTrainerGfxId(u16 trainerId, u8 tempVarId);
|
||||
void ConvertBattleFrontierTrainerSpeechToString(const u16 *words);
|
||||
void GetFrontierTrainerName(u8 *dest, u16 trainerIdx);
|
||||
void GetEreaderTrainerName(u8 *dest);
|
||||
|
||||
@@ -326,19 +326,31 @@ struct UnknownPokemonStruct
|
||||
struct EmeraldBattleTowerRecord
|
||||
{
|
||||
/*0x00*/ u8 lvlMode; // 0 = level 50, 1 = level 100
|
||||
/*0x01*/ u8 trainerClass;
|
||||
/*0x01*/ u8 facilityClass;
|
||||
/*0x02*/ u16 winStreak;
|
||||
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0C*/ u8 trainerId[4];
|
||||
/*0x10*/ struct {
|
||||
u16 easyChat[6];
|
||||
} greeting;
|
||||
/*0x10*/ u16 greeting[6];
|
||||
/*0x1C*/ u8 filler_1c[0x18];
|
||||
/*0x34*/ struct UnknownPokemonStruct party[4];
|
||||
/*0xE4*/ u8 language;
|
||||
/*0xE8*/ u32 checksum;
|
||||
};
|
||||
|
||||
struct BattleTowerEReaderTrainer
|
||||
{
|
||||
/*0x00*/ u8 unk0;
|
||||
/*0x01*/ u8 facilityClass;
|
||||
/*0x02*/ u16 winStreak;
|
||||
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0C*/ u8 trainerId[4];
|
||||
/*0x10*/ u16 greeting[6];
|
||||
/*0x1C*/ u16 farewellPlayerLost[6];
|
||||
/*0x28*/ u16 farewellPlayerWon[6];
|
||||
/*0x34*/ struct UnknownPokemonStruct party[3];
|
||||
/*0xB8*/ u32 checksum;
|
||||
};
|
||||
|
||||
struct FrontierMonData
|
||||
{
|
||||
u16 moves[4];
|
||||
@@ -367,17 +379,13 @@ struct BattleDomeTrainer
|
||||
struct BattleFrontier
|
||||
{
|
||||
/*0x64C*/ struct EmeraldBattleTowerRecord battleTower;
|
||||
/*0x738*/ struct EmeraldBattleTowerRecord records[5]; // No idea here, it's probably wrong, no clue.
|
||||
/*0x738*/ struct EmeraldBattleTowerRecord records[5]; // From record mixing.
|
||||
/*0xBD4*/ u16 field_BD4;
|
||||
/*0xBD6*/ u16 field_BD6;
|
||||
/*0xBD8*/ u8 field_BD8[11];
|
||||
/*0xBE3*/ u8 field_BE3[8];
|
||||
/*0xBEB*/ u8 field_BEB;
|
||||
/*0xBEC*/ u8 filler_BEC[16];
|
||||
/*0xBFC*/ u16 ecwords_BFC[6];
|
||||
/*0xC08*/ u16 ecwords_C08[6];
|
||||
/*0xC14*/ u16 ecwords_C14[6];
|
||||
/*0xC20*/ u8 filler_C20[0x88];
|
||||
/*0xBEC*/ struct BattleTowerEReaderTrainer ereaderTrainer;
|
||||
/*0xCA8*/ u8 field_CA8;
|
||||
/*0xCA9*/ u8 lvlMode:2; // 0x1, 0x2 -> 0x3
|
||||
/*0xCA9*/ u8 field_CA9_a:1; // 0x4
|
||||
@@ -388,8 +396,8 @@ struct BattleFrontier
|
||||
/*0xCA9*/ u8 field_CA9_f:1; // 0x80
|
||||
/*0xCAA*/ u16 field_CAA[3];
|
||||
/*0xCB0*/ u16 field_CB0;
|
||||
/*0xCB2*/ u16 field_CB2;
|
||||
/*0xCB4*/ u16 field_CB4[20];
|
||||
/*0xCB2*/ u16 curChallengeBattleNum; // In case of battle pyramid, the floor.
|
||||
/*0xCB4*/ u16 battledTrainerIds[20];
|
||||
/*0xCDC*/ u32 field_CDC;
|
||||
/*0xCE0*/ u16 field_CE0[4][2];
|
||||
/*0xCF0*/ u16 field_CF0[2];
|
||||
|
||||
Reference in New Issue
Block a user