summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/battle_controllers.h4
-rw-r--r--include/constants/battle_script_commands.h48
-rw-r--r--include/constants/battle_string_ids.h23
3 files changed, 45 insertions, 30 deletions
diff --git a/include/battle_controllers.h b/include/battle_controllers.h
index da76ab0c6..34e916b0f 100644
--- a/include/battle_controllers.h
+++ b/include/battle_controllers.h
@@ -156,7 +156,7 @@ enum
CONTROLLER_CLEARUNKFLAG,
CONTROLLER_TOGGLEUNKFLAG,
CONTROLLER_HITANIMATION,
- CONTROLLER_42,
+ CONTROLLER_CANTSWITCH,
CONTROLLER_PLAYSE,
CONTROLLER_PLAYFANFAREORBGM,
CONTROLLER_FAINTINGCRY,
@@ -227,7 +227,7 @@ void BtlController_EmitSetUnkVar(u8 bufferId, u8 b); // unused
void BtlController_EmitClearUnkFlag(u8 bufferId); // unused
void BtlController_EmitToggleUnkFlag(u8 bufferId); // unused
void BtlController_EmitHitAnimation(u8 bufferId);
-void BtlController_EmitCmd42(u8 bufferId);
+void BtlController_EmitCantSwitch(u8 bufferId);
void BtlController_EmitPlaySE(u8 bufferId, u16 songId);
void BtlController_EmitPlayFanfareOrBGM(u8 bufferId, u16 songId, bool8 playBGM);
void BtlController_EmitFaintingCry(u8 bufferId);
diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h
index cef0b184d..9794589af 100644
--- a/include/constants/battle_script_commands.h
+++ b/include/constants/battle_script_commands.h
@@ -39,8 +39,10 @@
#define BS_ATTACKER 1
#define BS_EFFECT_BATTLER 2
#define BS_FAINTED 3
-#define BS_BATTLER_0 7
#define BS_ATTACKER_WITH_PARTNER 4 // for Cmd_updatestatusicon
+#define BS_UNK_5 5
+#define BS_UNK_6 6
+#define BS_BATTLER_0 7
#define BS_ATTACKER_SIDE 8 // for Cmd_jumpifability
#define BS_NOT_ATTACKER_SIDE 9 // for Cmd_jumpifability
#define BS_SCRIPTING 10
@@ -55,12 +57,12 @@
#define ACC_CURR_MOVE 0
// compare operands
-#define CMP_EQUAL 0x0
-#define CMP_NOT_EQUAL 0x1
-#define CMP_GREATER_THAN 0x2
-#define CMP_LESS_THAN 0x3
-#define CMP_COMMON_BITS 0x4
-#define CMP_NO_COMMON_BITS 0x5
+#define CMP_EQUAL 0
+#define CMP_NOT_EQUAL 1
+#define CMP_GREATER_THAN 2
+#define CMP_LESS_THAN 3
+#define CMP_COMMON_BITS 4
+#define CMP_NO_COMMON_BITS 5
// Cmd_various
#define VARIOUS_CANCEL_MULTI_TURN_MOVES 0
@@ -93,27 +95,29 @@
#define DMG_DOUBLED 2
// Cmd_jumpifcantswitch
-#define SWITCH_IGNORE_ESCAPE_PREVENTION 0x80
+#define SWITCH_IGNORE_ESCAPE_PREVENTION (1 << 7)
// Cmd_statbuffchange
-#define STAT_BUFF_ALLOW_PTR 0x1 // If set, allow use of jumpptr. Set in every use of statbuffchange
-#define STAT_BUFF_NOT_PROTECT_AFFECTED 0x20
+#define STAT_BUFF_ALLOW_PTR (1 << 0) // If set, allow use of jumpptr. Set in every use of statbuffchange
+#define STAT_BUFF_NOT_PROTECT_AFFECTED (1 << 5)
// stat change flags for Cmd_playstatchangeanimation
-#define STAT_CHANGE_NEGATIVE 0x1
-#define STAT_CHANGE_BY_TWO 0x2
-#define STAT_CHANGE_MULTIPLE_STATS 0x4
-#define STAT_CHANGE_CANT_PREVENT 0x8
+#define STAT_CHANGE_NEGATIVE (1 << 0)
+#define STAT_CHANGE_BY_TWO (1 << 1)
+#define STAT_CHANGE_MULTIPLE_STATS (1 << 2)
+#define STAT_CHANGE_CANT_PREVENT (1 << 3)
// stat flags for Cmd_playstatchangeanimation
-#define BIT_HP 0x1
-#define BIT_ATK 0x2
-#define BIT_DEF 0x4
-#define BIT_SPEED 0x8
-#define BIT_SPATK 0x10
-#define BIT_SPDEF 0x20
-#define BIT_ACC 0x40
-#define BIT_EVASION 0x80
+#define BIT_HP (1 << 0)
+#define BIT_ATK (1 << 1)
+#define BIT_DEF (1 << 2)
+#define BIT_SPEED (1 << 3)
+#define BIT_SPATK (1 << 4)
+#define BIT_SPDEF (1 << 5)
+#define BIT_ACC (1 << 6)
+#define BIT_EVASION (1 << 7)
+
+#define PARTY_SCREEN_OPTIONAL (1 << 7) // Flag for first argument to openpartyscreen
// cases for Cmd_moveend
#define MOVEEND_RAGE 0
diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h
index f1c589fee..f22541272 100644
--- a/include/constants/battle_string_ids.h
+++ b/include/constants/battle_string_ids.h
@@ -421,12 +421,6 @@
#define B_MSG_LEECH_SEED_DRAIN 3
#define B_MSG_LEECH_SEED_OOZE 4
-// gBattlePalaceFlavorTextTable
-#define B_MSG_GLINT_IN_EYE 0
-#define B_MSG_GETTING_IN_POS 1
-#define B_MSG_GROWL_DEEPLY 2
-#define B_MSG_EAGER_FOR_MORE 3
-
// gFirstTurnOfTwoStringIds
#define B_MSG_TURN1_RAZOR_WIND 0
#define B_MSG_TURN1_SOLAR_BEAM 1
@@ -586,4 +580,21 @@
#define B_MSG_DEFROSTED 0
#define B_MSG_DEFROSTED_BY_MOVE 1
+// gBattlePalaceFlavorTextTable
+#define B_MSG_GLINT_IN_EYE 0
+#define B_MSG_GETTING_IN_POS 1
+#define B_MSG_GROWL_DEEPLY 2
+#define B_MSG_EAGER_FOR_MORE 3
+
+// gRefereeStringsTable
+#define B_MSG_REF_NOTHING_IS_DECIDED 0
+#define B_MSG_REF_THATS_IT 1
+#define B_MSG_REF_JUDGE_MIND 2
+#define B_MSG_REF_JUDGE_SKILL 3
+#define B_MSG_REF_JUDGE_BODY 4
+#define B_MSG_REF_PLAYER_WON 5
+#define B_MSG_REF_OPPONENT_WON 6
+#define B_MSG_REF_DRAW 7
+#define B_MSG_REF_COMMENCE_BATTLE 8
+
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H