Skip to content

Commit

Permalink
Merge branch 'master' into scrcmd_message
Browse files Browse the repository at this point in the history
  • Loading branch information
cbt6 committed May 21, 2023
2 parents 872f936 + 3275b7d commit b090402
Show file tree
Hide file tree
Showing 81 changed files with 1,781 additions and 1,782 deletions.
4 changes: 2 additions & 2 deletions asm/unk_0206D494.s
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ _0206D892:

thumb_func_start MonIsInGameTradePoke
MonIsInGameTradePoke: ; 0x0206D894
; BOOL MonIsInGameTradePoke(struct Pokemon *poke, int tradeno);
; BOOL MonIsInGameTradePoke(Pokemon *poke, int tradeno);
push {r3, r4, r5, r6, lr}
sub sp, #4
add r5, r0, #0
Expand Down Expand Up @@ -673,7 +673,7 @@ _0206D9CC: .word gGameVersion

thumb_func_start MonIsInGameTradePokeEx
MonIsInGameTradePokeEx: ; 0x0206D9D0
; BOOL MonIsInGameTradePokeEx(struct Pokemon *poke, struct InGameTrade *trade, int tradeno);
; BOOL MonIsInGameTradePokeEx(Pokemon *poke, struct InGameTrade *trade, int tradeno);
push {r3, r4, r5, r6, r7, lr}
sub sp, #8
add r5, r1, #0
Expand Down
2 changes: 1 addition & 1 deletion include/battle_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ int BattleSys_Random(BattleSystem *bsys);
PLAYERPROFILE *BattleSys_GetPlayerProfile(BattleSystem *bsys, int a1);
PARTY *BattleSys_GetParty(BattleSystem *bsys, int battlerId);
int BattleSys_GetPartySize(BattleSystem *bsys, int battlerId);
POKEMON *BattleSystem_GetPartyMon(BattleSystem *bsys, int battlerId, int index);
Pokemon *BattleSystem_GetPartyMon(BattleSystem *bsys, int battlerId, int index);
int BattleSys_GetTerrainId(BattleSystem *bsys);
int ov12_0223ABB8(BattleSystem *bsys, int battlerId, int a2);
void BattleSys_RecoverStatus(BattleSystem *bsys, int battlerIdA, int battlerIdB, int a2, int itemWork);
Expand Down
2 changes: 1 addition & 1 deletion include/bug_contest.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ void BugContest_RestoreParty_RetrieveCaughtPokemon(BUGCONTEST *bugContest);
BOOL BugContest_ContestantIsRegisteredN(BUGCONTEST *bugContest, u8 id, u8 n);
void BugContest_InitOpponents(BUGCONTEST *bugContest);
void BugContest_InitEncounters(BUGCONTEST *bugContest);
u16 BugContest_JudgePlayerMon(BUGCONTEST *bugContest, POKEMON *pokemon);
u16 BugContest_JudgePlayerMon(BUGCONTEST *bugContest, Pokemon *mon);

