summaryrefslogtreecommitdiff
path: root/src/evolution_scene.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/evolution_scene.c')
-rw-r--r--src/evolution_scene.c50
1 files changed, 26 insertions, 24 deletions
diff --git a/src/evolution_scene.c b/src/evolution_scene.c
index 68731a14a..c17921b74 100644
--- a/src/evolution_scene.c
+++ b/src/evolution_scene.c
@@ -16,11 +16,12 @@
#include "m4a.h"
#include "menu.h"
#include "pokedex.h"
-#include "species.h"
+#include "constants/species.h"
#include "sound.h"
-#include "songs.h"
+#include "constants/songs.h"
#include "overworld.h"
#include "battle_message.h"
+#include "battle_string_ids.h"
#include "gpu_regs.h"
#include "bg.h"
#include "link.h"
@@ -51,6 +52,7 @@ extern u8 gBattleTerrain;
extern struct SpriteTemplate gUnknown_0202499C;
extern bool8 gAffineAnimsDisabled;
extern u16 gMoveToLearn;
+extern const u8 gSpeciesNames[][11];
extern u8 gBattleCommunication[];
#define sEvoCursorPos gBattleCommunication[1] // when learning a new move
@@ -771,7 +773,7 @@ static void Task_EvolutionScene(u8 taskID)
{
BufferMoveToLearnIntoBattleTextBuff2();
PlayFanfare(BGM_FANFA1);
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[3]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNLEARNEDMOVE - BATTLESTRINGS_ID_ADDER]);
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
gTasks[taskID].tLearnsFirstMove = 0x40; // re-used as a counter
gTasks[taskID].tState++;
@@ -788,7 +790,7 @@ static void Task_EvolutionScene(u8 taskID)
if (!IsTextPrinterActive(0) && !IsSEPlaying())
{
BufferMoveToLearnIntoBattleTextBuff2();
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[4]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE1 - BATTLESTRINGS_ID_ADDER]);
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
gTasks[taskID].tLearnMoveState++;
}
@@ -796,7 +798,7 @@ static void Task_EvolutionScene(u8 taskID)
case 1:
if (!IsTextPrinterActive(0) && !IsSEPlaying())
{
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[5]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE2 - BATTLESTRINGS_ID_ADDER]);
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
gTasks[taskID].tLearnMoveState++;
}
@@ -804,7 +806,7 @@ static void Task_EvolutionScene(u8 taskID)
case 2:
if (!IsTextPrinterActive(0) && !IsSEPlaying())
{
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[6]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE3 - BATTLESTRINGS_ID_ADDER]);
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
gTasks[taskID].tData7 = 5;
gTasks[taskID].tData8 = 10;
@@ -881,7 +883,7 @@ static void Task_EvolutionScene(u8 taskID)
u16 move = GetMonData(mon, var + MON_DATA_MOVE1);
if (IsHMMove2(move))
{
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[307]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_HMMOVESCANTBEFORGOTTEN - BATTLESTRINGS_ID_ADDER]);
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
gTasks[taskID].tLearnMoveState = 12;
}
@@ -897,14 +899,14 @@ static void Task_EvolutionScene(u8 taskID)
}
break;
case 7:
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[207]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_123POOF - BATTLESTRINGS_ID_ADDER]);
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
gTasks[taskID].tLearnMoveState++;
break;
case 8:
if (!IsTextPrinterActive(0) && !IsSEPlaying())
{
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[7]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNFORGOTMOVE - BATTLESTRINGS_ID_ADDER]);
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
gTasks[taskID].tLearnMoveState++;
}
@@ -912,20 +914,20 @@ static void Task_EvolutionScene(u8 taskID)
case 9:
if (!IsTextPrinterActive(0) && !IsSEPlaying())
{
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[208]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_ANDELLIPSIS - BATTLESTRINGS_ID_ADDER]);
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
gTasks[taskID].tState = 20;
}
break;
case 10:
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[8]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_STOPLEARNINGMOVE - BATTLESTRINGS_ID_ADDER]);
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
gTasks[taskID].tData7 = 11;
gTasks[taskID].tData8 = 0;
gTasks[taskID].tLearnMoveState = 3;
break;
case 11:
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[9]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_DIDNOTLEARNMOVE - BATTLESTRINGS_ID_ADDER]);
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
gTasks[taskID].tState = 15;
break;
@@ -1116,7 +1118,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
{
BufferMoveToLearnIntoBattleTextBuff2();
PlayFanfare(BGM_FANFA1);
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[3]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNLEARNEDMOVE - BATTLESTRINGS_ID_ADDER]);
sub_807F1A8(0, gDisplayedStringBattle, 1);
gTasks[taskID].tLearnsFirstMove = 0x40; // re-used as a counter
gTasks[taskID].tState++;
@@ -1133,7 +1135,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
if (!IsTextPrinterActive(0) && !IsSEPlaying())
{
BufferMoveToLearnIntoBattleTextBuff2();
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[4]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE1 - BATTLESTRINGS_ID_ADDER]);
sub_807F1A8(0, gDisplayedStringBattle, 1);
gTasks[taskID].tLearnMoveState++;
}
@@ -1141,7 +1143,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
case 1:
if (!IsTextPrinterActive(0) && !IsSEPlaying())
{
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[5]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE2 - BATTLESTRINGS_ID_ADDER]);
sub_807F1A8(0, gDisplayedStringBattle, 1);
gTasks[taskID].tLearnMoveState++;
}
@@ -1149,7 +1151,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
case 2:
if (!IsTextPrinterActive(0) && !IsSEPlaying())
{
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[6]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE3 - BATTLESTRINGS_ID_ADDER]);
sub_807F1A8(0, gDisplayedStringBattle, 1);
gTasks[taskID].tData7 = 5;
gTasks[taskID].tData8 = 9;
@@ -1170,7 +1172,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
{
case 0:
sEvoCursorPos = 0;
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[292]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_EMPTYSTRING3 - BATTLESTRINGS_ID_ADDER]);
sub_807F1A8(0, gDisplayedStringBattle, 1);
gTasks[taskID].tLearnMoveState = gTasks[taskID].tData7;
if (gTasks[taskID].tLearnMoveState == 5)
@@ -1179,7 +1181,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
case 1:
case -1:
sEvoCursorPos = 1;
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[292]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_EMPTYSTRING3 - BATTLESTRINGS_ID_ADDER]);
sub_807F1A8(0, gDisplayedStringBattle, 1);
gTasks[taskID].tLearnMoveState = gTasks[taskID].tData8;
break;
@@ -1215,7 +1217,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
u16 move = GetMonData(mon, var + MON_DATA_MOVE1);
if (IsHMMove2(move))
{
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[307]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_HMMOVESCANTBEFORGOTTEN - BATTLESTRINGS_ID_ADDER]);
sub_807F1A8(0, gDisplayedStringBattle, 1);
gTasks[taskID].tLearnMoveState = 11;
}
@@ -1225,7 +1227,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
RemoveMonPPBonus(mon, var);
SetMonMoveSlot(mon, gMoveToLearn, var);
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[207]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_123POOF - BATTLESTRINGS_ID_ADDER]);
sub_807F1A8(0, gDisplayedStringBattle, 1);
gTasks[taskID].tLearnMoveState++;
}
@@ -1235,7 +1237,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
case 7:
if (!IsTextPrinterActive(0) && !IsSEPlaying())
{
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[7]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNFORGOTMOVE - BATTLESTRINGS_ID_ADDER]);
sub_807F1A8(0, gDisplayedStringBattle, 1);
gTasks[taskID].tLearnMoveState++;
}
@@ -1243,20 +1245,20 @@ static void Task_TradeEvolutionScene(u8 taskID)
case 8:
if (!IsTextPrinterActive(0) && !IsSEPlaying())
{
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[208]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_ANDELLIPSIS - BATTLESTRINGS_ID_ADDER]);
sub_807F1A8(0, gDisplayedStringBattle, 1);
gTasks[taskID].tState = 18;
}
break;
case 9:
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[8]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_STOPLEARNINGMOVE - BATTLESTRINGS_ID_ADDER]);
sub_807F1A8(0, gDisplayedStringBattle, 1);
gTasks[taskID].tData7 = 10;
gTasks[taskID].tData8 = 0;
gTasks[taskID].tLearnMoveState = 3;
break;
case 10:
- BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[9]);
+ BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_DIDNOTLEARNMOVE - BATTLESTRINGS_ID_ADDER]);
sub_807F1A8(0, gDisplayedStringBattle, 1);
gTasks[taskID].tState = 13;
break;