2017-10-09 16:18:40 +00:00
|
|
|
#ifndef GUARD_BATTLE_INTERFACE_H
|
|
|
|
#define GUARD_BATTLE_INTERFACE_H
|
|
|
|
|
2017-10-20 08:49:21 +00:00
|
|
|
#include "battle_controllers.h"
|
|
|
|
|
2017-10-21 15:32:35 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
HP_CURRENT,
|
|
|
|
HP_MAX
|
|
|
|
};
|
|
|
|
|
2017-10-22 16:43:15 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
HEALTH_BAR,
|
|
|
|
EXP_BAR
|
|
|
|
};
|
|
|
|
|
2017-11-04 15:11:13 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
HP_BAR_EMPTY,
|
|
|
|
HP_BAR_RED,
|
|
|
|
HP_BAR_YELLOW,
|
|
|
|
HP_BAR_GREEN,
|
|
|
|
HP_BAR_FULL,
|
|
|
|
};
|
|
|
|
|
2017-10-19 16:25:48 +00:00
|
|
|
#define TAG_HEALTHBOX_PLAYER1_TILE 0xD6FF
|
|
|
|
#define TAG_HEALTHBOX_PLAYER2_TILE 0xD700
|
|
|
|
#define TAG_HEALTHBOX_OPPONENT1_TILE 0xD701
|
|
|
|
#define TAG_HEALTHBOX_OPPONENT2_TILE 0xD702
|
|
|
|
|
2018-06-18 22:43:15 +00:00
|
|
|
#define TAG_HEALTHBAR_PLAYER1_TILE 0xD704
|
|
|
|
#define TAG_HEALTHBAR_OPPONENT1_TILE 0xD705
|
|
|
|
#define TAG_HEALTHBAR_PLAYER2_TILE 0xD706
|
|
|
|
#define TAG_HEALTHBAR_OPPONENT2_TILE 0xD707
|
|
|
|
|
2017-10-19 16:25:48 +00:00
|
|
|
#define TAG_HEALTHBOX_SAFARI_TILE 0xD70B
|
|
|
|
|
|
|
|
#define TAG_STATUS_SUMMARY_BAR_TILE 0xD70C
|
|
|
|
#define TAG_STATUS_SUMMARY_BALLS_TILE 0xD714
|
|
|
|
|
|
|
|
#define TAG_HEALTHBOX_PAL 0xD6FF
|
2018-06-18 22:43:15 +00:00
|
|
|
#define TAG_HEALTHBAR_PAL 0xD704
|
2017-10-19 16:25:48 +00:00
|
|
|
#define TAG_STATUS_SUMMARY_BAR_PAL 0xD710
|
|
|
|
#define TAG_STATUS_SUMMARY_BALLS_PAL 0xD712
|
|
|
|
|
2017-10-09 16:18:40 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
HEALTHBOX_ALL,
|
|
|
|
HEALTHBOX_CURRENT_HP,
|
|
|
|
HEALTHBOX_MAX_HP,
|
|
|
|
HEALTHBOX_LEVEL,
|
|
|
|
HEALTHBOX_NICK,
|
|
|
|
HEALTHBOX_HEALTH_BAR,
|
|
|
|
HEALTHBOX_EXP_BAR,
|
2017-10-18 21:52:21 +00:00
|
|
|
HEALTHBOX_UNUSED_7,
|
|
|
|
HEALTHBOX_UNUSED_8,
|
2017-10-09 16:18:40 +00:00
|
|
|
HEALTHBOX_STATUS_ICON,
|
|
|
|
HEALTHBOX_SAFARI_ALL_TEXT,
|
|
|
|
HEALTHBOX_SAFARI_BALLS_TEXT
|
|
|
|
};
|
|
|
|
|
2018-02-06 22:09:39 +00:00
|
|
|
u8 CreateBattlerHealthboxSprites(u8 bank);
|
2017-10-09 16:18:40 +00:00
|
|
|
u8 CreateSafariPlayerHealthboxSprites(void);
|
2017-10-22 16:43:15 +00:00
|
|
|
void SetBattleBarStruct(u8 bank, u8 healthboxSpriteId, s32 maxVal, s32 currVal, s32 receivedValue);
|
2017-10-09 16:18:40 +00:00
|
|
|
void SetHealthboxSpriteInvisible(u8 healthboxSpriteId);
|
2017-10-19 13:28:41 +00:00
|
|
|
void SetHealthboxSpriteVisible(u8 healthboxSpriteId);
|
|
|
|
void DestoryHealthboxSprite(u8 healthboxSpriteId);
|
2017-10-19 16:25:48 +00:00
|
|
|
void DummyBattleInterfaceFunc(u8 healthboxSpriteId, bool8 isDoubleBattleBankOnly);
|
2017-10-19 13:28:41 +00:00
|
|
|
void UpdateOamPriorityInAllHealthboxes(u8 priority);
|
2018-02-06 19:48:02 +00:00
|
|
|
void InitBattlerHealthboxCoords(u8 bank);
|
2017-10-19 13:28:41 +00:00
|
|
|
void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent);
|
|
|
|
void SwapHpBarsWithHpText(void);
|
|
|
|
u8 CreatePartyStatusSummarySprites(u8 bank, struct HpAndStatus *partyInfo, u8 arg2, bool8 isBattleStart);
|
2018-06-28 19:06:32 +00:00
|
|
|
void Task_HidePartyStatusSummary(u8 taskId);
|
2017-10-19 13:28:41 +00:00
|
|
|
void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elementId);
|
2018-06-18 22:43:15 +00:00
|
|
|
s32 MoveBattleBar(u8 bank, u8 healthboxSpriteId, u8 whichBar, u8 arg3);
|
2017-10-19 13:28:41 +00:00
|
|
|
u8 GetScaledHPFraction(s16 hp, s16 maxhp, u8 scale);
|
|
|
|
u8 GetHPBarLevel(s16 hp, s16 maxhp);
|
2017-10-09 16:18:40 +00:00
|
|
|
|
|
|
|
#endif // GUARD_BATTLE_INTERFACE_H
|