battle tent start and create frontier struct in saveblock
This commit is contained in:
@@ -8,5 +8,8 @@ void sub_81A8AF8(void);
|
||||
bool8 InBattlePike(void);
|
||||
void sub_819FA50(void);
|
||||
void sub_81AA078(u16*, u8);
|
||||
void sub_81A4C30(void);
|
||||
void sub_819A4F8(void);
|
||||
void sub_819DC00(void);
|
||||
|
||||
#endif // GUARD_BATTLE_FRONTIER_2_H
|
||||
|
||||
@@ -22,10 +22,25 @@ union BattleTowerRecord
|
||||
struct EmeraldBattleTowerRecord emerald;
|
||||
};
|
||||
|
||||
struct BattleFrontierTrainer
|
||||
{
|
||||
u32 trainerClass;
|
||||
u8 trainerName[8];
|
||||
u16 speechBefore[6];
|
||||
u16 speechWin[6];
|
||||
u16 speechLose[6];
|
||||
u16 *btMonPool;
|
||||
};
|
||||
|
||||
extern struct BattleFrontierTrainer *gUnknown_0203BC88;
|
||||
|
||||
u16 sub_8164FCC(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 ConvertBattleFrontierTrainerSpeechToString(u16 *words);
|
||||
void GetFrontierTrainerName(u8 *dest, u16 trainerIdx);
|
||||
|
||||
#endif //GUARD_BATTLE_TOWER_H
|
||||
|
||||
112
include/global.h
112
include/global.h
@@ -314,62 +314,30 @@ struct EmeraldBattleTowerRecord
|
||||
/*0xE8*/ u32 checksum;
|
||||
};
|
||||
|
||||
struct SaveBlock2
|
||||
struct BattleFrontier
|
||||
{
|
||||
/*0x00*/ u8 playerName[PLAYER_NAME_LENGTH];
|
||||
/*0x08*/ u8 playerGender; // MALE, FEMALE
|
||||
/*0x09*/ u8 specialSaveWarp;
|
||||
/*0x0A*/ u8 playerTrainerId[4];
|
||||
/*0x0E*/ u16 playTimeHours;
|
||||
/*0x10*/ u8 playTimeMinutes;
|
||||
/*0x11*/ u8 playTimeSeconds;
|
||||
/*0x12*/ u8 playTimeVBlanks;
|
||||
/*0x13*/ u8 optionsButtonMode; // OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A]
|
||||
/*0x14*/ u16 optionsTextSpeed:3; // OPTIONS_TEXT_SPEED_[SLOW/MID/FAST]
|
||||
u16 optionsWindowFrameType:5; // Specifies one of the 20 decorative borders for text boxes
|
||||
u16 optionsSound:1; // OPTIONS_SOUND_[MONO/STEREO]
|
||||
u16 optionsBattleStyle:1; // OPTIONS_BATTLE_STYLE_[SHIFT/SET]
|
||||
u16 optionsBattleSceneOff:1; // whether battle animations are disabled
|
||||
u16 regionMapZoom:1; // whether the map is zoomed in
|
||||
/*0x18*/ struct Pokedex pokedex;
|
||||
/*0x90*/ u8 filler_90[0x8];
|
||||
/*0x98*/ struct Time localTimeOffset;
|
||||
/*0xA0*/ struct Time lastBerryTreeUpdate;
|
||||
/*0xA8*/ u32 field_A8;
|
||||
/*0xAC*/ u32 encryptionKey;
|
||||
|
||||
// TODO: fix and verify labels
|
||||
/*0xB0*/ u8 field_B0;
|
||||
/*0xB1*/ u8 field_B1;
|
||||
/*0xB2*/ u8 field_B2_0:3;
|
||||
/*0xB2*/ u8 field_B2_1:2;
|
||||
/*0xB3*/ u8 field_B3[0x29];
|
||||
/*0xDC*/ struct UnkRecordMixingStruct field_DC[4];
|
||||
/*0x1EC*/ struct BerryCrush berryCrush;
|
||||
/*0x1FC*/ struct PokemonJumpResults pokeJump;
|
||||
/*0x20C*/ struct BerryPickingResults berryPick;
|
||||
/*0x21C*/ u8 field_21C[1032];
|
||||
/*0x624*/ u16 contestLinkResults[20]; // 4 positions for 5 categories, possibly a struct or a 2d array
|
||||
|
||||
// All below could be a one giant struct
|
||||
|
||||
/*0x64C*/ struct EmeraldBattleTowerRecord battleTower;
|
||||
/*0x738*/ struct UnknownSaveBlock2Struct field_738[5]; // No idea here, it's probably wrong, no clue.
|
||||
/*0xBD4*/ u16 field_BD4;
|
||||
/*0xBD6*/ u16 field_BD6;
|
||||
/*0xBD8*/ u8 field_BD8[11];
|
||||
/*0xBE3*/ u8 filler_BE3[8];
|
||||
/*0xBE3*/ u8 field_BE3[8];
|
||||
/*0xBEB*/ u8 field_BEB;
|
||||
/*0xBE3*/ u8 filler_BEC[189];
|
||||
/*0xCA9*/ u8 frontierChosenLvl : 2; // 0x1, 0x2 -> 0x3
|
||||
/*0xCA9*/ u8 field_CA9_a : 1; // 0x4
|
||||
/*0xCA9*/ u8 field_CA9_b : 1; // 0x8
|
||||
/*0xCA9*/ u8 field_CA9_c : 1; // 0x10
|
||||
/*0xCA9*/ u8 field_CA9_d : 1; // 0x20
|
||||
/*0xCA9*/ u8 field_CA9_e : 1; // 0x40
|
||||
/*0xCA9*/ u8 field_CA9_f : 1; // 0x80
|
||||
/*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];
|
||||
/*0xCA8*/ u8 field_CA8;
|
||||
/*0xCA9*/ u8 chosenLvl:2; // 0x1, 0x2 -> 0x3
|
||||
/*0xCA9*/ u8 field_CA9_a:1; // 0x4
|
||||
/*0xCA9*/ u8 field_CA9_b:1; // 0x8
|
||||
/*0xCA9*/ u8 field_CA9_c:1; // 0x10
|
||||
/*0xCA9*/ u8 field_CA9_d:1; // 0x20
|
||||
/*0xCA9*/ u8 field_CA9_e:1; // 0x40
|
||||
/*0xCA9*/ u8 field_CA9_f:1; // 0x80
|
||||
/*0xCAA*/ u16 field_CAA[4];
|
||||
/*0xCB2*/ u16 battlePyramidWildHeaderId;
|
||||
/*0xCB2*/ u16 field_CB2;
|
||||
/*0xCB4*/ u16 field_CB4[30];
|
||||
/*0xCF0*/ u16 field_CF0[2];
|
||||
/*0xCF4*/ u16 field_CF4[2];
|
||||
@@ -416,21 +384,61 @@ struct SaveBlock2
|
||||
/*0xE04*/ u16 field_E04;
|
||||
/*0xE06*/ u16 field_E06;
|
||||
/*0xE08*/ u16 field_E08[9];
|
||||
/*0xE1A*/ u16 battlePyramidFloor; // possibly?
|
||||
/*0xE1A*/ u16 field_E1A;
|
||||
/*0xE1C*/ u16 field_E1C;
|
||||
/*0xE1E*/ u16 field_E1E[7];
|
||||
/*0xE2C*/ struct PyramidBag pyramidBag;
|
||||
/*0x???*/ u8 field_unkown[6];
|
||||
/*0xE6E*/ u16 battleTentWinStreak;
|
||||
/*0xE58*/ u16 field_E58;
|
||||
/*0xE6A*/ u16 field_E6A;
|
||||
/*0xE6C*/ u16 field_E6C;
|
||||
/*0xE6E*/ u16 field_E6E;
|
||||
/*0xE70*/ u8 field_E70[72];
|
||||
/*0xEB8*/ u16 frontierBattlePoints;
|
||||
/*0xEBA*/ u8 field_EBA[39];
|
||||
/*0xEE1*/ u8 field_EE1[2][PLAYER_NAME_LENGTH];
|
||||
/*0xEF1*/ u8 field_EF1[2][4];
|
||||
/*0xEF9*/ u8 field_EF9[51];
|
||||
// sizeof=0xF2C
|
||||
};
|
||||
|
||||
struct SaveBlock2
|
||||
{
|
||||
/*0x00*/ u8 playerName[PLAYER_NAME_LENGTH];
|
||||
/*0x08*/ u8 playerGender; // MALE, FEMALE
|
||||
/*0x09*/ u8 specialSaveWarp;
|
||||
/*0x0A*/ u8 playerTrainerId[4];
|
||||
/*0x0E*/ u16 playTimeHours;
|
||||
/*0x10*/ u8 playTimeMinutes;
|
||||
/*0x11*/ u8 playTimeSeconds;
|
||||
/*0x12*/ u8 playTimeVBlanks;
|
||||
/*0x13*/ u8 optionsButtonMode; // OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A]
|
||||
/*0x14*/ u16 optionsTextSpeed:3; // OPTIONS_TEXT_SPEED_[SLOW/MID/FAST]
|
||||
u16 optionsWindowFrameType:5; // Specifies one of the 20 decorative borders for text boxes
|
||||
u16 optionsSound:1; // OPTIONS_SOUND_[MONO/STEREO]
|
||||
u16 optionsBattleStyle:1; // OPTIONS_BATTLE_STYLE_[SHIFT/SET]
|
||||
u16 optionsBattleSceneOff:1; // whether battle animations are disabled
|
||||
u16 regionMapZoom:1; // whether the map is zoomed in
|
||||
/*0x18*/ struct Pokedex pokedex;
|
||||
/*0x90*/ u8 filler_90[0x8];
|
||||
/*0x98*/ struct Time localTimeOffset;
|
||||
/*0xA0*/ struct Time lastBerryTreeUpdate;
|
||||
/*0xA8*/ u32 field_A8;
|
||||
/*0xAC*/ u32 encryptionKey;
|
||||
|
||||
// TODO: fix and verify labels
|
||||
/*0xB0*/ u8 field_B0;
|
||||
/*0xB1*/ u8 field_B1;
|
||||
/*0xB2*/ u8 field_B2_0:3;
|
||||
/*0xB2*/ u8 field_B2_1:2;
|
||||
/*0xB3*/ u8 field_B3[0x29];
|
||||
/*0xDC*/ struct UnkRecordMixingStruct field_DC[4];
|
||||
/*0x1EC*/ struct BerryCrush berryCrush;
|
||||
/*0x1FC*/ struct PokemonJumpResults pokeJump;
|
||||
/*0x20C*/ struct BerryPickingResults berryPick;
|
||||
/*0x21C*/ u8 field_21C[1032];
|
||||
/*0x624*/ u16 contestLinkResults[20]; // 4 positions for 5 categories, possibly a struct or a 2d array
|
||||
/*0x64C*/ struct BattleFrontier frontier;
|
||||
}; // sizeof=0xF2C
|
||||
|
||||
extern struct SaveBlock2 *gSaveBlock2Ptr;
|
||||
|
||||
struct SecretBaseParty
|
||||
|
||||
@@ -4,12 +4,7 @@
|
||||
void WriteUnalignedWord(u32 var, u8 *dataPtr);
|
||||
u32 ReadUnalignedWord(u8* dataPtr);
|
||||
void CopyUnalignedWord(u8 *copyTo, u8 *copyFrom);
|
||||
void InitPlayerTrainerId(void);
|
||||
void SetDefaultOptions(void);
|
||||
void ClearPokedexFlags(void);
|
||||
void WarpToTruck(void);
|
||||
void NewGameInitData(void);
|
||||
void ResetMiniGamesResults(void);
|
||||
void sub_808447C(void);
|
||||
void Sav2_ClearSetDefault(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user