Label battle script macro arguments
This commit is contained in:
@@ -41,19 +41,6 @@
|
||||
#define B_ACTION_NOTHING_FAINTED 13 // when choosing an action
|
||||
#define B_ACTION_NONE 0xFF
|
||||
|
||||
// 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 MOVE_TARGET_SELECTED 0
|
||||
#define MOVE_TARGET_DEPENDS (1 << 0)
|
||||
#define MOVE_TARGET_USER_OR_SELECTED (1 << 1)
|
||||
@@ -487,6 +474,8 @@ struct BattleStruct
|
||||
|
||||
#define SET_STATCHANGER(statId, stage, goesDown)(gBattleScripting.statChanger = (statId) + (stage << 4) + (goesDown << 7))
|
||||
|
||||
// NOTE: The members of this struct have hard-coded offsets
|
||||
// in include/constants/battle_script_commands.h
|
||||
struct BattleScripting
|
||||
{
|
||||
s32 painSplitHp;
|
||||
@@ -509,7 +498,7 @@ struct BattleScripting
|
||||
u8 battleStyle;
|
||||
u8 drawlvlupboxState;
|
||||
u8 learnMoveState;
|
||||
u8 field_20;
|
||||
u8 pursuitDoublesAttacker;
|
||||
u8 reshowMainState;
|
||||
u8 reshowHelperState;
|
||||
u8 levelUpHP;
|
||||
@@ -518,9 +507,6 @@ struct BattleScripting
|
||||
u8 specialTrainerBattleType;
|
||||
};
|
||||
|
||||
// rom_80A5C6C
|
||||
|
||||
|
||||
struct BattleSpriteInfo
|
||||
{
|
||||
u16 invisible:1; // 0x1
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define GUARD_BATTLE_SCRIPT_COMMANDS_H
|
||||
|
||||
#include "constants/pokemon.h"
|
||||
#include "constants/battle_script_commands.h"
|
||||
|
||||
// Arguments for 'flags' in HandleBattleWindow
|
||||
#define WINDOW_CLEAR (1 << 0)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user