From cc572f7c00b7a07161b5298868bcb495b7c87b61 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 26 Nov 2017 11:55:17 +0100 Subject: clear battle code and battlescripts --- include/battle.h | 3 ++- include/battle_message.h | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/battle.h b/include/battle.h index 5e37ef77c..e65833b4f 100644 --- a/include/battle.h +++ b/include/battle.h @@ -837,9 +837,10 @@ extern struct BattleStruct* gBattleStruct; #define GET_STAT_BUFF_VALUE(n)(((n >> 4) & 7)) // 0x10, 0x20, 0x40 #define STAT_BUFF_NEGATIVE 0x80 // 0x80, the sign bit -#define SET_STAT_BUFF_ID(n)((n & 0xF)) #define SET_STAT_BUFF_VALUE(n)(((s8)(((s8)(n) << 4)) & 0xF0)) +#define SET_STATCHANGER(statId, stage, goesDown)(gBattleScripting.statChanger = (statId) + (stage << 4) + (goesDown << 7)) + struct BattleScripting { s32 painSplitHp; diff --git a/include/battle_message.h b/include/battle_message.h index 3f9b38cad..8b724a316 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -74,6 +74,14 @@ #define B_BUFF_PLACEHOLDER_BEGIN 0xFD #define B_BUFF_EOS 0xFF +#define PREPARE_FLAVOUR_BUFFER(textVar, flavourId) \ +{ \ + textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ + textVar[1] = B_BUFF_NEGATIVE_FLAVOUR; \ + textVar[2] = flavourId; \ + textVar[3] = B_BUFF_EOS; \ +} + #define PREPARE_STAT_BUFFER(textVar, statId) \ { \ textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ -- cgit v1.2.3