#endif //POKEHEARTGOLD_BUG_CONTEST_H
2 changes: 1 addition & 1 deletion include/bug_contest_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ typedef struct BUGCONTEST {
SAVEDATA *saveData; // Pointer to save data
PARTY *party_bak; // Player's party is held for the contest
PARTY *party_cur; // Only the lead Pokemon
POKEMON *pokemon; // The Pokemon you caught in the contest
Pokemon *mon; // The Pokemon you caught in the contest
u8 lead_mon_idx; // Slot number of the Pokemon you battled with
u8 party_cur_num; // Size of the party pre-contest
u8 day_of_week; // Used to choose NPCs and encounters
Expand Down
8 changes: 4 additions & 4 deletions include/constants/pokemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
#define MON_DATA_NICKNAME_2 118 // ???
#define MON_DATA_NICKNAME_3 119 // ???
#define MON_DATA_NICKNAME_4 120
#define MON_DATA_UNK_120 121
#define MON_DATA_UNK_121 121
#define MON_DATA_GAME_VERSION 122
#define MON_DATA_COOL_RIBBON 123
#define MON_DATA_COOL_RIBBON_GREAT 124
Expand All @@ -304,7 +304,7 @@
#define MON_DATA_TOUGH_RIBBON_GREAT 140
#define MON_DATA_TOUGH_RIBBON_ULTRA 141
#define MON_DATA_TOUGH_RIBBON_MASTER 142
#define MON_DATA_SINNOH_RIBBON_142 143
#define MON_DATA_SINNOH_RIBBON_143 143
#define MON_DATA_OT_NAME 144 // ???
#define MON_DATA_OT_NAME_2 145
#define MON_DATA_EGG_MET_YEAR 146
Expand All @@ -320,7 +320,7 @@
#define MON_DATA_MET_LEVEL 156
#define MON_DATA_MET_GENDER 157
#define MON_DATA_ENCOUNTER_TYPE 158 // HGSS
#define MON_DATA_RESERVED_158 159
#define MON_DATA_RESERVED_159 159
#define MON_DATA_STATUS 160
#define MON_DATA_LEVEL 161
#define MON_DATA_CAPSULE 162
Expand All @@ -337,7 +337,7 @@
#define MON_DATA_SANITY_IS_EGG 173
#define MON_DATA_SPECIES2 174
#define MON_DATA_IVS_WORD 175
#define MON_DATA_UNK_175 176
#define MON_DATA_UNK_176 176
#define MON_DATA_TYPE_1 177
#define MON_DATA_TYPE_2 178
#define MON_DATA_SPECIES_NAME 179
Expand Down
4 changes: 2 additions & 2 deletions include/daycare.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ typedef struct DAYCAREMAIL {
} DAYCAREMAIL;

typedef struct DAYCAREMON {
BOXMON mon;
BoxPokemon mon;
DAYCAREMAIL mail;
u32 steps;
} DAYCAREMON;
Expand All @@ -27,7 +27,7 @@ typedef struct DAYCARE {
u32 Sav2_Daycare_sizeof(void);
void Sav2_Daycare_init(DAYCARE* daycare);
DAYCAREMON* Sav2_DayCare_GetMonX(DAYCARE* daycare, int i);
BOXMON* DayCareMon_GetBoxMon(DAYCAREMON* dcmon);
BoxPokemon *DayCareMon_GetBoxMon(DAYCAREMON* dcmon);
DAYCAREMAIL* DayCareMon_GetExtras(DAYCAREMON* dcmon);
int DayCareMon_GetSteps(DAYCAREMON* dcmon);
MAIL* DayCareMail_GetMailPtr(DAYCAREMAIL* dcmail);
Expand Down
4 changes: 2 additions & 2 deletions include/field_blackthorn_tutors.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "player_data.h"
#include "pokemon_types_def.h"
typedef struct MoveRelearner { //todo: move to unk_0203E348? rename to MoveRelearnerAppData?
POKEMON *pokemon;
Pokemon *mon;
PLAYERPROFILE *profile;
OPTIONS *options;
u8 filler_0C[4];
Expand All @@ -16,7 +16,7 @@ typedef struct MoveRelearner { //todo: move to unk_0203E348? rename to MoveRelea

struct MoveRelearner *MoveRelearner_new(HeapID heapId);
void MoveRelearner_delete(struct MoveRelearner *moveRelearner);
u16 *GetEligibleLevelUpMoves(POKEMON *pokemon, HeapID heapId);
u16 *GetEligibleLevelUpMoves(Pokemon *mon, HeapID heapId);
BOOL sub_0209186C(const u16 *ptr);

#endif //POKEHEARTGOLD_FIELD_BLACKTHORN_TUTORS_H
2 changes: 1 addition & 1 deletion include/field_follow_poke.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct FieldSystemUnk108 *FsysUnkSub108_Alloc(HeapID heapId);
void FsysUnkSub108_AddMonMood(struct FieldSystemUnk108 *unk, s8 by);
void FsysUnkSub108_SetMonMood(struct FieldSystemUnk108 *unk, s8 mood);
s8 FsysUnkSub108_GetMonMood(struct FieldSystemUnk108 *unk);
void FsysUnkSub108_Set(struct FieldSystemUnk108 *a0, POKEMON *pokemon, u16 species, u32 personality);
void FsysUnkSub108_Set(struct FieldSystemUnk108 *a0, Pokemon *mon, u16 species, u32 personality);
void FsysUnkSub108_MoveMoodTowardsNeutral(struct FieldSystemUnk108 *a0);
int SpeciesToOverworldModelIndexOffset(int species);
int OverworldModelLookupFormeCount(int species);
Expand Down
2 changes: 1 addition & 1 deletion include/field_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ struct FieldSystemUnk108 {
u32 personality;
u16 species;
u16 isRegistered;
POKEMON *pokemon;
Pokemon *mon;
};

struct FieldSystemUnkSub0 {
Expand Down
6 changes: 3 additions & 3 deletions include/get_egg.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ int DayCareMon_CalcLevelGrowth(DAYCAREMON *daycareMon);
u16 Sav2_DayCare_BufferMonNickAndRetrievalPrice(DAYCARE *dayCare, u8 slot, MessageFormat *msgFmt);
u8 Sav2_DayCare_BufferGrowthAndNick(DAYCARE *dayCare, u32 slot, MessageFormat *msgFmt);
void Sav2_DayCare_ResetEggStats(DAYCARE *dayCare);
void SetEggStats(POKEMON *pokemon, int species, u8 metLocation, PLAYERPROFILE *profile, int a4, int a5);
void SetEggStats(Pokemon *mon, int species, u8 metLocation, PLAYERPROFILE *profile, int a4, int a5);
void GiveEggToPlayer(DAYCARE *dayCare, PARTY *party, PLAYERPROFILE* profile);
BOOL HandleDayCareStep(DAYCARE *dayCare, PARTY *party, FieldSystem *fsys);
POKEMON *sub_0206CE44(PARTY *party);
Pokemon *sub_0206CE44(PARTY *party);
void Sav2_DayCare_BufferStoredMonNicks(DAYCARE *dayCare, MessageFormat *msgFmt);
void Sav2_DayCare_BufferMonStats(DAYCARE *dayCare, u32 nickname_idx, u32 level_idx, u32 gender_idx, u8 slot, MessageFormat *msgFmt);
u16 Sav2_DayCare_BufferTailMonNick(DAYCARE *dayCare, MessageFormat *msgFmt);
u8 Sav2_DayCare_GetState(DAYCARE *dayCare);
u8 Sav2_DayCare_CalcCompatibility(DAYCARE *dayCare);
void sub_0206D328(POKEMON *pokemon, HeapID heapId);
void sub_0206D328(Pokemon *mon, HeapID heapId);

#endif
2 changes: 1 addition & 1 deletion include/mail.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ u32 Mailbox_CountMessages(MAILBOX *mailbox, int unused);
void Mailbox_FetchMailToBuffer(MAIL *msgs, int n, int i, MAIL *dest);
int MailArray_GetFirstEmptySlotIdx(MAIL *msgs, int n);
u32 MailArray_CountMessages(MAIL *msgs, int n);
MAIL *CreateKenyaMail(POKEMON *pokemon, u8 mailType, u8 gender, STRING *name, u8 otId);
MAIL *CreateKenyaMail(Pokemon *mon, u8 mailType, u8 gender, STRING *name, u8 otId);

#endif //POKEHEARTGOLD_MAIL_H
8 changes: 4 additions & 4 deletions include/mail_misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ int sub_02090E44(Unk02090C94 *a0);
void sub_02090E5C(Unk02090C94 *a0);
Unk02090E68 *sub_02090E68(SAVEDATA *saveData, u16 a1, u8 partyIdx, u8 a3, HeapID heapId);
Unk02090E68 *sub_02090EC0(SAVEDATA *saveData, int n, u16 i, HeapID heapId);
Unk02090E68 *sub_02090F00(SAVEDATA *saveData, POKEMON *pokemon, HeapID heapId);
Unk02090E68 *sub_02090F00(SAVEDATA *saveData, Pokemon *mon, HeapID heapId);
Unk02090E68 *sub_02090F38(SAVEDATA *saveData, u8 mailType, HeapID heapId);
u32 sub_02090F6C(Unk02090E68 *a0);
BOOL sub_02090F70(Unk02090E68 *a0, POKEMON *pokemon);
BOOL sub_02090F70(Unk02090E68 *a0, Pokemon *mon);
void sub_02090F90(Unk02090E68 *a0);
int sub_02090FA8(MAILBOX *mailbox, POKEMON *pokemon, HeapID heapId);
int sub_02091004(MAIL *msgs, int i, POKEMON *pokemon, HeapID heapId);
int sub_02090FA8(MAILBOX *mailbox, Pokemon *mon, HeapID heapId);
int sub_02091004(MAIL *msgs, int i, Pokemon *mon, HeapID heapId);

#endif //POKEHEARTGOLD_MAIL_MISC_H
8 changes: 4 additions & 4 deletions include/message_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ void MessageFormat_InitFields(MessageFormatFields *fields);
void SetStringAsPlaceholder(MessageFormat *messageFormat, u32 fieldno, const STRING *string, const MessageFormatAttrs *attrs);
void BufferRivalsName(MessageFormat *messageFormat, u32 fieldno, SAVEDATA *saveData);
void BufferFriendsName(MessageFormat *messageFormat, u32 fieldno, SAVEDATA *saveData);
void BufferBoxMonSpeciesName(MessageFormat *messageFormat, u32 fieldno, BOXMON *boxmon);
void BufferBoxMonSpeciesNameWithArticle(MessageFormat *messageFormat, u32 fieldno, BOXMON *boxmon);
void BufferBoxMonNickname(MessageFormat *messageFormat, u32 fieldno, BOXMON *boxmon);
void BufferBoxMonOTName(MessageFormat *messageFormat, u32 fieldno, BOXMON *boxmon);
void BufferBoxMonSpeciesName(MessageFormat *messageFormat, u32 fieldno, BoxPokemon *boxmon);
void BufferBoxMonSpeciesNameWithArticle(MessageFormat *messageFormat, u32 fieldno, BoxPokemon *boxmon);
void BufferBoxMonNickname(MessageFormat *messageFormat, u32 fieldno, BoxPokemon *boxmon);
void BufferBoxMonOTName(MessageFormat *messageFormat, u32 fieldno, BoxPokemon *boxmon);
void BufferMoveName(MessageFormat *messageFormat, u32 fieldno, u32 moveId);
void BufferRibbonNameOrDesc(MessageFormat *messageFormat, u32 fieldno, u32 decoId);
void BufferAbilityName(MessageFormat *messageFormat, u32 fieldno, u32 abilityId);
Expand Down
4 changes: 2 additions & 2 deletions include/mystery_gift.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ enum MysteryGiftTag {

typedef struct MG_POKEMON_TAG {
BOOL fixedOT;
POKEMON mon;
Pokemon mon;
u8 ribbons[10];
} MG_POKEMON_TAG;

Expand All @@ -38,7 +38,7 @@ typedef struct {
u16 flag;
union {
MG_POKEMON_TAG pokemon;
POKEMON egg;
Pokemon egg;
u32 item;
u16 ruleset[24];
int base_decoration;
Expand Down
2 changes: 1 addition & 1 deletion include/npc_trade.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ int NPCTradeWork_GetOfferedSpecies(NPC_TRADE_WORK *work);
int NPCTradeWork_GetRequestedSpecies(NPC_TRADE_WORK *work);
int NPCTradeWork_GetUnusedFlag(NPC_TRADE_WORK *work);
void NPCTrade_ReceiveMonToSlot(FieldSystem *fsys, NPC_TRADE_WORK *work, int slot);
void NPCTrade_CreateTradeAnim(FieldSystem *fsys, NPC_TRADE_WORK *work, int slot, TRADE_ANIM_WORK *anim_work, POKEMON *my_mon_buf, POKEMON *trade_mon_buf);
void NPCTrade_CreateTradeAnim(FieldSystem *fsys, NPC_TRADE_WORK *work, int slot, TRADE_ANIM_WORK *anim_work, Pokemon *my_mon_buf, Pokemon *trade_mon_buf);

#endif //POKEHEARTGOLD_NPC_TRADE_H
6 changes: 3 additions & 3 deletions include/overlay_02.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ UNK_0201F79C_Sub *ov02_0224B418(FieldSystem *fsys, int gender);
BOOL ov02_0224B43C(UNK_0201F79C_Sub *unk);
void ov02_0224B448(UNK_0201F79C_Sub *unk);
struct FieldLongWarpTaskData *CreateFieldEscapeRopeTaskEnv(FieldSystem *fsys, HeapID heapId);
struct FieldLongWarpTaskData *CreateFieldTeleportTaskEnv(FieldSystem *fsys, POKEMON *pokemon, u8 slotno, HeapID heapId);
struct FieldLongWarpTaskData *CreateFieldDigTaskEnv(FieldSystem *fsys, POKEMON *pokemon, u8 slotno, HeapID heapId);
struct FieldLongWarpTaskData *CreateFieldTeleportTaskEnv(FieldSystem *fsys, Pokemon *mon, u8 slotno, HeapID heapId);
struct FieldLongWarpTaskData *CreateFieldDigTaskEnv(FieldSystem *fsys, Pokemon *mon, u8 slotno, HeapID heapId);
BOOL Task_FieldEscapeRope(TaskManager *taskManager);
BOOL Task_FieldTeleport(TaskManager *taskManager);
BOOL Task_FieldDig(TaskManager *taskManager);
Expand All @@ -49,7 +49,7 @@ void *ov02_0224C1D8(FieldSystem *fsys, int a1, int a2);
u8 ov02_02251EE8(GearPhoneRingManager *a0, u8 *a1);

// TODO: define the struct, figure out what a1 is
void *ov02_02249458(FieldSystem *fsys, int a1, POKEMON *pokemon, int gender);
void *ov02_02249458(FieldSystem *fsys, int a1, Pokemon *mon, int gender);
BOOL ov02_0224953C(void *work);
void ov02_02249548(void *work);

Expand Down
6 changes: 3 additions & 3 deletions include/party.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ u32 PartyCore_sizeof(void);
PARTY * SavArray_Party_alloc(HeapID heapId);
void SavArray_Party_init(PARTY *party);
void InitPartyWithMaxSize(PARTY *party, int maxSize);
BOOL AddMonToParty(PARTY *party, const POKEMON *pokemon);
BOOL AddMonToParty(PARTY *party, const Pokemon *mon);
BOOL RemoveMonFromParty(PARTY *party, int slot);
int GetPartyMaxCount(const PARTY *party);
int GetPartyCount(const PARTY *party);
POKEMON *GetPartyMonByIndex(PARTY *party, int slot);
Pokemon *GetPartyMonByIndex(PARTY *party, int slot);
void Party_GetUnkSubSlot(const PARTY *party, PARTY_EXTRA_SUB *dest, int slot);
void Party_SetUnkSubSlot(PARTY *party, const PARTY_EXTRA_SUB *src, int slot);
void Party_ResetUnkSubSlot(PARTY *party, int slot);
void Party_SafeCopyMonToSlot_ResetUnkSub(PARTY *party, int slot, POKEMON *src);
void Party_SafeCopyMonToSlot_ResetUnkSub(PARTY *party, int slot, Pokemon *src);
BOOL Party_SwapSlots(PARTY *party, int slotA, int slotB);
void Party_copy(const PARTY *src, PARTY *dest);
BOOL PartyHasMon(PARTY *party, u16 species);
Expand Down
2 changes: 1 addition & 1 deletion include/party_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct FieldUseMoveEnv {
};

struct TeleportFieldEnv {
POKEMON *pokemon;
Pokemon *mon;
struct FlyTaskStruct *flySub; // waste of space
};

Expand Down
4 changes: 2 additions & 2 deletions include/pokedex.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ int Pokedex_SpeciesGetLastSeenGender(POKEDEX *pokedex, u16 species, u32 a2);
int Pokedex_GetSeenFormeByIdx_Unown(POKEDEX *pokedex, int idx, u32 caught);
u32 Pokedex_GetSeenFormeNum_Unown(POKEDEX *pokedex, BOOL caught);
int Pokedex_GetSeenFormeByIdx_Shellos(POKEDEX *pokedex, int a1);
void Pokedex_SetMonSeenFlag(POKEDEX *pokedex, POKEMON *pokemon);
void Pokedex_SetMonCaughtFlag(POKEDEX *pokedex, POKEMON *pokemon);
void Pokedex_SetMonSeenFlag(POKEDEX *pokedex, Pokemon *mon);
void Pokedex_SetMonCaughtFlag(POKEDEX *pokedex, Pokemon *mon);
void Pokedex_SetNatDexFlag(POKEDEX *pokedex);
void sub_0202A57C(POKEDEX *pokedex);
BOOL Pokedex_HasCaughtMonWithLanguage(POKEDEX *pokedex, u32 species, u32 language);
Expand Down
Loading

0 comments on commit b090402

Please sign in to comment.