pokeemerald/include/party_menu.h

99 lines
3.7 KiB
C
Raw Normal View History

2017-10-12 09:06:19 +02:00
#ifndef GUARD_PARTY_MENU_H
#define GUARD_PARTY_MENU_H
2018-07-07 19:57:09 +02:00
2018-10-18 05:36:18 +02:00
#include "main.h"
#include "task.h"
2018-07-07 19:57:09 +02:00
2019-10-26 03:55:01 +02:00
// seems like the last two fields may have been left as all-purpose vars
// and the second of the two just happens to only be used in one case
2019-10-18 01:22:03 +02:00
struct PartyMenu
2018-12-24 00:02:29 +01:00
{
2018-12-18 11:38:08 +01:00
MainCallback exitCallback;
2019-10-18 01:22:03 +02:00
TaskFunc task;
u8 menuType:4;
u8 layout:2;
2019-05-13 00:41:25 +02:00
s8 slotId;
2019-10-18 01:22:03 +02:00
s8 slotId2;
u8 action;
u16 bagItem;
2019-10-26 03:55:01 +02:00
s16 data1; // used variously as a moveId, counter, moveSlotId, or cursorPos
s16 learnMoveState; // data2, used only as a learn move state
2018-02-15 10:59:26 +01:00
};
2019-10-18 01:22:03 +02:00
extern struct PartyMenu gPartyMenu;
2019-10-26 03:55:01 +02:00
extern bool8 gPartyMenuUseExitCallback;
extern u8 gSelectedMonPartyId;
2018-12-24 00:02:29 +01:00
extern MainCallback gPostMenuFieldCallback;
2020-04-09 21:18:53 +02:00
extern u8 gSelectedOrderFromParty[MAX_FRONTIER_PARTY_SIZE];
extern u8 gBattlePartyCurrentOrder[PARTY_SIZE / 2];
2018-02-15 10:59:26 +01:00
2019-10-18 01:22:03 +02:00
extern void (*gItemUseCB)(u8, TaskFunc);
2019-02-02 12:44:00 +01:00
2018-12-24 21:59:05 +01:00
extern const u16 gTutorMoves[];
2018-08-10 09:42:06 +02:00
2019-10-18 01:22:03 +02:00
void AnimatePartySlot(u8 slot, u8 animNum);
2018-12-24 00:02:29 +01:00
bool8 IsMultiBattle(void);
2018-01-02 02:21:30 +01:00
u8 GetCursorSelectionMonId(void);
2019-10-18 01:22:03 +02:00
u8 GetPartyMenuType(void);
void Task_HandleChooseMonInput(u8 taskId);
u8 *GetMonNickname(struct Pokemon *mon, u8 *dest);
u8 DisplayPartyMenuMessage(const u8 *str, bool8 keepOpen);
2019-10-18 01:22:03 +02:00
bool8 IsPartyMenuTextPrinterActive(void);
2019-10-31 19:11:55 +01:00
void PartyMenuModifyHP(u8 taskId, u8 slot, s8 hpIncrement, s16 HPDifference, TaskFunc task);
2019-10-18 01:22:03 +02:00
u8 GetAilmentFromStatus(u32 status);
u8 GetMonAilment(struct Pokemon *mon);
2019-10-31 19:11:55 +01:00
void DisplayPartyMenuStdMessage(u32 stringId);
bool8 FieldCallback_PrepareFadeInFromMenu(void);
2019-10-18 01:22:03 +02:00
void CB2_ReturnToPartyMenuFromFlyMap(void);
2018-12-24 00:02:29 +01:00
void LoadHeldItemIcons(void);
2019-10-31 19:11:55 +01:00
void DrawHeldItemIconsForTrade(u8 *partyCounts, u8 *partySpriteIds, u8 whichParty);
2019-10-18 01:22:03 +02:00
void CB2_ShowPartyMenuForItemUse(void);
2018-12-24 00:02:29 +01:00
void ItemUseCB_Medicine(u8 taskId, TaskFunc task);
2019-08-17 12:47:25 +02:00
void ItemUseCB_AbilityCapsule(u8 taskId, TaskFunc task);
2022-05-03 20:14:04 +02:00
void ItemUseCB_AbilityPatch(u8 taskId, TaskFunc task);
2019-10-18 01:22:03 +02:00
void ItemUseCB_ReduceEV(u8 taskId, TaskFunc task);
void ItemUseCB_PPRecovery(u8 taskId, TaskFunc task);
void ItemUseCB_PPUp(u8 taskId, TaskFunc task);
2018-12-24 00:02:29 +01:00
u16 ItemIdToBattleMoveId(u16 item);
2018-12-24 21:59:05 +01:00
bool8 IsMoveHm(u16 move);
bool8 MonKnowsMove(struct Pokemon *mon, u16 move);
bool8 BoxMonKnowsMove(struct BoxPokemon *mon, u16 move);
2019-10-18 01:22:03 +02:00
void ItemUseCB_TMHM(u8 taskId, TaskFunc task);
void ItemUseCB_RareCandy(u8 taskId, TaskFunc task);
void ItemUseCB_SacredAsh(u8 taskId, TaskFunc task);
void ItemUseCB_EvolutionStone(u8 taskId, TaskFunc task);
void ItemUseCB_FormChange(u8 taskId, TaskFunc task);
2021-03-03 22:08:28 +01:00
void ItemUseCB_FormChange_ConsumedOnUse(u8 taskId, TaskFunc task);
2018-12-24 00:02:29 +01:00
u8 GetItemEffectType(u16 item);
void CB2_PartyMenuFromStartMenu(void);
2019-10-18 01:22:03 +02:00
void CB2_ChooseMonToGiveItem(void);
void ChooseMonToGiveMailFromMailbox(void);
void InitChooseHalfPartyForBattle(u8 unused);
2019-10-18 01:22:03 +02:00
void ClearSelectedPartyOrder(void);
2019-10-31 19:11:55 +01:00
void ChooseMonForTradingBoard(u8 menuType, MainCallback callback);
2019-10-18 01:22:03 +02:00
void ChooseMonForMoveTutor(void);
2019-10-11 10:14:09 +02:00
void ChooseMonForWirelessMinigame(void);
2019-10-31 19:11:55 +01:00
void OpenPartyMenuInBattle(u8 partyAction);
2019-10-18 01:22:03 +02:00
void ChooseMonForInBattleItem(void);
2019-10-31 19:11:55 +01:00
void BufferBattlePartyCurrentOrder(void);
void BufferBattlePartyCurrentOrderBySide(u8 battlerId, u8 flankId);
2019-10-26 03:55:01 +02:00
void SwitchPartyOrderLinkMulti(u8 battlerId, u8 slot, u8 arrayIndex);
2019-10-18 01:22:03 +02:00
void SwitchPartyMonSlots(u8 slot, u8 slot2);
2019-10-26 03:55:01 +02:00
u8 GetPartyIdFromBattlePartyId(u8 slot);
2019-10-18 01:22:03 +02:00
void ShowPartyMenuToShowcaseMultiBattleParty(void);
void ChooseMonForDaycare(void);
bool8 CB2_FadeFromPartyMenu(void);
void ChooseContestMon(void);
void ChoosePartyMon(void);
void ChooseMonForMoveRelearner(void);
void BattlePyramidChooseMonHeldItems(void);
void DoBattlePyramidMonsHaveHeldItem(void);
void IsSelectedMonEgg(void);
void IsLastMonThatKnowsSurf(void);
void MoveDeleterForgetMove(void);
void BufferMoveDeleterNicknameAndMove(void);
void GetNumMovesSelectedMonHas(void);
void MoveDeleterChooseMoveToForget(void);
2018-09-11 04:04:19 +02:00
2017-10-12 09:06:19 +02:00
#endif // GUARD_PARTY_MENU_H