From c8e231256e15362047760d094f62db5ab52c660c Mon Sep 17 00:00:00 2001 From: Thomas Winwood Date: Wed, 17 Jan 2018 05:47:02 +0000 Subject: Document sub_8121D1C, sub_8121D74 and gUnknown_084016BC These are left over from the Japanese games, which provide more variation to the attack string than the English games. --- src/battle/battle_message.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/battle/battle_message.c b/src/battle/battle_message.c index e9334ef61..ed7ab3a35 100644 --- a/src/battle/battle_message.c +++ b/src/battle/battle_message.c @@ -25,6 +25,8 @@ #include "../data/battle_strings_en.h" #endif +// This is four lists of moves which use a different attack string in Japanese +// to the default. See the documentation for sub_8121D74 for more detail. const u16 gUnknown_084016BC[] = { MOVE_SWORDS_DANCE, @@ -69,7 +71,7 @@ const u16 gUnknown_084016BC[] = MOVE_MUDDY_WATER, MOVE_IRON_DEFENSE, MOVE_BOUNCE, - MOVE_NONE, + 0, MOVE_TELEPORT, MOVE_RECOVER, MOVE_BIDE, @@ -77,7 +79,7 @@ const u16 gUnknown_084016BC[] = MOVE_FLAIL, MOVE_TAUNT, MOVE_BULK_UP, - MOVE_NONE, + 0, MOVE_MEDITATE, MOVE_AGILITY, MOVE_MIMIC, @@ -96,7 +98,7 @@ const u16 gUnknown_084016BC[] = MOVE_FAKE_TEARS, MOVE_WATER_SPORT, MOVE_CALM_MIND, - MOVE_NONE, + 0, MOVE_POUND, MOVE_SCRATCH, MOVE_VICE_GRIP, @@ -144,7 +146,7 @@ const u16 gUnknown_084016BC[] = MOVE_ENDEAVOR, MOVE_TICKLE, MOVE_COVET, - MOVE_NONE, + 0, }; const u8 gUnknown_084017A8[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; // empty flags @@ -971,6 +973,10 @@ void StrCpyDecodeBattleTextBuff(u8* src, u8* dst) } } +// Loads one of two text strings into the provided buffer. This is functionally +// unused, since the value loaded into the buffer is not read; it loaded one of +// two particles (either "は" or "の") which works in tandem with sub_8121D74 +// below to effect changes in the meaning of the line. void sub_8121D1C(u8* textBuff) { s32 counter = 0; @@ -993,6 +999,24 @@ void sub_8121D1C(u8* textBuff) } } +// Appends "!" to the text buffer `dst`. In the original Japanese this looked +// into the table of moves at gUnknown_084016BC and varied the line accordingly. +// +// BattleText_Exclamation was a plain "!", used for any attack not on the list. +// It resulted in the translation "'s !". +// +// BattleText_Exclamation2 was "を つかった!". This resulted in the translation +// " used !", which was used for all attacks in English. +// +// BattleText_Exclamation3 was "した!". This was used for those moves whose +// names were verbs, such as Recover, and resulted in translations like " +// recovered itself!". +// +// BattleText_Exclamation4 was "を した!" This resulted in a translation of +// " did an !". +// +// BattleText_Exclamation5 was " こうげき!" This resulted in a translation of +// "'s attack!". void sub_8121D74(u8* dst) { s32 counter = 0; -- cgit v1.2.3