sovereignx/include/party_menu.h

108 lines
4.2 KiB
C
Raw Normal View History

2017-10-12 08:06:19 +01:00
#ifndef GUARD_PARTY_MENU_H
#define GUARD_PARTY_MENU_H
2018-07-07 18:57:09 +01:00
2018-10-18 04:36:18 +01:00
#include "main.h"
#include "task.h"
2018-07-07 18:57:09 +01:00
2019-10-26 02:55:01 +01: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 00:22:03 +01:00
struct PartyMenu
2018-12-23 23:02:29 +00:00
{
2018-12-18 10:38:08 +00:00
MainCallback exitCallback;
2019-10-18 00:22:03 +01:00
TaskFunc task;
u8 menuType:4;
u8 layout:2;
2019-05-12 23:41:25 +01:00
s8 slotId;
2019-10-18 00:22:03 +01:00
s8 slotId2;
u8 action;
u16 bagItem;
2019-10-26 02:55:01 +01: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 09:59:26 +00:00
};
2019-10-18 00:22:03 +01:00
extern struct PartyMenu gPartyMenu;
2019-10-26 02:55:01 +01:00
extern bool8 gPartyMenuUseExitCallback;
extern u8 gSelectedMonPartyId;
2018-12-23 23:02:29 +00:00
extern MainCallback gPostMenuFieldCallback;
2020-04-09 20:18:53 +01:00
extern u8 gSelectedOrderFromParty[MAX_FRONTIER_PARTY_SIZE];
extern u8 gBattlePartyCurrentOrder[PARTY_SIZE / 2];
2018-02-15 09:59:26 +00:00
2019-10-18 00:22:03 +01:00
extern void (*gItemUseCB)(u8, TaskFunc);
2022-08-23 10:58:17 +01:00
extern const struct SpriteTemplate gSpriteTemplate_StatusIcons;
2018-08-10 08:42:06 +01:00
2019-10-18 00:22:03 +01:00
void AnimatePartySlot(u8 slot, u8 animNum);
2018-12-23 23:02:29 +00:00
bool8 IsMultiBattle(void);
2018-01-02 01:21:30 +00:00
u8 GetCursorSelectionMonId(void);
2019-10-18 00:22:03 +01: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 00:22:03 +01:00
bool8 IsPartyMenuTextPrinterActive(void);
2019-10-31 18:11:55 +00:00
void PartyMenuModifyHP(u8 taskId, u8 slot, s8 hpIncrement, s16 HPDifference, TaskFunc task);
2019-10-18 00:22:03 +01:00
u8 GetAilmentFromStatus(u32 status);
u8 GetMonAilment(struct Pokemon *mon);
2019-10-31 18:11:55 +00:00
void DisplayPartyMenuStdMessage(u32 stringId);
bool8 FieldCallback_PrepareFadeInFromMenu(void);
bool8 FieldCallback_PrepareFadeInForTeleport(void);
2019-10-18 00:22:03 +01:00
void CB2_ReturnToPartyMenuFromFlyMap(void);
2018-12-23 23:02:29 +00:00
void LoadHeldItemIcons(void);
2019-10-31 18:11:55 +00:00
void DrawHeldItemIconsForTrade(u8 *partyCounts, u8 *partySpriteIds, u8 whichParty);
2022-08-23 10:58:17 +01:00
void LoadPartyMenuAilmentGfx(void);
2019-10-18 00:22:03 +01:00
void CB2_ShowPartyMenuForItemUse(void);
void ItemUseCB_BattleScript(u8 taskId, TaskFunc task);
void ItemUseCB_BattleChooseMove(u8 taskId, TaskFunc task);
2018-12-23 23:02:29 +00:00
void ItemUseCB_Medicine(u8 taskId, TaskFunc task);
2019-08-17 11:47:25 +01:00
void ItemUseCB_AbilityCapsule(u8 taskId, TaskFunc task);
2022-05-03 19:14:04 +01:00
void ItemUseCB_AbilityPatch(u8 taskId, TaskFunc task);
void ItemUseCB_Mint(u8 taskId, TaskFunc task);
void ItemUseCB_ResetEVs(u8 taskId, TaskFunc task);
2019-10-18 00:22:03 +01:00
void ItemUseCB_ReduceEV(u8 taskId, TaskFunc task);
void ItemUseCB_PPRecovery(u8 taskId, TaskFunc task);
void ItemUseCB_PPUp(u8 taskId, TaskFunc task);
2018-12-23 23:02:29 +00:00
u16 ItemIdToBattleMoveId(u16 item);
2018-12-24 20:59:05 +00:00
bool8 MonKnowsMove(struct Pokemon *mon, u16 move);
2022-09-19 09:20:09 +01:00
bool8 BoxMonKnowsMove(struct BoxPokemon *boxMon, u16 move);
2019-10-18 00:22:03 +01:00
void ItemUseCB_TMHM(u8 taskId, TaskFunc task);
void ItemUseCB_RareCandy(u8 taskId, TaskFunc task);
void ItemUseCB_DynamaxCandy(u8 taskId, TaskFunc task);
2019-10-18 00:22:03 +01:00
void ItemUseCB_SacredAsh(u8 taskId, TaskFunc task);
void ItemUseCB_EvolutionStone(u8 taskId, TaskFunc task);
void ItemUseCB_FormChange(u8 taskId, TaskFunc task);
2021-03-03 21:08:28 +00:00
void ItemUseCB_FormChange_ConsumedOnUse(u8 taskId, TaskFunc task);
void ItemUseCB_RotomCatalog(u8 taskId, TaskFunc task);
void ItemUseCB_ZygardeCube(u8 taskId, TaskFunc task);
Add support for legendary fusion (#3274) * Legendary Mon Fusion Evolution Compatibility Added Kyurem, Calyrex, and Necrozma Fusions have been implemented, however, the animation for the the process is incomplete, the party menu screen needs to be updated while the screen is whited out and it has proved beyond me right now. Smh * Added Fusion Move Prompts Handles cases for learning the fusion moves from the other fused mon and deleting the move when you unfuse (plus learning confusion (well a set choice in the data struct) if there are no moves left after deleting one) * Fix Bug With Fusion Mon Move Learning If the main fusion came after the fused mon in the party order it would try to teach the move to the next member in the party * Apply suggestions from code review Co-authored-by: LOuroboros <lunosouroboros@gmail.com> * Fix build * Fix fusion items being used up * Fixed animations * RefreshPartyMenu * Apply suggestions from code review Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com> * Apply suggestions * Update form_change_tables.h * Fix animation and simplify fusion tables * Fix party full message * Remove trailing whitespaces * Update party_menu.c * Update party_menu.c * Make IsFusionMon better * Apply suggestions from code review Co-authored-by: Bassoonian <iasperbassoonian@gmail.com> --------- Co-authored-by: TeamAquasHideout <jonathonheddings@gmail.com> Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com> Co-authored-by: LOuroboros <lunosouroboros@gmail.com> Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-11-23 21:59:51 +00:00
void ItemUseCB_Fusion(u8 taskId, TaskFunc task);
2018-12-23 23:02:29 +00:00
u8 GetItemEffectType(u16 item);
void CB2_PartyMenuFromStartMenu(void);
2019-10-18 00:22:03 +01:00
void CB2_ChooseMonToGiveItem(void);
void ChooseMonToGiveMailFromMailbox(void);
void InitChooseHalfPartyForBattle(u8 unused);
2019-10-18 00:22:03 +01:00
void ClearSelectedPartyOrder(void);
2019-10-31 18:11:55 +00:00
void ChooseMonForTradingBoard(u8 menuType, MainCallback callback);
2019-10-18 00:22:03 +01:00
void ChooseMonForMoveTutor(void);
2019-10-11 09:14:09 +01:00
void ChooseMonForWirelessMinigame(void);
2019-10-31 18:11:55 +00:00
void OpenPartyMenuInBattle(u8 partyAction);
2019-10-18 00:22:03 +01:00
void ChooseMonForInBattleItem(void);
2019-10-31 18:11:55 +00:00
void BufferBattlePartyCurrentOrder(void);
void BufferBattlePartyCurrentOrderBySide(u8 battlerId, u8 flankId);
2019-10-26 02:55:01 +01:00
void SwitchPartyOrderLinkMulti(u8 battlerId, u8 slot, u8 arrayIndex);
2019-10-18 00:22:03 +01:00
void SwitchPartyMonSlots(u8 slot, u8 slot2);
2019-10-26 02:55:01 +01:00
u8 GetPartyIdFromBattlePartyId(u8 slot);
2019-10-18 00:22:03 +01: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);
bool32 IsItemFlute(u16 item);
2018-09-11 03:04:19 +01:00
2017-10-12 08:06:19 +01:00
#endif // GUARD_PARTY_MENU_H