diff options
Diffstat (limited to 'src/battle')
-rw-r--r-- | src/battle/battle_interface.c | 8 | ||||
-rw-r--r-- | src/battle/battle_party_menu.c | 31 |
2 files changed, 13 insertions, 26 deletions
diff --git a/src/battle/battle_interface.c b/src/battle/battle_interface.c index 0741ad33a..8bfeedd4d 100644 --- a/src/battle/battle_interface.c +++ b/src/battle/battle_interface.c @@ -97,7 +97,7 @@ static int sub_8045F58(s32, s32, int, int *, u8, u16); static u8 GetScaledExpFraction(int, int, int, u8); static void sub_8045D58(u8, u8); static u8 sub_804602C(int, int, int, int *, u8 *, u8); -static void sub_8046128(struct BattleInterfaceStruct1 *a, int *b, void *c); +static void sub_8046128(struct BattleInterfaceStruct1 *a, int *b, u16 *c); static int do_nothing(s16 unused1, s16 unused2, int unused3) { @@ -2388,7 +2388,7 @@ static void sub_80451A0(u8 a, struct Pokemon *pkmn) gender = GetMonGender(pkmn); species = GetMonData(pkmn, MON_DATA_SPECIES); language = GetMonData(pkmn, MON_DATA_LANGUAGE); - if (sub_8040D3C(species, nickname, language)) + if (ShouldHideGenderIconForLanguage(species, nickname, language)) gender = 100; switch (gender) { @@ -2972,7 +2972,7 @@ static u8 sub_804602C(int a, int b, int c, int *d, u8 *e, u8 f) return r3; } -s16 sub_80460C8(struct BattleInterfaceStruct1 *a, int *b, void *c, int d) +s16 sub_80460C8(struct BattleInterfaceStruct1 *a, int *b, u16 *c, int d) { u16 r7; s16 r1; @@ -2987,7 +2987,7 @@ s16 sub_80460C8(struct BattleInterfaceStruct1 *a, int *b, void *c, int d) return r7; } -static void sub_8046128(struct BattleInterfaceStruct1 *a, int *b, void *c) +static void sub_8046128(struct BattleInterfaceStruct1 *a, int *b, u16 *c) { u8 sp8[6]; u16 sp10[6]; diff --git a/src/battle/battle_party_menu.c b/src/battle/battle_party_menu.c index 49e0b8432..dc7c5db5b 100644 --- a/src/battle/battle_party_menu.c +++ b/src/battle/battle_party_menu.c @@ -22,31 +22,17 @@ extern u8 ewram[]; #define UNK_201606C_ARRAY (ewram + 0x1606C) // lazy define but whatever. -extern u8 IsLinkDoubleBattle(void); -extern void TryCreatePartyMenuMonIcon(u8, u8, struct Pokemon *); -extern void LoadHeldItemIconGraphics(void); -extern void CreateHeldItemIcons_806DC34(); extern u8 sub_806BD58(u8, u8); extern void PartyMenuPrintMonsLevelOrStatus(void); -extern void PrintPartyMenuMonNicknames(void); -extern void PartyMenuTryPrintMonsHP(void); extern void nullsub_13(void); -extern void PartyMenuDrawHPBars(void); extern u8 sub_806B58C(u8); -extern u8 GetItemEffectType(); -extern void sub_806E750(u8, const struct PartyPopupMenu *, const struct PartyMenuItem *, int); -extern void sub_806D5A4(void); extern void sub_802E414(void); extern void sub_80A6DCC(void); extern void sub_806AF4C(); extern void sub_806AEDC(void); -extern TaskFunc PartyMenuGetPopupMenuFunc(u8, const struct PartyPopupMenu *, const struct PartyMenuItem *, u8); -extern void sub_806E7D0(u8, const struct PartyPopupMenu *); extern u8 *sub_8040D08(); extern void sub_8040B8C(void); -extern void sub_806E6F0(); extern void nullsub_14(); -extern void OpenPartyMenu(); extern u8 sub_803FBBC(void); extern u8 gPlayerPartyCount; @@ -79,7 +65,7 @@ static void Task_BattlePartyMenuSummary(u8 taskId); static void Task_BattlePartyMenuShift(u8 taskId); static void Task_BattlePartyMenuCancel(u8 taskId); -static const struct PartyMenuItem sBattlePartyMenuActions[] = +static const struct MenuAction2 sBattlePartyMenuActions[] = { {OtherText_Summary, Task_BattlePartyMenuSummary}, {gOtherText_CancelNoTerminator, Task_BattlePartyMenuCancel}, @@ -342,7 +328,7 @@ void unref_sub_8094DB0(void) { r4 = sub_8094C20(0); sub_8094C98(0, i); - sub_806E6F0(&gPlayerParty[r4], &gPlayerParty[n]); + SwapPokemon(&gPlayerParty[r4], &gPlayerParty[n]); break; } } @@ -362,7 +348,7 @@ void sub_8094E4C(void) sub_8094E20(3); } -int SetUpBattlePartyMenu(void) +bool8 SetUpBattlePartyMenu(void) { switch (EWRAM_1B000.unk264) //switch (ewram1B000.unk264[0]) @@ -475,7 +461,8 @@ static void sub_8095050(u8 a, u8 b) gTasks[EWRAM_1B000.unk260].data[4] = 2; gTasks[EWRAM_1B000.unk260].data[5] = 2; } - sub_806E750(gTasks[a].data[4], sBattlePartyPopupMenus, sBattlePartyMenuActions, 0); + + ShowPartyPopupMenu(gTasks[a].data[4], sBattlePartyPopupMenus, sBattlePartyMenuActions, 0); } void SetUpBattlePokemonMenu(u8 a) @@ -579,7 +566,7 @@ static void Task_809538C(void) { do { - if (sub_806B124() == TRUE) + if (InitPartyMenu() == TRUE) { sub_806C994(EWRAM_1B000.unk260, gUnknown_020384F0); sub_806BF74(EWRAM_1B000.unk260, 0); @@ -660,7 +647,7 @@ static void Task_BattlePartyMenuShift(u8 taskId) u8 i; u8 r4; - sub_806E7D0(gTasks[taskId].data[4], sBattlePartyPopupMenus); + ClosePartyPopupMenu(gTasks[taskId].data[4], sBattlePartyPopupMenus); partySelection = sub_806CA38(taskId); if (IsLinkDoubleBattle() == TRUE && (partySelection == 1 || partySelection == 4 || partySelection == 5)) { @@ -735,14 +722,14 @@ static void Task_BattlePartyMenuShift(u8 taskId) gUnknown_0202E8F4 = 1; r4 = pokemon_order_func(gBattlePartyID[gBankInMenu]); sub_8094C98(r4, partySelection); - sub_806E6F0(&gPlayerParty[r4], &gPlayerParty[partySelection]); + SwapPokemon(&gPlayerParty[r4], &gPlayerParty[partySelection]); gTasks[taskId].func = Task_809527C; } static void Task_BattlePartyMenuCancel(u8 taskId) { HandleDestroyMenuCursors(); - sub_806E7D0(gTasks[taskId].data[4], sBattlePartyPopupMenus); + ClosePartyPopupMenu(gTasks[taskId].data[4], sBattlePartyPopupMenus); gTasks[taskId].data[4] = gTasks[taskId].data[5]; sub_806D538(0, 0); SwitchTaskToFollowupFunc(taskId); |