pokeemerald/include/battle_main.h

109 lines
3.6 KiB
C
Raw Normal View History

2018-01-16 23:15:02 +01:00
#ifndef GUARD_BATTLE_MAIN_H
#define GUARD_BATTLE_MAIN_H
2017-10-06 17:06:45 +02:00
2018-02-26 14:29:17 +01:00
struct TrainerMoney
{
u8 classId;
u8 value;
};
2018-10-12 03:23:39 +02:00
struct UnknownPokemonStruct4
{
/*0x00*/ u16 species;
/*0x02*/ u16 heldItem;
/*0x04*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
/*0x0F*/ u8 level;
/*0x10*/ u16 hp;
/*0x12*/ u16 maxhp;
/*0x14*/ u32 status;
/*0x18*/ u32 personality;
/*0x1C*/ u8 gender;
/*0x1D*/ u8 language;
};
2018-02-26 14:29:17 +01:00
#define TYPE_NAME_LENGTH 6
#define ABILITY_NAME_LENGTH 12
// defines for the u8 array gTypeEffectiveness
#define TYPE_EFFECT_ATK_TYPE(i)((gTypeEffectiveness[i + 0]))
#define TYPE_EFFECT_DEF_TYPE(i)((gTypeEffectiveness[i + 1]))
#define TYPE_EFFECT_MULTIPLIER(i)((gTypeEffectiveness[i + 2]))
// defines for the gTypeEffectiveness multipliers
#define TYPE_MUL_NO_EFFECT 0
#define TYPE_MUL_NOT_EFFECTIVE 5
#define TYPE_MUL_NORMAL 10
#define TYPE_MUL_SUPER_EFFECTIVE 20
// special type table Ids
#define TYPE_FORESIGHT 0xFE
#define TYPE_ENDTABLE 0xFF
2018-06-20 23:07:51 +02:00
// defines for the 'DoBounceEffect' function
#define BOUNCE_MON 0x0
#define BOUNCE_HEALTHBOX 0x1
2017-10-06 17:06:45 +02:00
void CB2_InitBattle(void);
void BattleMainCB2(void);
2017-10-22 18:43:15 +02:00
void CB2_QuitRecordedBattle(void);
void sub_8038528(struct Sprite* sprite);
void sub_8038A04(void); // unused
2017-10-06 17:06:45 +02:00
void VBlankCB_Battle(void);
2018-09-12 00:37:47 +02:00
void nullsub_17(struct Sprite *sprite);
2017-10-22 18:43:15 +02:00
void sub_8038B74(struct Sprite *sprite);
void sub_8038D64(void);
2017-10-22 18:43:15 +02:00
u32 sub_80391E0(u8 arrayId, u8 caseId);
2017-10-08 14:54:51 +02:00
u32 sub_80397C4(u32 setId, u32 tableId);
2018-12-23 14:52:47 +01:00
void SpriteCb_WildMon(struct Sprite *sprite);
2017-10-22 18:43:15 +02:00
void SpriteCallbackDummy_2(struct Sprite *sprite);
2018-06-20 23:07:51 +02:00
void SpriteCB_FaintOpponentMon(struct Sprite *sprite);
void sub_8039AD8(struct Sprite *sprite);
2017-10-22 18:43:15 +02:00
void sub_8039B2C(struct Sprite *sprite);
void sub_8039B58(struct Sprite *sprite);
void sub_8039BB4(struct Sprite *sprite);
void sub_80105DC(struct Sprite *sprite);
void sub_8039C00(struct Sprite *sprite);
2018-06-20 23:07:51 +02:00
void DoBounceEffect(u8 battlerId, u8 b, s8 c, s8 d);
void EndBounceEffect(u8 battlerId, bool8 b);
2017-10-22 18:43:15 +02:00
void sub_8039E44(struct Sprite *sprite);
void sub_8039E60(struct Sprite *sprite);
void sub_8039E84(struct Sprite *sprite);
void sub_8039E9C(struct Sprite *sprite);
2017-10-13 17:22:50 +02:00
void nullsub_20(void);
void BeginBattleIntro(void);
2017-10-22 18:43:15 +02:00
void SwitchInClearSetData(void);
void FaintClearSetData(void);
void sub_803B3AC(void); // unused
void sub_803B598(void); // unused
void BattleTurnPassed(void);
u8 IsRunningFromBattleImpossible(void);
2019-10-26 03:55:01 +02:00
void SwitchPartyOrder(u8 battlerId);
2017-10-22 18:43:15 +02:00
void SwapTurnOrder(u8 id1, u8 id2);
2018-02-07 22:53:40 +01:00
u8 GetWhoStrikesFirst(u8 battlerId1, u8 battlerId2, bool8 ignoreChosenMoves);
2017-10-22 18:43:15 +02:00
void RunBattleScriptCommands_PopCallbacksStack(void);
void RunBattleScriptCommands(void);
2018-02-07 22:53:40 +01:00
bool8 TryRunFromBattle(u8 battlerId);
2017-10-06 19:09:37 +02:00
2019-10-18 01:22:03 +02:00
extern struct UnknownPokemonStruct4 gMultiPartnerParty[PARTY_SIZE / 2];
2018-10-12 03:23:39 +02:00
2018-12-23 14:52:47 +01:00
extern const struct SpriteTemplate gUnknown_0831AC88;
extern const struct OamData gOamData_831ACA8;
extern const struct OamData gOamData_831ACB0;
2018-02-26 14:29:17 +01:00
extern const u8 gTypeEffectiveness[336];
2019-10-18 01:22:03 +02:00
extern const u8 gTypeNames[NUMBER_OF_MON_TYPES][TYPE_NAME_LENGTH + 1];
2018-02-26 14:29:17 +01:00
extern const struct TrainerMoney gTrainerMoneyTable[];
extern const u8 gAbilityNames[][ABILITY_NAME_LENGTH + 1];
extern const u8 *const gAbilityDescriptionPointers[];
2017-10-06 19:09:37 +02:00
extern const u8 gStatusConditionString_PoisonJpn[8];
extern const u8 gStatusConditionString_SleepJpn[8];
extern const u8 gStatusConditionString_ParalysisJpn[8];
extern const u8 gStatusConditionString_BurnJpn[8];
extern const u8 gStatusConditionString_IceJpn[8];
extern const u8 gStatusConditionString_ConfusionJpn[8];
extern const u8 gStatusConditionString_LoveJpn[8];
2018-06-20 23:07:51 +02:00
extern const u8 *const gStatusConditionStringsTable[7][2];
2017-10-06 17:06:45 +02:00
2018-01-16 23:15:02 +01:00
#endif // GUARD_BATTLE_MAIN_H