mirror of
https://github.com/pret/pokeruby.git
synced 2026-04-24 15:07:23 -05:00
232 lines
7.5 KiB
C
232 lines
7.5 KiB
C
#ifndef GUARD_PARTY_MENU_H
|
|
#define GUARD_PARTY_MENU_H
|
|
|
|
#include "menu.h"
|
|
#include "task.h"
|
|
|
|
|
|
enum
|
|
{
|
|
PARTY_MENU_TYPE_STANDARD,
|
|
PARTY_MENU_TYPE_BATTLE,
|
|
PARTY_MENU_TYPE_CONTEST,
|
|
PARTY_MENU_TYPE_IN_GAME_TRADE,
|
|
PARTY_MENU_TYPE_BATTLE_TOWER,
|
|
PARTY_MENU_TYPE_LINK_MULTI_BATTLE,
|
|
PARTY_MENU_TYPE_DAYCARE,
|
|
PARTY_MENU_TYPE_MOVE_TUTOR,
|
|
};
|
|
|
|
enum
|
|
{
|
|
PARTY_CHOOSE_MON,
|
|
PARTY_MUST_CHOOSE_MON,
|
|
PARTY_CANT_SWITCH,
|
|
PARTY_USE_ITEM_ON,
|
|
PARTY_ABILITY_PREVENTS,
|
|
PARTY_GIVE_ITEM,
|
|
};
|
|
|
|
// The party menu screen is presented differently depending on which menu layout is set.
|
|
enum
|
|
{
|
|
PARTY_MENU_LAYOUT_STANDARD,
|
|
PARTY_MENU_LAYOUT_DOUBLE_BATTLE,
|
|
PARTY_MENU_LAYOUT_LINK_DOUBLE_BATTLE,
|
|
PARTY_MENU_LAYOUT_MULTI_BATTLE,
|
|
};
|
|
|
|
struct PartyPopupMenu
|
|
{
|
|
/*0x0*/u8 numChoices; // number of menu choices
|
|
/*0x1*/u8 width; // menu width (number of characters it can fit horizontally)
|
|
/*0x4*/const u8 *items; // menu item ids (ids for a MenuAction2 array)
|
|
};
|
|
|
|
// TODO: Unify these two structs
|
|
|
|
struct Unk201B000
|
|
{
|
|
struct Pokemon unk0[6];
|
|
u8 menuType;
|
|
u8 promptTextId;
|
|
u8 filler25A[2];
|
|
TaskFunc menuHandler;
|
|
u8 menuHandlerTaskId;
|
|
u8 unk261;
|
|
u8 unk262;
|
|
u8 unk263;
|
|
// Stat growth upon level-up. First 6 bytes = old stats, Second 6 bytes = new stats.
|
|
s16 statGrowths[NUM_STATS * 2];
|
|
u8 filler27C[2];
|
|
s16 unk27E;
|
|
s16 unk280;
|
|
s16 unk282;
|
|
};
|
|
|
|
struct Struct201B000
|
|
{
|
|
u8 filler0[0x259];
|
|
u8 promptTextId;
|
|
u8 filler25A[6];
|
|
u8 menuHandlerTaskId;
|
|
u8 unk261;
|
|
u8 unk262;
|
|
s16 setupState;
|
|
s16 monIndex;
|
|
s16 unk268;
|
|
u8 filler26A[8];
|
|
u16 unk272;
|
|
u8 filler274[14];
|
|
u16 unk282;
|
|
};
|
|
|
|
struct Unk2001000
|
|
{
|
|
u8 unk0;
|
|
u8 unk1;
|
|
u8 unk2;
|
|
u8 unk3;
|
|
u8 unk4;
|
|
u8 unk5;
|
|
u8 unk6;
|
|
u8 unk7;
|
|
s16 unk8;
|
|
s16 unkA;
|
|
TaskFunc unkC;
|
|
u16 array[53561];
|
|
};
|
|
|
|
struct UnknownPokemonStruct2
|
|
{
|
|
/*0x00*/ u16 species;
|
|
/*0x02*/ u16 heldItem;
|
|
/*0x04*/ u8 nickname[11];
|
|
/*0x0F*/ u8 level;
|
|
/*0x10*/ u16 hp;
|
|
/*0x12*/ u16 maxhp;
|
|
/*0x14*/ u32 status;
|
|
/*0x18*/ u32 personality;
|
|
/*0x1C*/ u8 gender;
|
|
/*0x1D*/ u8 language;
|
|
};
|
|
|
|
void CB2_PartyMenuMain(void);
|
|
void ChangeBattleTowerPartyMenuSelection(u8 taskId, s8 directionPressed);
|
|
void SetPartyMenuSettings(u8 menuType, u8 battleTypeFlags, TaskFunc menuHandlerFunc, u8 textId);
|
|
void OpenPartyMenu(u8 menuType, u8 battleFlags);
|
|
bool8 InitPartyMenu(void);
|
|
bool8 IsLinkDoubleBattle(void);
|
|
u8 DrawPartyMonBackground(u8);
|
|
void sub_806B908(void);
|
|
void DrawMonDescriptorStatus(u8, u8);
|
|
void sub_806BCE8(void);
|
|
u8 sub_806BD58(u8, u8);
|
|
u8 sub_806BD58(u8, u8);
|
|
u16 HandleDefaultPartyMenuInput(u8 taskId);
|
|
u16 HandleBattleTowerPartyMenuInput(u8 taskId);
|
|
void task_pc_turn_off(const u8 *a, u8 b);
|
|
void ChangePartyMenuSelection(u8 taskId, s8 directionPressed);
|
|
void SelectBattleTowerOKButton(u8 taskId);
|
|
void sub_806C994(u8 taskId, u8 b);
|
|
u8 sub_806CA38(u8 taskID);
|
|
void HandlePartyMenuSwitchPokemonInput(u8 taskId);
|
|
void sub_806CCE4(void);
|
|
void sub_806CD44(u8 taskId);
|
|
void sub_806D3B4(u8 taskId, u16 species1, u16 species2);
|
|
void sub_806D4AC(u8 taskId, u16 species, u8 c);
|
|
void sub_806D50C(u8 taskId, u8 monIndex);
|
|
void PrintPartyMenuPromptText(u8 textId, u8 b);
|
|
void sub_806D5A4(void);
|
|
void SetMonIconAnim(u8 spriteId, struct Pokemon *pokemon);
|
|
void CreatePartyMenuMonIcon(u8 taskId, u8 monIndex, u8 c, struct Pokemon *pokemon);
|
|
void TryCreatePartyMenuMonIcon(u8 a, u8 monIndex, struct Pokemon *pokemon);
|
|
void LoadHeldItemIconGraphics(void);
|
|
void PartyMenuTryGiveMonHeldItem(u8 taskId, u16 newItem, TaskFunc c);
|
|
void SetMonIconSpriteId(u8 taskId, u8 monIndex, u8 spriteId);
|
|
void CreateHeldItemIcon_806DCD4(u8 taskId, u8 monIndex, u16 item);
|
|
void CreateHeldItemIcons_806DC34(u8 taskId);
|
|
void CreateHeldItemIcons(u8 *a, u8 *b, u8 c);
|
|
void SetHeldItemIconVisibility(u8 a, u8 monIndex);
|
|
void PartyMenuDoPrintMonNickname(u8 monIndex, int b, const u8 *nameBuffer);
|
|
void PrintPartyMenuMonNickname(u8 monIndex, u8 b, struct Pokemon *pokemon);
|
|
void PrintPartyMenuMonNicknames(void);
|
|
void CreateMonIcon_LinkMultiBattle(u8 taskId, u8 monIndex, u8 menuType, struct UnknownPokemonStruct2 *pokemon);
|
|
u8 *GetMonNickname(struct Pokemon *pokemon, u8 *stringBuffer);
|
|
void PartyMenuPutStatusTilemap(u8 monIndex, u8 b, u8 status);
|
|
void PartyMenuDoPrintLevel(u8 monIndex, u8 b, u8 level);
|
|
void PartyMenuPrintLevel(u8 monIndex, u8 b, struct Pokemon *pokemon);
|
|
void PartyMenuPrintMonLevelOrStatus(u8 monIndex, struct Pokemon *pokemon);
|
|
void PartyMenuPrintMonsLevelOrStatus(void);
|
|
void PartyMenuDoPrintGenderIcon(u16 species, u8 gender, u8 c, u8 monIndex, u8 *nickname);
|
|
void PartyMenuPrintGenderIcon(u8 monIndex, u8 b, struct Pokemon *pokemon);
|
|
void PartyMenuDoPrintHP(u8 monIndex, u8 b, u16 currentHP, u16 maxHP);
|
|
void PartyMenuTryPrintMonsHP(void);
|
|
void nullsub_13(void);
|
|
void PartyMenuDoDrawHPBar(u8 monIndex, u8 b, u16 currentHP, u16 maxHP);
|
|
void PartyMenuDrawHPBar(u8 monIndex, u8 b, struct Pokemon *pokemon);
|
|
void PartyMenuTryDrawHPBar(u8 monIndex, struct Pokemon *pokemon);
|
|
void PartyMenuDrawHPBars(void);
|
|
void SwapPokemon(struct Pokemon *a, struct Pokemon *b);
|
|
void SetPartyPopupMenuOffsets(u8 menuIndex, u8 *left, u8 *top, const struct PartyPopupMenu *menu);
|
|
void ShowPartyPopupMenu(u8 menuIndex, const struct PartyPopupMenu *menu, const struct MenuAction2 *menuActions, u8 cursorPos);
|
|
void ClosePartyPopupMenu(u8 index, const struct PartyPopupMenu *menu);
|
|
TaskFunc PartyMenuGetPopupMenuFunc(u8 menuIndex, const struct PartyPopupMenu *menus, const struct MenuAction2 *menuActions, u8 itemIndex);
|
|
u8 sub_806E834(const u8 *message, u8 arg1);
|
|
void sub_806E8D0(u8 taskId, u16 b, TaskFunc c);
|
|
void party_menu_link_mon_held_item_object(u8);
|
|
void Task_ConfirmGiveHeldItem(u8);
|
|
void DisplayGiveHeldItemMessage(u8, u16, u8);
|
|
void DisplayTakeHeldItemMessage(u8, u16, u8);
|
|
void Task_ConfirmTakeHeldMail(u8);
|
|
u16 ItemIdToBattleMoveId(u16);
|
|
bool8 pokemon_has_move(struct Pokemon *, u16);
|
|
void TeachMonTMMove(u8, u16, TaskFunc);
|
|
void Task_TeamMonTMMove(u8);
|
|
void Task_TeamMonTMMove2(u8);
|
|
void Task_TeamMonTMMove3(u8);
|
|
void Task_TeamMonTMMove4(u8);
|
|
void sub_806F358(u8);
|
|
void sub_806F390(u8);
|
|
void sub_806F44C(u8);
|
|
void TMMoveUpdateMoveSlot(u8);
|
|
void StopTryingToTeachMove_806F614(u8);
|
|
void StopTryingToTeachMove_806F67C(u8);
|
|
void StopTryingToTeachMove_806F6B4(u8);
|
|
void sub_806F8AC(u8 taskId);
|
|
void sub_806FA18(u8 taskId);
|
|
void sub_806FB0C(u8 taskId);
|
|
void sub_806FB44(u8);
|
|
void PartyMenuUpdateLevelOrStatus(struct Pokemon *, u8);
|
|
void GetMedicineItemEffectMessage(u16);
|
|
bool8 ExecuteTableBasedItemEffect__(u8, u16, u8);
|
|
void UseMedicine(u8, u16, TaskFunc);
|
|
bool8 IsBlueYellowRedFlute(u16);
|
|
void DoSacredAshItemEffect(u8, u16, TaskFunc);
|
|
void sub_8070088(u8);
|
|
void sub_80701DC(u8 taskId);
|
|
void DoPPRecoveryItemEffect(u8, u16, TaskFunc);
|
|
void DoRecoverPP(u8);
|
|
void DoPPUpItemEffect(u8, u16, TaskFunc);
|
|
void DoRareCandyItemEffect(u8, u16, TaskFunc);
|
|
void Task_RareCandy1(u8);
|
|
void Task_RareCandy2(u8);
|
|
void PrintStatGrowthsInLevelUpWindow(u8 taskId);
|
|
void PrintNewStatsInLevelUpWindow(u8 taskId);
|
|
void RedrawPokemonInfoInMenu(u8, struct Pokemon *);
|
|
void Task_RareCandy3(u8);
|
|
void TeachMonMoveInPartyMenu(u8);
|
|
void DoEvolutionStoneItemEffect(u8 taskId, u16 evolutionStoneItem, TaskFunc c);
|
|
u8 GetItemEffectType(u16 item);
|
|
void SetupDefaultPartyMenuSwitchPokemon(u8 taskId);
|
|
void sub_806CD5C(u8 taskId);
|
|
void DoTakeMail(u8 taskId, TaskFunc func);
|
|
void PartyMenuTryGiveMonHeldItem_806ECE8(u8 taskId, TaskFunc func);
|
|
void PartyMenuTryGiveMonMail(u8 taskId, TaskFunc func);
|
|
void sub_806D668(u8 monIndex);
|
|
void TaughtMove(u8 taskId);
|
|
void StopTryingToTeachMove_806F588(u8 taskId);
|
|
bool8 IsHMMove(u16 move);
|
|
|
|
#endif // GUARD_PARTY_MENU_H
|