From a54fa23b5f30b0c6cc24f211137b3f6c892b3cd5 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 15 Aug 2018 15:49:50 +0200 Subject: Begin battle frontier 1 --- include/global.h | 60 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 48 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/global.h b/include/global.h index 1a179d858..0d2167c47 100644 --- a/include/global.h +++ b/include/global.h @@ -330,6 +330,21 @@ struct EmeraldBattleTowerRecord /*0xE8*/ u32 checksum; }; +struct FrontierMonData +{ + u16 moves[4]; + u8 evs[6]; + u8 nature; +}; + +struct FrontierUnkStruct1 +{ + u16 unk0:10; + u16 unk1:1; + u16 unk2:2; + u16 unk3:3; +}; + struct BattleFrontier { /*0x64C*/ struct EmeraldBattleTowerRecord battleTower; @@ -352,9 +367,11 @@ struct BattleFrontier /*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]; + /*0xCAA*/ u16 field_CAA[3]; + /*0xCB0*/ u16 field_CB0; /*0xCB2*/ u16 field_CB2; - /*0xCB4*/ u16 field_CB4[22]; + /*0xCB4*/ u16 field_CB4[20]; + /*0xCDC*/ u32 field_CDC; /*0xCE0*/ u16 field_CE0[4][2]; /*0xCF0*/ u16 field_CF0[2]; /*0xCF4*/ u16 field_CF4[2]; @@ -362,17 +379,33 @@ struct BattleFrontier /*0xCFC*/ u16 field_CFC[5]; /*0xD06*/ u8 field_D06; /*0xD07*/ u8 field_D07; - /*0xD08*/ u8 filler_D08; + /*0xD08*/ u8 field_D08_0:1; + /*0xD08*/ u8 field_D08_1:1; + /*0xD08*/ u8 field_D08_2:1; + /*0xD08*/ u8 field_D08_3:1; + /*0xD08*/ u8 field_D08_4:1; + /*0xD08*/ u8 field_D08_5:1; + /*0xD08*/ u8 field_D08_6:1; + /*0xD08*/ u8 field_D08_7:1; /*0xD09*/ u8 filler_D09; - /*0xD0A*/ u8 filler_D0A; - /*0xD0B*/ u8 filler_D0B; - /*0xD0C*/ u16 field_D0C[2]; - /*0xD10*/ u8 filler_D10; - /*0xD11*/ u8 filler_D11; - /*0xD12*/ u8 filler_D12; - /*0xD13*/ u8 filler_D13; + /*0xD0A*/ u8 field_D0A; + /*0xD0B*/ u8 field_D0B; + /*0xD0C*/ u16 field_D0C[2][2]; /*0xD14*/ u16 field_D14[2]; - /*0xD18*/ u8 field_D18[0xB0]; + /*0xD18*/ u8 field_D18; + /*0xD19*/ u8 field_D19; + /*0xD1A*/ u8 field_D1A; + /*0xD1B*/ u8 field_D1B; + /*0xD1C*/ u8 field_D1C; + /*0xD1D*/ u8 field_D1D; + /*0xD1E*/ u8 field_D1E; + /*0xD1F*/ u8 field_D1F; + /*0xD20*/ u8 field_D20; + /*0xD21*/ u8 field_D21; + /*0xD22*/ u8 field_D22; + /*0xD23*/ u8 field_D23; + /*0xD24*/ struct FrontierUnkStruct1 field_D24[16]; + /*0xD64*/ u16 field_D64[16][3]; /*0xDC8*/ u16 field_DC8[2]; /*0xDCC*/ u8 filler_DCC[4]; /*0xDD0*/ u16 field_DD0[2]; @@ -409,7 +442,10 @@ struct BattleFrontier /*0xEBA*/ u8 field_EBA[39]; /*0xEE1*/ u8 field_EE1[2][PLAYER_NAME_LENGTH]; /*0xEF1*/ u8 field_EF1[2][4]; - /*0xEF9*/ u8 field_EF9[51]; + /*0xEF9*/ u8 field_EF9; + /*0xEFA*/ u8 field_EFA; + /*0xEFB*/ u8 field_EFB; + /*0xEFC*/ struct FrontierMonData field_EFC[3]; }; struct SaveBlock2 -- cgit v1.2.3 From e2f5e7344593c980b1fbce0a67ab4d57ff76fcd7 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 15 Aug 2018 23:04:46 +0200 Subject: More battle dome --- include/battle_message.h | 1 + include/global.h | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/battle_message.h b/include/battle_message.h index 147bfa501..c68607246 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -224,6 +224,7 @@ extern const u8* const gStatNamesTable[]; extern const u8* const gPokeblockWasTooXStringTable[]; extern const u8* const gRefereeStringsTable[]; extern const u8* const gStatNamesTable2[]; +extern const u8 *const gRoundsStringTable[]; extern const u8 gText_PkmnIsEvolving[]; extern const u8 gText_CongratsPkmnEvolved[]; diff --git a/include/global.h b/include/global.h index 0d2167c47..5b78fc4c0 100644 --- a/include/global.h +++ b/include/global.h @@ -337,14 +337,16 @@ struct FrontierMonData u8 nature; }; -struct FrontierUnkStruct1 +struct BattleDomeTrainer { - u16 unk0:10; + u16 trainerId:10; u16 unk1:1; u16 unk2:2; u16 unk3:3; }; +#define DOME_TOURNAMENT_TRAINERS_COUNT 16 + struct BattleFrontier { /*0x64C*/ struct EmeraldBattleTowerRecord battleTower; @@ -404,8 +406,8 @@ struct BattleFrontier /*0xD21*/ u8 field_D21; /*0xD22*/ u8 field_D22; /*0xD23*/ u8 field_D23; - /*0xD24*/ struct FrontierUnkStruct1 field_D24[16]; - /*0xD64*/ u16 field_D64[16][3]; + /*0xD24*/ struct BattleDomeTrainer domeTrainers[DOME_TOURNAMENT_TRAINERS_COUNT]; + /*0xD64*/ u16 domeMonId[DOME_TOURNAMENT_TRAINERS_COUNT][3]; /*0xDC8*/ u16 field_DC8[2]; /*0xDCC*/ u8 filler_DCC[4]; /*0xDD0*/ u16 field_DD0[2]; -- cgit v1.2.3 From 63cbc8f3ccb11b05c627717a2de82d3134d599d9 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 18 Aug 2018 00:54:18 +0200 Subject: battle dome - a couple more functions --- include/global.h | 15 ++------------- include/menu.h | 2 +- 2 files changed, 3 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/global.h b/include/global.h index 5b78fc4c0..4bfa6194d 100644 --- a/include/global.h +++ b/include/global.h @@ -393,19 +393,8 @@ struct BattleFrontier /*0xD0A*/ u8 field_D0A; /*0xD0B*/ u8 field_D0B; /*0xD0C*/ u16 field_D0C[2][2]; - /*0xD14*/ u16 field_D14[2]; - /*0xD18*/ u8 field_D18; - /*0xD19*/ u8 field_D19; - /*0xD1A*/ u8 field_D1A; - /*0xD1B*/ u8 field_D1B; - /*0xD1C*/ u8 field_D1C; - /*0xD1D*/ u8 field_D1D; - /*0xD1E*/ u8 field_D1E; - /*0xD1F*/ u8 field_D1F; - /*0xD20*/ u8 field_D20; - /*0xD21*/ u8 field_D21; - /*0xD22*/ u8 field_D22; - /*0xD23*/ u8 field_D23; + /*0xD14*/ u16 field_D14[2][2]; + /*0xD1C*/ u16 field_D1C[2][2]; /*0xD24*/ struct BattleDomeTrainer domeTrainers[DOME_TOURNAMENT_TRAINERS_COUNT]; /*0xD64*/ u16 domeMonId[DOME_TOURNAMENT_TRAINERS_COUNT][3]; /*0xDC8*/ u16 field_DC8[2]; diff --git a/include/menu.h b/include/menu.h index 5dfd99c64..627374758 100644 --- a/include/menu.h +++ b/include/menu.h @@ -53,7 +53,7 @@ void *decompress_and_copy_tile_data_to_vram(u8 bgId, const void *src, int size, bool8 free_temp_tile_data_buffers_if_possible(void); struct WindowTemplate CreateWindowTemplate(u8, u8, u8, u8, u8, u8, u16); void CreateYesNoMenu(const struct WindowTemplate *windowTemplate, u16 borderFirstTileNum, u8 borderPalette, u8 initialCursorPos); -void copy_decompressed_tile_data_to_vram_autofree(u8 bgId, const void *src, int size, u16 offset, u8 mode); +void DecompressAndLoadBgGfxUsingHeap(u8 bgId, const void *src, int size, u16 offset, u8 mode); s8 Menu_ProcessInputNoWrap_(void); s8 ProcessMenuInput_other(void); void do_scheduled_bg_tilemap_copies_to_vram(void); -- cgit v1.2.3 From e4649245bac064d700413e922b067ecb50133175 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 18 Aug 2018 19:52:25 +0200 Subject: this file is too much --- include/constants/trainers.h | 1 + include/global.h | 1 + 2 files changed, 2 insertions(+) (limited to 'include') diff --git a/include/constants/trainers.h b/include/constants/trainers.h index 57c7fd523..df908c8bf 100644 --- a/include/constants/trainers.h +++ b/include/constants/trainers.h @@ -5,6 +5,7 @@ // Special Trainer Ids. #define TRAINER_FRONTIER_BRAIN 1022 +#define TRAINER_PLAYER 1023 #define TRAINER_SECRET_BASE 1024 #define TRAINER_LINK_OPPONENT 2048 #define TRAINER_OPPONENT_C00 3072 diff --git a/include/global.h b/include/global.h index 4bfa6194d..9f2c7c9a2 100644 --- a/include/global.h +++ b/include/global.h @@ -397,6 +397,7 @@ struct BattleFrontier /*0xD1C*/ u16 field_D1C[2][2]; /*0xD24*/ struct BattleDomeTrainer domeTrainers[DOME_TOURNAMENT_TRAINERS_COUNT]; /*0xD64*/ u16 domeMonId[DOME_TOURNAMENT_TRAINERS_COUNT][3]; + /*0xD64*/ u16 field_DC4[2]; /*0xDC8*/ u16 field_DC8[2]; /*0xDCC*/ u8 filler_DCC[4]; /*0xDD0*/ u16 field_DD0[2]; -- cgit v1.2.3 From fb19a8fc59fcf67c6d4ddfd696e172bcacff27b7 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 19 Aug 2018 01:06:10 +0200 Subject: battle dome cards sensibly renamed --- include/battle_dome_cards.h | 13 ------------- include/constants/trainers.h | 4 ++-- include/trainer_pokemon_sprites.h | 13 +++++++++++++ 3 files changed, 15 insertions(+), 15 deletions(-) delete mode 100644 include/battle_dome_cards.h create mode 100644 include/trainer_pokemon_sprites.h (limited to 'include') diff --git a/include/battle_dome_cards.h b/include/battle_dome_cards.h deleted file mode 100644 index a0696d156..000000000 --- a/include/battle_dome_cards.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef GUARD_BATTLE_DOME_CARDS_H -#define GUARD_BATTLE_DOME_CARDS_H - -bool16 dp13_810BB8C(void); -u16 sub_818D3E4(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y, u8 paletteSlot, u16 paletteTag); -u16 sub_818D7D8(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag); -u16 sub_818D820(u16 spriteId); -u16 sub_818D8AC(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag); -u16 sub_818D8F0(u16 spriteId); -u16 sub_818D938(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId); -u8 sub_818D97C(u8 a0, u8 a1); - -#endif //GUARD_BATTLE_DOME_CARDS_H diff --git a/include/constants/trainers.h b/include/constants/trainers.h index df908c8bf..f79216d94 100644 --- a/include/constants/trainers.h +++ b/include/constants/trainers.h @@ -174,10 +174,10 @@ #define FACILITY_CLASS_TWINS 0x39 #define FACILITY_CLASS_SAILOR 0x3a #define FACILITY_CLASS_PKMN_TRAINER_1 0x3b -#define FACILITY_CLASS_PKMN_TRAINER_MAY 0x3c +#define FACILITY_CLASS_PKMN_TRAINER_BRENDAN 0x3c #define FACILITY_CLASS_PKMN_TRAINER_3 0x3d #define FACILITY_CLASS_PKMN_TRAINER_4 0x3e -#define FACILITY_CLASS_PKMN_TRAINER_BRENDAN 0x3f +#define FACILITY_CLASS_PKMN_TRAINER_MAY 0x3f #define FACILITY_CLASS_PKMN_TRAINER_6 0x40 #define FACILITY_CLASS_PKMN_TRAINER_7 0x41 #define FACILITY_CLASS_PKMN_BREEDER_2 0x42 diff --git a/include/trainer_pokemon_sprites.h b/include/trainer_pokemon_sprites.h new file mode 100644 index 000000000..90ceedaf5 --- /dev/null +++ b/include/trainer_pokemon_sprites.h @@ -0,0 +1,13 @@ +#ifndef GUARD_TRAINER_POKEMON_SPRITES_H +#define GUARD_TRAINER_POKEMON_SPRITES_H + +bool16 ResetAllPicSprites(void); +u16 CreatePicSprite2(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y, u8 paletteSlot, u16 paletteTag); +u16 CreateMonPicSprite_HandleDeoxys(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag); +u16 FreeAndDestroyMonPicSprite(u16 spriteId); +u16 CreateTrainerPicSprite(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag); +u16 FreeAndDestroyTrainerPicSprite(u16 spriteId); +u16 sub_818D938(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId); +u16 PlayerGenderToFrontTrainerPicId_Debug(u8 gender, bool8 getClass); + +#endif // GUARD_TRAINER_POKEMON_SPRITES_H -- cgit v1.2.3 From 239c56496b2bc88f485b6305ddce44155735410b Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 19 Aug 2018 17:13:05 +0200 Subject: This is impossible --- include/pokemon.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/pokemon.h b/include/pokemon.h index a60ad66be..09496b5c3 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -456,6 +456,7 @@ extern const u8 gStatStageRatios[][2]; extern const u16 gUnknown_08329D54[]; extern const struct SpriteTemplate gUnknown_08329D98[]; extern const struct CompressedSpritePalette gMonPaletteTable[]; +extern const s8 gNatureStatTable[][5]; void ZeroBoxMonData(struct BoxPokemon *boxMon); void ZeroMonData(struct Pokemon *mon); -- cgit v1.2.3 From 5da12f2b21e5e9018fc151b2765587cb84109cfb Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 19 Aug 2018 22:26:07 +0200 Subject: battle dome - more work --- include/global.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/global.h b/include/global.h index 9f2c7c9a2..a4db847a4 100644 --- a/include/global.h +++ b/include/global.h @@ -431,7 +431,14 @@ struct BattleFrontier /*0xE6E*/ u16 field_E6E; /*0xE70*/ u8 field_E70[72]; /*0xEB8*/ u16 frontierBattlePoints; - /*0xEBA*/ u8 field_EBA[39]; + /*0xEBA*/ u8 field_EBA; + /*0xEBB*/ u8 field_EBB; + /*0xEBC*/ u8 field_EBC; + /*0xEBD*/ u8 field_EBD; + /*0xEBE*/ u8 field_EBE; + /*0xEBF*/ u8 field_EBF; + /*0xEC0*/ u16 field_EC0[16]; + /*0xEE0*/ u8 field_EE0; /*0xEE1*/ u8 field_EE1[2][PLAYER_NAME_LENGTH]; /*0xEF1*/ u8 field_EF1[2][4]; /*0xEF9*/ u8 field_EF9; -- cgit v1.2.3 From 62a645abafdd17b737562b4ab6b40739d13722c2 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 25 Aug 2018 18:46:15 +0200 Subject: Up To CopyDomeTrainerName --- include/battle_tower.h | 6 +++--- include/global.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/battle_tower.h b/include/battle_tower.h index e1655f2c6..87581074e 100644 --- a/include/battle_tower.h +++ b/include/battle_tower.h @@ -24,7 +24,7 @@ union BattleTowerRecord struct BattleFrontierTrainer { - u32 trainerClass; + u32 facilityClass; u8 trainerName[8]; u16 speechBefore[6]; u16 speechWin[6]; @@ -32,7 +32,7 @@ struct BattleFrontierTrainer u16 *btMonPool; }; -extern struct BattleFrontierTrainer *gUnknown_0203BC88; +extern const struct BattleFrontierTrainer *gFacilityTrainers; u16 sub_8164FCC(u8, u8); void sub_81659DC(struct RSBattleTowerRecord *a0, struct RSBattleTowerRecord *a1); @@ -40,7 +40,7 @@ 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 ConvertBattleFrontierTrainerSpeechToString(const u16 *words); void GetFrontierTrainerName(u8 *dest, u16 trainerIdx); void GetEreaderTrainerName(u8 *dest); diff --git a/include/global.h b/include/global.h index a4db847a4..d3abb8269 100644 --- a/include/global.h +++ b/include/global.h @@ -340,8 +340,8 @@ struct FrontierMonData struct BattleDomeTrainer { u16 trainerId:10; - u16 unk1:1; - u16 unk2:2; + u16 isEliminated:1; + u16 eliminatedAt:2; u16 unk3:3; }; -- cgit v1.2.3 From edcf04b665a9fa13d086dd486c4fe7b1649a7bbf Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 25 Aug 2018 19:59:47 +0200 Subject: Document battle dome. --- include/battle_dome.h | 9 +++++++++ include/battle_frontier_1.h | 8 -------- include/bg.h | 2 +- include/constants/battle_frontier.h | 10 ++++++++++ include/constants/vars.h | 2 +- include/global.h | 2 +- 6 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 include/battle_dome.h delete mode 100644 include/battle_frontier_1.h (limited to 'include') diff --git a/include/battle_dome.h b/include/battle_dome.h new file mode 100644 index 000000000..d05b08689 --- /dev/null +++ b/include/battle_dome.h @@ -0,0 +1,9 @@ +#ifndef GUARD_BATTLE_DOME_H +#define GUARD_BATTLE_DOME_H + +extern u32 gUnknown_0203CD70; + +s32 GetTrainerMonCountInBits(u16 tournamentTrainerId); +s32 TrainerIdToDomeTournamentId(u16 trainerId); + +#endif // GUARD_BATTLE_DOME_H diff --git a/include/battle_frontier_1.h b/include/battle_frontier_1.h deleted file mode 100644 index b9c633efc..000000000 --- a/include/battle_frontier_1.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef GUARD_BATTLE_FRONTIER_1_H -#define GUARD_BATTLE_FRONTIER_1_H - -bool32 sub_8196094(void); -void sub_8197080(u8 *); -void sub_8196080(const u8 *str); - -#endif // GUARD_BATTLE_FRONTIER_1_H diff --git a/include/bg.h b/include/bg.h index ea84c1573..f2d4e7948 100644 --- a/include/bg.h +++ b/include/bg.h @@ -69,7 +69,7 @@ void* GetBgTilemapBuffer(u8 bg); void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset); void CopyBgTilemapBufferToVram(u8 bg); void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 width, u8 height); -void CopyToBgTilemapBufferRect_ChangePalette(u8 bg, void *src, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette); +void CopyToBgTilemapBufferRect_ChangePalette(u8 bg, const void *src, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette); void CopyRectToBgTilemapBufferRect(u8 bg, const void *src, u8 srcX, u8 srcY, u8 srcWidth, u8 srcHeight, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette1, u16 tileOffset, u16 palette2); void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height); void FillBgTilemapBufferRect(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height, u8 palette); diff --git a/include/constants/battle_frontier.h b/include/constants/battle_frontier.h index 4145805c4..fddcdc8fe 100644 --- a/include/constants/battle_frontier.h +++ b/include/constants/battle_frontier.h @@ -10,4 +10,14 @@ #define FRONTIER_FACILITY_PIKE 5 #define FRONTIER_FACILITY_PYRAMID 6 +// Battle Frontier lvl modes. +#define FRONTIER_LVL_50 0 +#define FRONTIER_LVL_OPEN 1 + +// Battle Frontier battle modes. +#define FRONTIER_MODE_SINGLES 0 +#define FRONTIER_MODE_DOUBLES 1 +#define FRONTIER_MODE_MULTIS 2 +#define FRONTIER_MODE_LINK_MULTIS 3 + #endif // GUARD_CONSTANTS_BATTLE_FRONTIER_H diff --git a/include/constants/vars.h b/include/constants/vars.h index e2c59b4fb..9854ec5a2 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -222,7 +222,7 @@ #define VAR_0x40CB 0x40CB #define VAR_0x40CC 0x40CC #define VAR_0x40CD 0x40CD -#define VAR_0x40CE 0x40CE +#define VAR_FRONTIER_BATTLE_MODE 0x40CE #define VAR_FRONTIER_FACILITY 0x40CF #define VAR_0x40D0 0x40D0 #define VAR_0x40D1 0x40D1 diff --git a/include/global.h b/include/global.h index d3abb8269..bb843bddd 100644 --- a/include/global.h +++ b/include/global.h @@ -362,7 +362,7 @@ struct BattleFrontier /*0xC14*/ u16 ecwords_C14[6]; /*0xC20*/ u8 filler_C20[0x88]; /*0xCA8*/ u8 field_CA8; - /*0xCA9*/ u8 chosenLvl:2; // 0x1, 0x2 -> 0x3 + /*0xCA9*/ u8 lvlMode: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 -- cgit v1.2.3 From 2b7c138cbe165cdfa0ad8f7044efc439d9888cd2 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 25 Aug 2018 21:04:12 +0200 Subject: Some labels --- include/battle_scripts.h | 2 +- include/constants/battle_script_commands.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/battle_scripts.h b/include/battle_scripts.h index ffd999660..1197dfb6e 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -256,7 +256,7 @@ extern const u8 BattleScript_82DB87D[]; extern const u8 BattleScript_82DB881[]; extern const u8 BattleScript_82DB887[]; extern const u8 BattleScript_82DB89D[]; -extern const u8 BattleScript_82DB8BE[]; +extern const u8 BattleScript_ArenaTurnBeginning[]; extern const u8 BattleScript_82DB8E0[]; extern const u8 BattleScript_82DB8F3[]; extern const u8 BattleScript_82DB973[]; diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index 84ec9d512..bd9d8e67d 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -71,6 +71,8 @@ #define VARIOUS_WAIT_CRY 18 #define VARIOUS_RETURN_OPPONENT_MON1 19 #define VARIOUS_RETURN_OPPONENT_MON2 20 +#define VARIOUS_VOLUME_DOWN 21 +#define VARIOUS_VOLUME_UP 22 #define VARIOUS_SET_TELEPORT_OUTCOME 25 #define VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC 26 -- cgit v1.2.3 From 78cad0dee52e69ab7cca6b8ddc793820697ba01f Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 26 Aug 2018 15:27:06 +0200 Subject: try battle tent and fail --- include/battle_tower.h | 10 ++++++++++ include/global.h | 14 +++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/battle_tower.h b/include/battle_tower.h index 87581074e..d7ff70006 100644 --- a/include/battle_tower.h +++ b/include/battle_tower.h @@ -32,7 +32,17 @@ struct BattleFrontierTrainer u16 *btMonPool; }; +struct FacilityMon +{ + u16 species; + u16 moves[4]; + u8 itemTableId; + u8 evSpread; + u8 nature; +}; + extern const struct BattleFrontierTrainer *gFacilityTrainers; +extern const struct FacilityMon *gFacilityTrainerMons; u16 sub_8164FCC(u8, u8); void sub_81659DC(struct RSBattleTowerRecord *a0, struct RSBattleTowerRecord *a1); diff --git a/include/global.h b/include/global.h index bb843bddd..ab31e3c5d 100644 --- a/include/global.h +++ b/include/global.h @@ -337,6 +337,12 @@ struct FrontierMonData u8 nature; }; +struct Struct_field_E70 +{ + u16 monId; + u8 unk2[9]; +}; + struct BattleDomeTrainer { u16 trainerId:10; @@ -398,10 +404,8 @@ struct BattleFrontier /*0xD24*/ struct BattleDomeTrainer domeTrainers[DOME_TOURNAMENT_TRAINERS_COUNT]; /*0xD64*/ u16 domeMonId[DOME_TOURNAMENT_TRAINERS_COUNT][3]; /*0xD64*/ u16 field_DC4[2]; - /*0xDC8*/ u16 field_DC8[2]; - /*0xDCC*/ u8 filler_DCC[4]; - /*0xDD0*/ u16 field_DD0[2]; - /*0xDD4*/ u16 field_DD4[2]; + /*0xDC8*/ u16 field_DC8[2][2]; + /*0xDD0*/ u16 field_DD0[2][2]; /*0xDD8*/ u16 field_DD8; /*0xDDA*/ u16 field_DDA[2]; /*0xDDE*/ u16 field_DDE[2]; @@ -429,7 +433,7 @@ struct BattleFrontier /*0xE6A*/ u16 field_E6A; /*0xE6C*/ u16 field_E6C; /*0xE6E*/ u16 field_E6E; - /*0xE70*/ u8 field_E70[72]; + /*0xE70*/ struct Struct_field_E70 field_E70[6]; /*0xEB8*/ u16 frontierBattlePoints; /*0xEBA*/ u8 field_EBA; /*0xEBB*/ u8 field_EBB; -- cgit v1.2.3 From 3dea8fa2658cb1055fb835983e8a738cf543e232 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 29 Aug 2018 20:38:54 +0200 Subject: battle tent review changes --- include/gba/io_reg.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/gba/io_reg.h b/include/gba/io_reg.h index 01d8c311e..9327d6cb0 100644 --- a/include/gba/io_reg.h +++ b/include/gba/io_reg.h @@ -550,12 +550,14 @@ #define WININ_WIN0_BG1 (1 << 1) #define WININ_WIN0_BG2 (1 << 2) #define WININ_WIN0_BG3 (1 << 3) +#define WININ_WIN0_BG_ALL (WININ_WIN0_BG0 | WININ_WIN0_BG1 | WININ_WIN0_BG2 | WININ_WIN0_BG3) #define WININ_WIN0_OBJ (1 << 4) #define WININ_WIN0_CLR (1 << 5) #define WININ_WIN1_BG0 (1 << 8) #define WININ_WIN1_BG1 (1 << 9) #define WININ_WIN1_BG2 (1 << 10) #define WININ_WIN1_BG3 (1 << 11) +#define WININ_WIN1_BG_ALL (WININ_WIN1_BG0 | WININ_WIN1_BG1 | WININ_WIN1_BG2 | WININ_WIN1_BG3) #define WININ_WIN1_OBJ (1 << 12) #define WININ_WIN1_CLR (1 << 13) -- cgit v1.2.3