merge with battle tent update
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
|
||||
|
||||
@@ -250,11 +250,11 @@
|
||||
#define MAP_EVER_GRANDE_CITY_GLACIAS_ROOM (2 | (16 << 8))
|
||||
#define MAP_EVER_GRANDE_CITY_DRAKES_ROOM (3 | (16 << 8))
|
||||
#define MAP_EVER_GRANDE_CITY_CHAMPIONS_ROOM (4 | (16 << 8))
|
||||
#define MAP_EVER_GRANDE_CITY_CORRIDOR1 (5 | (16 << 8))
|
||||
#define MAP_EVER_GRANDE_CITY_CORRIDOR2 (6 | (16 << 8))
|
||||
#define MAP_EVER_GRANDE_CITY_CORRIDOR3 (7 | (16 << 8))
|
||||
#define MAP_EVER_GRANDE_CITY_CORRIDOR4 (8 | (16 << 8))
|
||||
#define MAP_EVER_GRANDE_CITY_CORRIDOR5 (9 | (16 << 8))
|
||||
#define MAP_EVER_GRANDE_CITY_HALL1 (5 | (16 << 8))
|
||||
#define MAP_EVER_GRANDE_CITY_HALL2 (6 | (16 << 8))
|
||||
#define MAP_EVER_GRANDE_CITY_HALL3 (7 | (16 << 8))
|
||||
#define MAP_EVER_GRANDE_CITY_HALL4 (8 | (16 << 8))
|
||||
#define MAP_EVER_GRANDE_CITY_HALL5 (9 | (16 << 8))
|
||||
#define MAP_EVER_GRANDE_CITY_POKEMON_LEAGUE_1F (10 | (16 << 8))
|
||||
#define MAP_EVER_GRANDE_CITY_HALL_OF_FAME (11 | (16 << 8))
|
||||
#define MAP_EVER_GRANDE_CITY_POKEMON_CENTER_1F (12 | (16 << 8))
|
||||
@@ -327,9 +327,9 @@
|
||||
#define MAP_SEAFLOOR_CAVERN_ROOM9 (36 | (24 << 8))
|
||||
#define MAP_CAVE_OF_ORIGIN_ENTRANCE (37 | (24 << 8))
|
||||
#define MAP_CAVE_OF_ORIGIN_1F (38 | (24 << 8))
|
||||
#define MAP_CAVE_OF_ORIGIN_UNUSED_RS_B1F (39 | (24 << 8)) //
|
||||
#define MAP_CAVE_OF_ORIGIN_UNUSED_RS_B2F (40 | (24 << 8)) // Ruby/Sapphire leftovers
|
||||
#define MAP_CAVE_OF_ORIGIN_UNUSED_RS_B3F (41 | (24 << 8)) //
|
||||
#define MAP_CAVE_OF_ORIGIN_UNUSED_RUBY_SAPPHIRE_MAP1 (39 | (24 << 8)) //
|
||||
#define MAP_CAVE_OF_ORIGIN_UNUSED_RUBY_SAPPHIRE_MAP2 (40 | (24 << 8)) // Ruby/Sapphire leftovers
|
||||
#define MAP_CAVE_OF_ORIGIN_UNUSED_RUBY_SAPPHIRE_MAP3 (41 | (24 << 8)) //
|
||||
#define MAP_CAVE_OF_ORIGIN_B1F (42 | (24 << 8))
|
||||
#define MAP_VICTORY_ROAD_1F (43 | (24 << 8))
|
||||
#define MAP_VICTORY_ROAD_B1F (44 | (24 << 8))
|
||||
@@ -570,8 +570,8 @@
|
||||
#define MAP_ROUTE110_TRICK_HOUSE_PUZZLE6 (8 | (29 << 8))
|
||||
#define MAP_ROUTE110_TRICK_HOUSE_PUZZLE7 (9 | (29 << 8))
|
||||
#define MAP_ROUTE110_TRICK_HOUSE_PUZZLE8 (10 | (29 << 8))
|
||||
#define MAP_ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE (11 | (29 << 8))
|
||||
#define MAP_ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE (12 | (29 << 8))
|
||||
#define MAP_ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE (11 | (29 << 8))
|
||||
#define MAP_ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE (12 | (29 << 8))
|
||||
|
||||
// Map Group 30
|
||||
#define MAP_ROUTE113_GLASS_WORKSHOP (0 | (30 << 8))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef GUARD_FIELDMAP_H
|
||||
#define GUARD_FIELDMAP_H
|
||||
|
||||
extern struct BackupMapData gUnknown_03005DC0;
|
||||
extern struct BackupMapLayout gUnknown_03005DC0;
|
||||
|
||||
u32 MapGridGetMetatileIdAt(int, int);
|
||||
u32 MapGridGetMetatileBehaviorAt(int, int);
|
||||
|
||||
@@ -55,7 +55,7 @@ struct Tileset
|
||||
/*0x14*/ TilesetCB callback;
|
||||
};
|
||||
|
||||
struct MapData
|
||||
struct MapLayout
|
||||
{
|
||||
/*0x00*/ s32 width;
|
||||
/*0x04*/ s32 height;
|
||||
@@ -65,7 +65,7 @@ struct MapData
|
||||
/*0x14*/ struct Tileset *secondaryTileset;
|
||||
};
|
||||
|
||||
struct BackupMapData
|
||||
struct BackupMapLayout
|
||||
{
|
||||
s32 width;
|
||||
s32 height;
|
||||
@@ -160,12 +160,12 @@ struct MapConnections
|
||||
|
||||
struct MapHeader
|
||||
{
|
||||
/* 0x00 */ const struct MapData *mapData;
|
||||
/* 0x00 */ const struct MapLayout *mapLayout;
|
||||
/* 0x04 */ const struct MapEvents *events;
|
||||
/* 0x08 */ const u8 *mapScripts;
|
||||
/* 0x0C */ const struct MapConnections *connections;
|
||||
/* 0x10 */ u16 music;
|
||||
/* 0x12 */ u16 mapDataId;
|
||||
/* 0x12 */ u16 mapLayoutId;
|
||||
/* 0x14 */ u8 regionMapSectionId;
|
||||
/* 0x15 */ u8 cave;
|
||||
/* 0x16 */ u8 weather;
|
||||
|
||||
114
include/global.h
114
include/global.h
@@ -320,62 +320,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];
|
||||
@@ -422,21 +390,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
|
||||
@@ -783,7 +791,7 @@ struct SaveBlock1
|
||||
/*0x2E*/ u8 weather;
|
||||
/*0x2F*/ u8 filler_2F;
|
||||
/*0x30*/ u8 flashLevel;
|
||||
/*0x32*/ u16 mapDataId;
|
||||
/*0x32*/ u16 mapLayoutId;
|
||||
/*0x34*/ u16 mapView[0x100];
|
||||
/*0x234*/ u8 playerPartyCount;
|
||||
/*0x238*/ struct Pokemon playerParty[PARTY_SIZE];
|
||||
|
||||
@@ -301,7 +301,7 @@ typedef union // size = 0x24
|
||||
/*0x06*/ u8 nGoldSymbols;
|
||||
/*0x07*/ u8 location;
|
||||
/*0x08*/ u16 battlePoints;
|
||||
/*0x0a*/ u16 mapDataId;
|
||||
/*0x0a*/ u16 mapLayoutId;
|
||||
/*0x0c*/ u8 language;
|
||||
/*0x0d*/ u8 filler_0d[6];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
@@ -326,7 +326,7 @@ typedef union // size = 0x24
|
||||
/*0x02*/ u16 item;
|
||||
/*0x04*/ u8 location;
|
||||
/*0x05*/ u8 language;
|
||||
/*0x06*/ u16 mapDataId;
|
||||
/*0x06*/ u16 mapLayoutId;
|
||||
/*0x08*/ u8 filler_08[11];
|
||||
/*0x13*/ u8 playerName[8];
|
||||
} treasureInvestigators;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ void LoadEventObjTemplatesFromHeader(void);
|
||||
void LoadSaveblockEventObjScripts(void);
|
||||
void Overworld_SetEventObjTemplateCoords(u8 localId, s16 x, s16 y);
|
||||
void Overworld_SetEventObjTemplateMovementType(u8 localId, u8 movementType);
|
||||
const struct MapData *get_mapdata_header(void);
|
||||
const struct MapLayout *GetMapLayout(void);
|
||||
void ApplyCurrentWarp(void);
|
||||
void set_warp2_warp3_to_neg_1(void);
|
||||
void SetWarpData(struct WarpData *warp, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
@@ -82,7 +82,7 @@ bool32 Overworld_IsBikingAllowed(void);
|
||||
void SetDefaultFlashLevel(void);
|
||||
void Overworld_SetFlashLevel(s32 flashLevel);
|
||||
u8 Overworld_GetFlashLevel(void);
|
||||
void sub_8085524(u16 mapDataId);
|
||||
void sub_8085524(u16 mapLayoutId);
|
||||
void sub_8085540(u8 var);
|
||||
u8 sub_808554C(void);
|
||||
u16 GetLocationMusic(struct WarpData *warp);
|
||||
|
||||
Reference in New Issue
Block a user