summaryrefslogtreecommitdiff
path: root/src/match_call.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/match_call.c')
-rw-r--r--src/match_call.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/match_call.c b/src/match_call.c
index b02af9977..dac98e559 100644
--- a/src/match_call.c
+++ b/src/match_call.c
@@ -1,5 +1,5 @@
#include "global.h"
-#include "alloc.h"
+#include "malloc.h"
#include "battle.h"
#include "battle_setup.h"
#include "bg.h"
@@ -965,9 +965,9 @@ static const struct MatchCallText *const sMatchCallGeneralTopics[] =
sMatchCallBattlePyramidTexts,
};
-extern const u8 gUnknown_082A5C9C[];
-extern const u8 gUnknown_082A5D2C[];
-extern const u8 gUnknown_082A633D[];
+extern const u8 gBirchDexRatingText_AreYouCurious[];
+extern const u8 gBirchDexRatingText_SoYouveSeenAndCaught[];
+extern const u8 gBirchDexRatingText_OnANationwideBasis[];
void InitMatchCallCounters(void)
{
@@ -1060,7 +1060,7 @@ static bool32 SelectMatchCallTrainer(void)
static u32 GetNumRegisteredNPCs(void)
{
u32 i, count;
- for (i = 0, count = 0; i < 64; i++)
+ for (i = 0, count = 0; i < REMATCH_SPECIAL_TRAINER_START; i++)
{
if (FlagGet(FLAG_MATCH_CALL_REGISTERED + i))
count++;
@@ -1072,7 +1072,7 @@ static u32 GetNumRegisteredNPCs(void)
static u32 GetActiveMatchCallTrainerId(u32 activeMatchCallId)
{
u32 i;
- for (i = 0; i < 64; i++)
+ for (i = 0; i < REMATCH_SPECIAL_TRAINER_START; i++)
{
if (FlagGet(FLAG_MATCH_CALL_REGISTERED + i))
{
@@ -1290,7 +1290,7 @@ static bool32 sub_81963F0(u8 taskId)
sub_81973A4();
playerObjectId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
EventObjectClearHeldMovementIfFinished(&gEventObjects[playerObjectId]);
- sub_80D338C();
+ ScriptMovement_UnfreezeEventObjects();
UnfreezeEventObjects();
ScriptContext2_Disable();
}
@@ -1384,7 +1384,7 @@ static u16 GetRematchTrainerLocation(int matchCallId)
static u32 GetNumRematchTrainersFought(void)
{
u32 i, count;
- for (i = 0, count = 0; i < 64; i++)
+ for (i = 0, count = 0; i < REMATCH_SPECIAL_TRAINER_START; i++)
{
if (HasTrainerBeenFought(gRematchTable[i].trainerIds[0]))
count++;
@@ -1743,7 +1743,7 @@ static void PopulateBattleFrontierStreak(int matchCallId, u8 *destStr)
i++;
}
- ConvertIntToDecimalStringN(destStr, gBattleFrontierStreakInfo.streak, 0, i);
+ ConvertIntToDecimalStringN(destStr, gBattleFrontierStreakInfo.streak, STR_CONV_MODE_LEFT_ALIGN, i);
}
static const u16 sBadgeFlags[] =
@@ -1961,7 +1961,7 @@ static const u8 *const sBirchDexRatingTexts[] =
gBirchDexRatingText_DexCompleted,
};
-void sub_8197080(u8 *destStr)
+void BufferPokedexRatingForMatchCall(u8 *destStr)
{
int numSeen, numCaught;
u8 *str;
@@ -1976,13 +1976,13 @@ void sub_8197080(u8 *destStr)
numSeen = GetHoennPokedexCount(FLAG_GET_SEEN);
numCaught = GetHoennPokedexCount(FLAG_GET_CAUGHT);
- ConvertIntToDecimalStringN(gStringVar1, numSeen, 0, 3);
- ConvertIntToDecimalStringN(gStringVar2, numCaught, 0, 3);
+ ConvertIntToDecimalStringN(gStringVar1, numSeen, STR_CONV_MODE_LEFT_ALIGN, 3);
+ ConvertIntToDecimalStringN(gStringVar2, numCaught, STR_CONV_MODE_LEFT_ALIGN, 3);
dexRatingLevel = GetPokedexRatingLevel(numCaught);
- str = StringCopy(buffer, gUnknown_082A5C9C);
+ str = StringCopy(buffer, gBirchDexRatingText_AreYouCurious);
str[0] = CHAR_PROMPT_CLEAR;
str++;
- str = StringCopy(str, gUnknown_082A5D2C);
+ str = StringCopy(str, gBirchDexRatingText_SoYouveSeenAndCaught);
str[0] = CHAR_PROMPT_CLEAR;
str++;
StringCopy(str, sBirchDexRatingTexts[dexRatingLevel]);
@@ -1994,9 +1994,9 @@ void sub_8197080(u8 *destStr)
str++;
numSeen = GetNationalPokedexCount(FLAG_GET_SEEN);
numCaught = GetNationalPokedexCount(FLAG_GET_CAUGHT);
- ConvertIntToDecimalStringN(gStringVar1, numSeen, 0, 3);
- ConvertIntToDecimalStringN(gStringVar2, numCaught, 0, 3);
- StringExpandPlaceholders(str, gUnknown_082A633D);
+ ConvertIntToDecimalStringN(gStringVar1, numSeen, STR_CONV_MODE_LEFT_ALIGN, 3);
+ ConvertIntToDecimalStringN(gStringVar2, numCaught, STR_CONV_MODE_LEFT_ALIGN, 3);
+ StringExpandPlaceholders(str, gBirchDexRatingText_OnANationwideBasis);
}
Free(buffer);