diff options
Diffstat (limited to 'include/constants/battle_script_commands.h')
-rw-r--r-- | include/constants/battle_script_commands.h | 79 |
1 files changed, 46 insertions, 33 deletions
diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index d5e3eb7bb..83aacf316 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -1,38 +1,51 @@ #ifndef GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H #define GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H -// Battle Scripting and BattleCommunication addresses -#define sPAINSPLIT_HP gBattleScripting -#define sBIDE_DMG gBattleScripting + 4 -#define sMULTIHIT_STRING gBattleScripting + 8 -#define sDMG_MULTIPLIER gBattleScripting + 0xE -#define sTWOTURN_STRINGID gBattleScripting + 0xF -#define sB_ANIM_ARG1 gBattleScripting + 0x10 -#define sB_ANIM_ARG2 gBattleScripting + 0x11 -#define sTRIPLE_KICK_POWER gBattleScripting + 0x12 -#define sMOVEEND_STATE gBattleScripting + 0x14 -#define sBATTLER_WITH_ABILITY gBattleScripting + 0x15 -#define sMULTIHIT_EFFECT gBattleScripting + 0x16 -#define sBATTLER gBattleScripting + 0x17 -#define sB_ANIM_TURN gBattleScripting + 0x18 -#define sB_ANIM_TARGETS_HIT gBattleScripting + 0x19 -#define sSTATCHANGER gBattleScripting + 0x1A -#define sSTAT_ANIM_PLAYED gBattleScripting + 0x1B -#define sGIVEEXP_STATE gBattleScripting + 0x1C -#define sBATTLE_STYLE gBattleScripting + 0x1D -#define sLVLBOX_STATE gBattleScripting + 0x1E -#define sLEARNMOVE_STATE gBattleScripting + 0x1F -#define sFIELD_20 gBattleScripting + 0x20 -#define sRESHOW_MAIN_STATE gBattleScripting + 0x21 -#define sRESHOW_HELPER_STATE gBattleScripting + 0x22 -#define sFIELD_23 gBattleScripting + 0x23 -#define sWINDOWS_TYPE gBattleScripting + 0x24 -#define sMULTIPLAYER_ID gBattleScripting + 0x25 -#define sSPECIAL_TRAINER_BATTLE_TYPE gBattleScripting + 0x26 +// The following correspond to the struct members of BattleScripting by adding their offset +#define sPAINSPLIT_HP (gBattleScripting + 0x00) // painSplitHp +#define sBIDE_DMG (gBattleScripting + 0x04) // bideDmg +#define sMULTIHIT_STRING (gBattleScripting + 0x08) // multihitString +#define sDMG_MULTIPLIER (gBattleScripting + 0x0E) // dmgMultiplier +#define sTWOTURN_STRINGID (gBattleScripting + 0x0F) // twoTurnsMoveStringId +#define sB_ANIM_ARG1 (gBattleScripting + 0x10) // animArg1 +#define sB_ANIM_ARG2 (gBattleScripting + 0x11) // animArg2 +#define sTRIPLE_KICK_POWER (gBattleScripting + 0x12) // tripleKickPower +#define sMOVEEND_STATE (gBattleScripting + 0x14) // moveendState +#define sBATTLER_WITH_ABILITY (gBattleScripting + 0x15) // battlerWithAbility +#define sMULTIHIT_EFFECT (gBattleScripting + 0x16) // multihitMoveEffect +#define sBATTLER (gBattleScripting + 0x17) // battler +#define sB_ANIM_TURN (gBattleScripting + 0x18) // animTurn +#define sB_ANIM_TARGETS_HIT (gBattleScripting + 0x19) // animTargetsHit +#define sSTATCHANGER (gBattleScripting + 0x1A) // statChanger +#define sSTAT_ANIM_PLAYED (gBattleScripting + 0x1B) // statAnimPlayed +#define sGIVEEXP_STATE (gBattleScripting + 0x1C) // getexpState +#define sBATTLE_STYLE (gBattleScripting + 0x1D) // battleStyle +#define sLVLBOX_STATE (gBattleScripting + 0x1E) // drawlvlupboxState +#define sLEARNMOVE_STATE (gBattleScripting + 0x1F) // learnMoveState +#define sPURSUIT_DOUBLES_ATTACKER (gBattleScripting + 0x20) // pursuitDoublesAttacker +#define sRESHOW_MAIN_STATE (gBattleScripting + 0x21) // reshowMainState +#define sRESHOW_HELPER_STATE (gBattleScripting + 0x22) // reshowHelperState +#define sLVLUP_HP (gBattleScripting + 0x23) // levelUpHP +#define sWINDOWS_TYPE (gBattleScripting + 0x24) // windowsType +#define sMULTIPLAYER_ID (gBattleScripting + 0x25) // multiplayerId +#define sSPECIAL_TRAINER_BATTLE_TYPE (gBattleScripting + 0x26) // specialTrainerBattleType -#define cEFFECT_CHOOSER gBattleCommunication + 3 -#define cMULTISTRING_CHOOSER gBattleCommunication + 5 -#define cMISS_TYPE gBattleCommunication + 6 +// Array entries for battle communication +#define MULTIUSE_STATE 0 +#define CURSOR_POSITION 1 +#define TASK_ID 1 // task Id and cursor position share the same field +#define SPRITES_INIT_STATE1 1 // shares the Id as well +#define SPRITES_INIT_STATE2 2 +#define MOVE_EFFECT_BYTE 3 +#define ACTIONS_CONFIRMED_COUNT 4 +#define MULTISTRING_CHOOSER 5 +#define MISS_TYPE 6 +#define MSG_DISPLAY 7 +#define BATTLE_COMMUNICATION_ENTRIES_COUNT 8 + +#define cEFFECT_CHOOSER (gBattleCommunication + MOVE_EFFECT_BYTE) +#define cMULTISTRING_CHOOSER (gBattleCommunication + MULTISTRING_CHOOSER) +#define cMISS_TYPE (gBattleCommunication + MISS_TYPE) // Battle Script defines for getting the wanted battler #define BS_TARGET 0 @@ -40,8 +53,8 @@ #define BS_EFFECT_BATTLER 2 #define BS_FAINTED 3 #define BS_ATTACKER_WITH_PARTNER 4 // for Cmd_updatestatusicon -#define BS_UNK_5 5 -#define BS_UNK_6 6 +#define BS_FAINTED_LINK_MULTIPLE_1 5 +#define BS_FAINTED_LINK_MULTIPLE_2 6 #define BS_BATTLER_0 7 #define BS_ATTACKER_SIDE 8 // for Cmd_jumpifability #define BS_NOT_ATTACKER_SIDE 9 // for Cmd_jumpifability |