diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/battle_setup.h | 23 | ||||
-rw-r--r-- | include/constants/battle_constants.h | 2 | ||||
-rw-r--r-- | include/constants/vars.h | 5 | ||||
-rw-r--r-- | include/global.h | 68 | ||||
-rw-r--r-- | include/learn_move.h | 2 | ||||
-rw-r--r-- | include/money.h | 4 | ||||
-rw-r--r-- | include/pokedex.h | 2 | ||||
-rw-r--r-- | include/secret_base.h | 2 | ||||
-rw-r--r-- | include/trade.h | 3 | ||||
-rw-r--r-- | include/tv.h | 4 |
10 files changed, 56 insertions, 59 deletions
diff --git a/include/battle_setup.h b/include/battle_setup.h index 444ab5467..8423a6e6e 100644 --- a/include/battle_setup.h +++ b/include/battle_setup.h @@ -56,16 +56,15 @@ u8 *BattleSetup_ConfigureTrainerBattle(const u8 *data); void TrainerWantsBattle(u8, u8 *); bool32 GetTrainerFlagFromScriptPointer(u8 *data); -//void sub_8082524(void); //u8 ScrSpecial_GetTrainerBattleMode(void); //u8 ScrSpecial_HasTrainerBeenFought(void); //void sub_808257C(void); //void unref_sub_8082590(void); // unused u8 HasTrainerAlreadyBeenFought(u16); -void trainer_flag_set(u16); -void trainer_flag_clear(u16); +void SetTrainerFlag(u16); +void ClearTrainerFlag(u16); void BattleSetup_StartTrainerBattle(void); -void sub_808260C(void); +void CB2_EndTrainerBattle(void); void do_choose_name_or_words_screen(void); //void ScrSpecial_StartTrainerEyeRematch(void); //void ScrSpecial_ShowTrainerIntroSpeech(void); @@ -74,10 +73,8 @@ u8 *BattleSetup_GetTrainerPostBattleScript(void); //void ScrSpecial_ShowTrainerNonBattlingSpeech(void); //void PlayTrainerEncounterMusic(void); //u8 *SanitizeString(u8 *str); -u8 *sub_808281C(void); -u8 *sub_8082830(void); +u8 *GetTrainerLoseText(void); //u8 *unref_sub_808286C(void); -u8 *sub_8082880(void); //s32 sub_8082894(const struct TrainerEyeTrainer *trainers, u16 trainerNum); //s32 sub_80828B8(const struct TrainerEyeTrainer *trainers, u16 trainerNum); //bool32 sub_80828FC(const struct TrainerEyeTrainer *trainers, u16 mapGroup, u16 mapNum); @@ -89,14 +86,12 @@ u8 *sub_8082880(void); //void sub_8082AE4(const struct TrainerEyeTrainer *trainers, u16 trainerNum); //bool8 sub_8082B10(const struct TrainerEyeTrainer *trainers, u16 trainerNum); //bool32 sub_8082B44(void); -void sub_8082B78(void); +void IncrementRematchStepCounter(void); //bool32 sub_8082BA4(void); -void sub_8082BD0(u16, u16); -s32 sub_8082C0C(u16 mapGroup, u16 mapNum); -s32 unref_sub_8082C2C(u16 mapGroup, u16 mapNum); -u16 sub_8082C4C(u16 a1); -//s32 sub_8082C68(void); +void TryUpdateRandomTrainerRematches(u16, u16); +s32 DoesSomeoneWantRematchIn(u16 mapGroup, u16 mapNum); +s32 IsRematchTrainerIn(u16 mapGroup, u16 mapNum); +u16 GetRematchTrainerId(u16 a1); //u8 ScrSpecial_GetTrainerEyeRematchFlag(void); -void sub_8082CB8(void); #endif // GUARD_BATTLE_SETUP_H diff --git a/include/constants/battle_constants.h b/include/constants/battle_constants.h index c61d54f76..f7efb0dfd 100644 --- a/include/constants/battle_constants.h +++ b/include/constants/battle_constants.h @@ -105,6 +105,8 @@ #define BATTLE_TYPE_REGI 0x4000 #define BATTLE_TYPE_LINK_DOUBLE (BATTLE_TYPE_MULTI | BATTLE_TYPE_TRAINER | BATTLE_TYPE_LINK | BATTLE_TYPE_DOUBLE) +#define SECRET_BASE_OPPONENT 0x400 + #define BATTLE_WON 0x1 #define BATTLE_LOST 0x2 #define BATTLE_DREW 0x3 diff --git a/include/constants/vars.h b/include/constants/vars.h index 13114e09b..682d45003 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -3,6 +3,8 @@ #define VAR_0x3F20 0x3F20 +#define VARS_START 0x4000 + // temporary vars // The first 0x10 vars are are temporary--they are cleared every time a map is loaded. #define VAR_TEMP_0 0x4000 @@ -60,7 +62,8 @@ #define VAR_ENIGMA_BERRY_AVAILABLE 0x402D #define VAR_DAYS 0x4040 - +#define VAR_FANCLUB_UNKNOWN_1 0x4041 // TODO: document these two fanclub vars +#define VAR_FANCLUB_UNKNOWN_2 0x4042 #define VAR_DEPT_STORE_FLOOR 0x4043 #define VAR_TRICK_HOUSE_ROOMS_COMPLETED 0x4044 #define VAR_LOTTERY_PRIZE 0x4045 diff --git a/include/global.h b/include/global.h index a4e71852c..4ae5de873 100644 --- a/include/global.h +++ b/include/global.h @@ -241,8 +241,8 @@ struct EasyChatPair struct TVShowCommon { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u8 pad02[20]; /*0x16*/ u16 var16[3]; /*0x1C*/ u8 srcTrainerId3Lo; @@ -257,8 +257,8 @@ struct TVShowCommon struct TVShowFanClubLetter { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u16 species; /*0x04*/ u16 pad04[6]; /*0x10*/ u8 playerName[8]; @@ -267,8 +267,8 @@ struct TVShowFanClubLetter struct TVShowRecentHappenings { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u16 var02; /*0x04*/ u16 var04[6]; /*0x10*/ u8 playerName[8]; @@ -278,8 +278,8 @@ struct TVShowRecentHappenings struct TVShowFanclubOpinions { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u16 var02; /*0x04*/ u8 var04A:4; /*0x04*/ u8 var04B:4; @@ -294,16 +294,16 @@ struct TVShowFanclubOpinions struct TVShowUnknownType04 { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u8 pad02[4]; /*0x06*/ u16 var06; }; struct TVShowNameRaterShow { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u16 species; /*0x04*/ u8 pokemonName[11]; /*0x0F*/ u8 trainerName[11]; @@ -316,8 +316,8 @@ struct TVShowNameRaterShow struct TVShowBravoTrainerPokemonProfiles { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u16 species; /*0x04*/ u16 var04[2]; /*0x08*/ u8 pokemonNickname[11]; @@ -333,8 +333,8 @@ struct TVShowBravoTrainerPokemonProfiles struct TVShowBravoTrainerBattleTowerSpotlight { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u8 trainerName[8]; /*0x0A*/ u16 species; /*0x0C*/ u8 pokemonName[8]; @@ -349,8 +349,8 @@ struct TVShowBravoTrainerBattleTowerSpotlight struct TVShowPokemonToday { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u8 language; /*0x03*/ u8 language2; /*0x04*/ u8 nickname[11]; @@ -362,8 +362,8 @@ struct TVShowPokemonToday struct TVShowSmartShopper { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u8 priceReduced; /*0x03*/ u8 language; /*0x04*/ u8 pad04[2]; @@ -375,8 +375,8 @@ struct TVShowSmartShopper struct TVShowPokemonTodayFailed { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u8 language; /*0x03*/ u8 pad03[9]; /*0x0c*/ u16 species; @@ -389,8 +389,8 @@ struct TVShowPokemonTodayFailed struct TVShowPokemonAngler { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u8 var02; /*0x03*/ u8 var03; /*0x04*/ u16 var04; @@ -401,8 +401,8 @@ struct TVShowPokemonAngler struct TVShowWorldOfMasters { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u16 var02; /*0x04*/ u16 var04; /*0x06*/ u16 var06; @@ -415,8 +415,8 @@ struct TVShowWorldOfMasters struct TVShowMassOutbreak { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u8 var02; /*0x03*/ u8 var03; /*0x04*/ u16 moves[4]; @@ -428,7 +428,7 @@ struct TVShowMassOutbreak /*0x13*/ u8 probability; /*0x14*/ u8 level; /*0x15*/ u8 var15; - /*0x16*/ u16 var16; + /*0x16*/ u16 daysLeft; /*0x18*/ u8 language; u8 pad19[11]; }; @@ -524,11 +524,11 @@ union MauvilleMan u8 filler[0x40]; // needed to pad out the struct }; -struct UnknownSaveStruct2ABC +struct PokeNews { - u8 val0; - u8 val1; - u16 val2; + u8 kind; + u8 state; + u16 days; }; struct GabbyAndTyData @@ -671,7 +671,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x272C*/ u8 decorCushion[10]; /*0x2736*/ u8 padding_2736[2]; /*0x2738*/ TVShow tvShows[25]; - /*0x2ABC*/ struct UnknownSaveStruct2ABC unknown_2ABC[16]; + /*0x2ABC*/ struct PokeNews pokeNews[16]; /*0x2AFC*/ u16 outbreakPokemonSpecies; /*0x2AFE*/ u8 outbreakLocationMapNum; /*0x2AFF*/ u8 outbreakLocationMapGroup; diff --git a/include/learn_move.h b/include/learn_move.h index 85fbf046e..fca236ec9 100644 --- a/include/learn_move.h +++ b/include/learn_move.h @@ -1,6 +1,6 @@ #ifndef GUARD_LEARN_MOVE_H #define GUARD_LEARN_MOVE_H -void sub_8132670(void); +void TeachMoveTutorMove(void); #endif // GUARD_LEARN_MOVE_H diff --git a/include/money.h b/include/money.h index 5a0acd482..9f4ef71bc 100644 --- a/include/money.h +++ b/include/money.h @@ -11,7 +11,7 @@ void sub_80B7B34(u8, u8, int); void UpdateMoneyWindow(u32, u8, u8); void OpenMoneyWindow(u32, u8, u8); void CloseMoneyWindow(u8, u8); -bool8 sub_80B7CE8(void); -void sub_80B7D0C(void); +bool8 HasEnoughMoneyFor(void); +void PayMoneyFor(void); #endif // GUARD_MONEY_H diff --git a/include/pokedex.h b/include/pokedex.h index c47494e1f..d8416889a 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -22,7 +22,7 @@ s8 GetSetPokedexFlag(u16, u8); u16 GetNationalPokedexCount(u8); u16 GetHoennPokedexCount(u8); -bool8 sub_8090FC0(void); +bool8 CompletedHoennPokedex(void); u16 sub_8090FF4(void); #endif // GUARD_POKEDEX_H diff --git a/include/secret_base.h b/include/secret_base.h index abe5d781f..a3fa22c05 100644 --- a/include/secret_base.h +++ b/include/secret_base.h @@ -17,7 +17,7 @@ u8 sub_80BC050(); u8 *GetSecretBaseMapName(u8 *dest); void sub_80BC300(); u8 sub_80BCCA4(u8 secretBaseIndex); -const u8 *sub_80BCCE8(void); +const u8 *GetSecretBaseTrainerLoseText(void); void sub_80BCF1C(u8 taskId); void sub_80BD674(void *playerRecords, u32 size, u8 c); diff --git a/include/trade.h b/include/trade.h index 642bdcd65..46f58a802 100644 --- a/include/trade.h +++ b/include/trade.h @@ -51,14 +51,11 @@ extern const u32 gUnknown_0820CA98[]; extern const u16 gUnknown_0820F798[]; void sub_8047CD8(void); -u16 sub_804DB2C(void); -void sub_804DB68(void); void sub_804E174(void); extern const u8 gOtherText_MaleSymbol3[2]; extern const u8 gOtherText_FemaleSymbol3[2]; extern const u8 gOtherText_GenderlessSymbol[2]; void sub_804E22C(void); -u16 sub_804D89C(void); #endif //POKERUBY_TRADE_H diff --git a/include/tv.h b/include/tv.h index c2158ece0..91b871f71 100644 --- a/include/tv.h +++ b/include/tv.h @@ -43,7 +43,7 @@ void sub_80BEA5C(u16); void sub_80BEA88(void); void sub_80BEA88(void); void sub_80BEB20(void); -int sub_80BEBC8(struct UnknownSaveStruct2ABC *arg0); +int sub_80BEBC8(struct PokeNews *arg0); extern void sub_80BEBF4(void); void sub_80BEC10(u8); bool8 GetPriceReduction(u8); @@ -80,7 +80,7 @@ void sub_80C01D4(void); void sub_80C03A8(u8 showidx); void sub_80C03C8(u16 species, u8 showidx); void sub_80C0408(void); -bool8 sub_80C06E8(struct UnknownSaveStruct2ABC *arg0, struct UnknownSaveStruct2ABC *arg1, s8 arg2); +bool8 sub_80C06E8(struct PokeNews *arg0, struct PokeNews *arg1, s8 arg2); void TVShowConvertInternationalString(u8 *, u8 *, u8); void DoTVShowTheNameRaterShow(void); void DoTVShowPokemonTodaySuccessfulCapture(void); |