summaryrefslogtreecommitdiff
path: root/include/battle_message.h
diff options
context:
space:
mode:
authorDizzyEggg <jajkodizzy@wp.pl>2017-09-26 22:39:59 +0200
committerDizzyEggg <jajkodizzy@wp.pl>2017-09-26 22:39:59 +0200
commitd769ec137447c52062b48153851bd2824055b6df (patch)
treed4b067644c81b1f1bcfc70120b1b64ba1d214f28 /include/battle_message.h
parent52a951276f8d4b79195a0d4889503e4a7f096024 (diff)
battle 4 up to a8
Diffstat (limited to 'include/battle_message.h')
-rw-r--r--include/battle_message.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/include/battle_message.h b/include/battle_message.h
index ad1ce3455..3e28fa5e5 100644
--- a/include/battle_message.h
+++ b/include/battle_message.h
@@ -74,6 +74,22 @@
#define B_BUFF_PLACEHOLDER_BEGIN 0xFD
#define B_BUFF_EOS 0xFF
+#define PREPARE_STAT_BUFFER(textVar, statId) \
+{ \
+ textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
+ textVar[1] = B_BUFF_STAT; \
+ textVar[2] = statId; \
+ textVar[3] = B_BUFF_EOS; \
+}
+
+#define PREPARE_TYPE_BUFFER(textVar, typeId) \
+{ \
+ textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
+ textVar[1] = B_BUFF_TYPE; \
+ textVar[2] = typeId; \
+ textVar[3] = B_BUFF_EOS; \
+}
+
#define PREPARE_BYTE_NUMBER_BUFFER(textVar, maxDigits, number) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
@@ -84,6 +100,17 @@
textVar[5] = B_BUFF_EOS; \
}
+#define PREPARE_HWORD_NUMBER_BUFFER(textVar, maxDigits, number) \
+{ \
+ textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
+ textVar[1] = B_BUFF_NUMBER; \
+ textVar[2] = 2; \
+ textVar[3] = maxDigits; \
+ textVar[4] = (number); \
+ textVar[5] = (number & 0x0000FF00) >> 8; \
+ textVar[6] = B_BUFF_EOS; \
+}
+
#define PREPARE_WORD_NUMBER_BUFFER(textVar, maxDigits, number) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
@@ -158,7 +185,7 @@ struct StringInfoBattle
};
void BufferStringBattle(u16 stringID);
-u32 StrCpyDecodeToDisplayedStringBattle(const u8* src);
+u32 BattleStringExpandPlaceholdersToDisplayedString(const u8* src);
u32 BattleStringExpandPlaceholders(const u8* src, u8* dst);
void sub_814F9EC(const u8* text, u8 arg1);