Changed all instances of gSpeciesNames so that it uses GetSpeciesName

This commit is contained in:
Eduardo Quezada 2023-07-07 14:37:51 -04:00
parent adfc0af372
commit 3aaa89ce71
33 changed files with 187 additions and 185 deletions

View File

@ -161,7 +161,7 @@ extern const struct CompressedSpriteSheet gMonFrontPicTableFemale[];
extern const struct Trainer gTrainers[];
extern const u8 gTrainerClassNames[][13];
extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1];
extern const u8 gSpeciesNames[NUM_SPECIES][POKEMON_NAME_LENGTH + 1];
extern const u8 gMoveNames[MOVES_COUNT][MOVE_NAME_LENGTH + 1];
extern const u8 *const gZMoveNames[];

View File

@ -523,7 +523,7 @@ u8 GetSecretBaseTrainerPicIndex(void);
u8 GetSecretBaseTrainerClass(void);
bool8 IsPlayerPartyAndPokemonStorageFull(void);
bool8 IsPokemonStorageFull(void);
void GetSpeciesName(u8 *name, u16 species);
const u8 *GetSpeciesName(u16 species);
u8 CalculatePPWithBonus(u16 move, u8 ppBonuses, u8 moveIndex);
void RemoveMonPPBonus(struct Pokemon *mon, u8 moveIndex);
void RemoveBattleMonPPBonus(struct BattlePokemon *mon, u8 moveIndex);
@ -613,5 +613,7 @@ void TryToSetBattleFormChangeMoves(struct Pokemon *mon, u16 method);
u32 GetMonFriendshipScore(struct Pokemon *pokemon);
void UpdateMonPersonality(struct BoxPokemon *boxMon, u32 personality);
u8 CalculatePartyCount(struct Pokemon *party);
u16 SanitizeSpeciesId(u16 species);
bool32 IsSpeciesEnabled(u16 species);
#endif // GUARD_POKEMON_H

View File

@ -592,7 +592,7 @@ static void CreateApprenticeMenu(u8 menu)
speciesTableId = APPRENTICE_SPECIES_ID(i);
species = gApprentices[PLAYER_APPRENTICE.id].species[speciesTableId];
strings[i] = gSpeciesNames[species];
strings[i] = GetSpeciesName(species);
}
break;
case APPRENTICE_ASK_2SPECIES:
@ -600,8 +600,8 @@ static void CreateApprenticeMenu(u8 menu)
top = 8;
if (PLAYER_APPRENTICE.questionsAnswered >= NUM_WHICH_MON_QUESTIONS)
return;
strings[1] = gSpeciesNames[gApprenticeQuestionData->altSpeciesId];
strings[0] = gSpeciesNames[gApprenticeQuestionData->speciesId];
strings[1] = GetSpeciesName(gApprenticeQuestionData->altSpeciesId);
strings[0] = GetSpeciesName(gApprenticeQuestionData->speciesId);
break;
case APPRENTICE_ASK_MOVES:
left = 17;
@ -1050,13 +1050,13 @@ static void ApprenticeBufferString(void)
switch (gSpecialVar_0x8006)
{
case APPRENTICE_BUFF_SPECIES1:
StringCopy(stringDst, gSpeciesNames[gApprenticeQuestionData->speciesId]);
StringCopy(stringDst, GetSpeciesName(gApprenticeQuestionData->speciesId));
break;
case APPRENTICE_BUFF_SPECIES2:
StringCopy(stringDst, gSpeciesNames[gApprenticeQuestionData->altSpeciesId]);
StringCopy(stringDst, GetSpeciesName(gApprenticeQuestionData->altSpeciesId));
break;
case APPRENTICE_BUFF_SPECIES3:
StringCopy(stringDst, gSpeciesNames[gApprenticeQuestionData->speciesId]);
StringCopy(stringDst, GetSpeciesName(gApprenticeQuestionData->speciesId));
break;
case APPRENTICE_BUFF_MOVE1:
StringCopy(stringDst, gMoveNames[gApprenticeQuestionData->moveId1]);
@ -1083,7 +1083,7 @@ static void ApprenticeBufferString(void)
break;
case APPRENTICE_BUFF_LEAD_MON_SPECIES:
speciesArrayId = APPRENTICE_SPECIES_ID(PLAYER_APPRENTICE.leadMonId);
StringCopy(stringDst, gSpeciesNames[gApprentices[PLAYER_APPRENTICE.id].species[speciesArrayId]]);
StringCopy(stringDst, GetSpeciesName(gApprentices[PLAYER_APPRENTICE.id].species[speciesArrayId]));
break;
}
}

View File

@ -4392,11 +4392,11 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId)
{
textPrinter.currentY = sSpeciesNameTextYCoords[i];
if (trainerId == TRAINER_PLAYER)
textPrinter.currentChar = gSpeciesNames[DOME_MONS[trainerTourneyId][i]];
textPrinter.currentChar = GetSpeciesName(DOME_MONS[trainerTourneyId][i]);
else if (trainerId == TRAINER_FRONTIER_BRAIN)
textPrinter.currentChar = gSpeciesNames[DOME_MONS[trainerTourneyId][i]];
textPrinter.currentChar = GetSpeciesName(DOME_MONS[trainerTourneyId][i]);
else
textPrinter.currentChar = gSpeciesNames[gFacilityTrainerMons[DOME_MONS[trainerTourneyId][i]].species];
textPrinter.currentChar = GetSpeciesName(gFacilityTrainerMons[DOME_MONS[trainerTourneyId][i]].species);
textPrinter.windowId = WIN_TRAINER_MON1_NAME + i + windowId;
if (i == 1)

View File

@ -1872,7 +1872,7 @@ static void Select_PrintMonSpecies(void)
FillWindowPixelBuffer(SELECT_WIN_SPECIES, PIXEL_FILL(0));
species = GetMonData(&sFactorySelectScreen->mons[monId].monData, MON_DATA_SPECIES, NULL);
StringCopy(gStringVar4, gSpeciesNames[species]);
StringCopy(gStringVar4, GetSpeciesName(species));
x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 86);
AddTextPrinterParameterized3(SELECT_WIN_SPECIES, FONT_NORMAL, x, 1, sSpeciesNameTextColors, 0, gStringVar4);
CopyWindowToVram(SELECT_WIN_SPECIES, COPYWIN_GFX);
@ -3773,7 +3773,7 @@ static void Swap_PrintMonSpecies(void)
species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, NULL);
else
species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, NULL);
StringCopy(gStringVar4, gSpeciesNames[species]);
StringCopy(gStringVar4, GetSpeciesName(species));
x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 86);
AddTextPrinterParameterized3(SWAP_WIN_SPECIES, FONT_NORMAL, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4);
CopyWindowToVram(SWAP_WIN_SPECIES, COPYWIN_FULL);
@ -3882,7 +3882,7 @@ static void Swap_PrintMonSpeciesAtFade(void)
species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, NULL);
else
species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, NULL);
StringCopy(gStringVar4, gSpeciesNames[species]);
StringCopy(gStringVar4, GetSpeciesName(species));
x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 86);
AddTextPrinterParameterized3(SWAP_WIN_SPECIES_AT_FADE, FONT_NORMAL, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4);
CopyWindowToVram(SWAP_WIN_SPECIES_AT_FADE, COPYWIN_FULL);
@ -3909,7 +3909,7 @@ static void Swap_PrintMonSpeciesForTransition(void)
species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, NULL);
else
species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, NULL);
StringCopy(gStringVar4, gSpeciesNames[species]);
StringCopy(gStringVar4, GetSpeciesName(species));
x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 86);
AddTextPrinterParameterized3(SWAP_WIN_SPECIES, FONT_NORMAL, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4);
CopyWindowToVram(SWAP_WIN_SPECIES, COPYWIN_FULL);

View File

@ -2096,7 +2096,7 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon)
gender = GetMonGender(mon);
species = GetMonData(mon, MON_DATA_SPECIES);
if ((species == SPECIES_NIDORAN_F || species == SPECIES_NIDORAN_M) && StringCompare(nickname, gSpeciesNames[species]) == 0)
if ((species == SPECIES_NIDORAN_F || species == SPECIES_NIDORAN_M) && StringCompare(nickname, GetSpeciesName(species)) == 0)
gender = 100;
// AddTextPrinterAndCreateWindowOnHealthbox's arguments are the same in all 3 cases.

View File

@ -3662,7 +3662,7 @@ void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst)
srcID += 2;
break;
case B_BUFF_SPECIES: // species name
GetSpeciesName(dst, T1_READ_16(&src[srcID + 1]));
StringCopy(dst, GetSpeciesName(T1_READ_16(&src[srcID + 1])));
srcID += 3;
break;
case B_BUFF_MON_NICK: // poke nick without prefix

View File

@ -1357,7 +1357,7 @@ void GenerateBattlePyramidWildMon(void)
id = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL) - 1;
SetMonData(&gEnemyParty[0], MON_DATA_SPECIES, &wildMons[id].species);
GetSpeciesName(name, wildMons[id].species);
StringCopy(name, GetSpeciesName(wildMons[id].species));
SetMonData(&gEnemyParty[0], MON_DATA_NICKNAME, &name);
if (lvl != FRONTIER_LVL_50)
{

View File

@ -2491,7 +2491,7 @@ static void GetPotentialPartnerMoveAndSpecies(u16 trainerId, u16 monId)
}
StringCopy(gStringVar1, gMoveNames[move]);
StringCopy(gStringVar2, gSpeciesNames[species]);
StringCopy(gStringVar2, GetSpeciesName(species));
}
// For multi battles in the Battle Tower, the player may choose a partner by talking to them

View File

@ -446,13 +446,13 @@ bool32 AreBattleTowerLinkSpeciesSame(u16 *speciesList1, u16 *speciesList2)
{
if (numSameSpecies == 0)
{
StringCopy(gStringVar1, gSpeciesNames[speciesList1[i]]);
StringCopy(gStringVar1, GetSpeciesName(speciesList1[i]));
haveSameSpecies = TRUE;
}
if (numSameSpecies == 1)
{
StringCopy(gStringVar2, gSpeciesNames[speciesList1[i]]);
StringCopy(gStringVar2, GetSpeciesName(speciesList1[i]));
haveSameSpecies = TRUE;
}

View File

@ -1,4 +1,4 @@
const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1] = {
const u8 gSpeciesNames[NUM_SPECIES][POKEMON_NAME_LENGTH + 1] = {
[SPECIES_NONE] = _("??????????"),
[SPECIES_BULBASAUR] = _("Bulbasaur"),
[SPECIES_IVYSAUR] = _("Ivysaur"),

View File

@ -2048,7 +2048,7 @@ static void DebugAction_Give_PokemonSimple(u8 taskId)
//Display initial ID
StringCopy(gStringVar2, gText_DigitIndicator[0]);
ConvertIntToDecimalStringN(gStringVar3, 1, STR_CONV_MODE_LEADING_ZEROS, 3);
StringCopy(gStringVar1, gSpeciesNames[1]);
StringCopy(gStringVar1, GetSpeciesName(1));
StringCopyPadded(gStringVar1, gStringVar1, CHAR_SPACE, 15);
StringExpandPlaceholders(gStringVar4, sDebugText_PokemonID);
AddTextPrinterParameterized(windowId, 1, gStringVar4, 1, 1, 0, NULL);
@ -2086,7 +2086,7 @@ static void DebugAction_Give_PokemonComplex(u8 taskId)
//Display initial ID
StringCopy(gStringVar2, gText_DigitIndicator[0]);
ConvertIntToDecimalStringN(gStringVar3, 1, STR_CONV_MODE_LEADING_ZEROS, 4);
StringCopy(gStringVar1, gSpeciesNames[1]);
StringCopy(gStringVar1, GetSpeciesName(1));
StringCopyPadded(gStringVar1, gStringVar1, CHAR_SPACE, 15);
StringExpandPlaceholders(gStringVar4, sDebugText_PokemonID);
AddTextPrinterParameterized(windowId, 1, gStringVar4, 1, 1, 0, NULL);
@ -2133,7 +2133,7 @@ static void DebugAction_Give_Pokemon_SelectId(u8 taskId)
}
StringCopy(gStringVar2, gText_DigitIndicator[gTasks[taskId].data[4]]);
StringCopy(gStringVar1, gSpeciesNames[gTasks[taskId].data[3]]); //CopyItemName(gTasks[taskId].data[3], gStringVar1);
StringCopy(gStringVar1, GetSpeciesName(gTasks[taskId].data[3])); //CopyItemName(gTasks[taskId].data[3], gStringVar1);
StringCopyPadded(gStringVar1, gStringVar1, CHAR_SPACE, 15);
ConvertIntToDecimalStringN(gStringVar3, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, 4);
StringExpandPlaceholders(gStringVar4, sDebugText_PokemonID);

View File

@ -5204,7 +5204,7 @@ static const u8 *GetEasyChatWord(u8 groupId, u16 index)
{
case EC_GROUP_POKEMON:
case EC_GROUP_POKEMON_NATIONAL:
return gSpeciesNames[index];
return GetSpeciesName(index);
case EC_GROUP_MOVE_1:
case EC_GROUP_MOVE_2:
return gMoveNames[index];

View File

@ -369,7 +369,7 @@ static void AddHatchedMonToParty(u8 id)
SetMonData(mon, MON_DATA_IS_EGG, &isEgg);
species = GetMonData(mon, MON_DATA_SPECIES);
GetSpeciesName(name, species);
StringCopy(name, GetSpeciesName(species));
SetMonData(mon, MON_DATA_NICKNAME, name);
species = SpeciesToNationalPokedexNum(species);

View File

@ -254,7 +254,7 @@ void EvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, bool8 canStopEvo, u
GetMonData(mon, MON_DATA_NICKNAME, name);
StringCopy_Nickname(gStringVar1, name);
StringCopy(gStringVar2, gSpeciesNames[postEvoSpecies]);
StringCopy(gStringVar2, GetSpeciesName(postEvoSpecies));
// preEvo sprite
currSpecies = GetMonData(mon, MON_DATA_SPECIES);
@ -476,7 +476,7 @@ void TradeEvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, u8 preEvoSprit
GetMonData(mon, MON_DATA_NICKNAME, name);
StringCopy_Nickname(gStringVar1, name);
StringCopy(gStringVar2, gSpeciesNames[postEvoSpecies]);
StringCopy(gStringVar2, GetSpeciesName(postEvoSpecies));
gAffineAnimsDisabled = TRUE;
@ -561,7 +561,7 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon *mon)
CopyMon(&gPlayerParty[gPlayerPartyCount], mon, sizeof(struct Pokemon));
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, &gEvolutionTable[preEvoSpecies][1].targetSpecies);
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_NICKNAME, gSpeciesNames[gEvolutionTable[preEvoSpecies][1].targetSpecies]);
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_NICKNAME, GetSpeciesName(gEvolutionTable[preEvoSpecies][1].targetSpecies));
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_HELD_ITEM, &data);
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MARKINGS, &data);
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_ENCRYPT_SEPARATOR, &data);

View File

@ -1911,7 +1911,7 @@ static u8 AppendCaughtBannedMonSpeciesName(u16 species, u8 count, s32 numBannedM
StringAppend(gStringVar1, gText_LineBreak);
break;
}
StringAppend(gStringVar1, gSpeciesNames[species]);
StringAppend(gStringVar1, GetSpeciesName(species));
}
return count;

View File

@ -1163,7 +1163,7 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u
AddTextPrinterParameterized3(0, FONT_NORMAL, width, 1, sMonInfoTextColors, TEXT_SKIP_DRAW, text);
text[0] = CHAR_SLASH;
stringPtr = StringCopy(text + 1, gSpeciesNames[currMon->species]);
stringPtr = StringCopy(text + 1, GetSpeciesName(currMon->species));
if (currMon->species != SPECIES_NIDORAN_M && currMon->species != SPECIES_NIDORAN_F)
{

View File

@ -1777,7 +1777,7 @@ static void PopulateSpeciesFromTrainerLocation(int matchCallId, u8 *destStr)
if (numSpecies)
{
StringCopy(destStr, gSpeciesNames[species[Random() % numSpecies]]);
StringCopy(destStr, GetSpeciesName(species[Random() % numSpecies]));
return;
}
}
@ -1801,19 +1801,19 @@ static void PopulateSpeciesFromTrainerParty(int matchCallId, u8 *destStr)
{
case 0:
default:
speciesName = gSpeciesNames[party.NoItemDefaultMoves[monId].species];
speciesName = GetSpeciesName(party.NoItemDefaultMoves[monId].species);
break;
case F_TRAINER_PARTY_CUSTOM_MOVESET:
speciesName = gSpeciesNames[party.NoItemCustomMoves[monId].species];
speciesName = GetSpeciesName(party.NoItemCustomMoves[monId].species);
break;
case F_TRAINER_PARTY_HELD_ITEM:
speciesName = gSpeciesNames[party.ItemDefaultMoves[monId].species];
speciesName = GetSpeciesName(party.ItemDefaultMoves[monId].species);
break;
case F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM:
speciesName = gSpeciesNames[party.ItemCustomMoves[monId].species];
speciesName = GetSpeciesName(party.ItemCustomMoves[monId].species);
break;
case F_TRAINER_PARTY_EVERYTHING_CUSTOMIZED:
speciesName = gSpeciesNames[party.EverythingCustomized[monId].species];
speciesName = GetSpeciesName(party.EverythingCustomized[monId].species);
break;
}

View File

@ -939,7 +939,7 @@ static u8 *GetConditionMenuMonString(u8 *dst, u16 boxId, u16 monId)
level = GetLevelFromBoxMonExp(boxMon);
}
if ((species == SPECIES_NIDORAN_F || species == SPECIES_NIDORAN_M) && !StringCompare(dst, gSpeciesNames[species]))
if ((species == SPECIES_NIDORAN_F || species == SPECIES_NIDORAN_M) && !StringCompare(dst, GetSpeciesName(species)))
gender = MON_GENDERLESS;
for (str = dst; *str != EOS; str++)

View File

@ -1712,7 +1712,7 @@ static void DrawMonTextEntryBox(void)
{
u8 buffer[32];
StringCopy(buffer, gSpeciesNames[sNamingScreen->monSpecies]);
StringCopy(buffer, GetSpeciesName(sNamingScreen->monSpecies));
StringAppendN(buffer, sNamingScreen->template->title, 15);
FillWindowPixelBuffer(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX], PIXEL_FILL(1));
AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX], FONT_NORMAL, buffer, 8, 1, 0, 0);

View File

@ -2333,7 +2333,7 @@ static void DisplayPartyPokemonGender(u8 gender, u16 species, u8 *nickname, stru
if (species == SPECIES_NONE)
return;
if ((species == SPECIES_NIDORAN_M || species == SPECIES_NIDORAN_F) && StringCompare(nickname, gSpeciesNames[species]) == 0)
if ((species == SPECIES_NIDORAN_M || species == SPECIES_NIDORAN_F) && StringCompare(nickname, GetSpeciesName(species)) == 0)
return;
switch (gender)
{

View File

@ -2447,7 +2447,7 @@ static u8 CreateMonName(u16 num, u8 left, u8 top)
num = NationalPokedexNumToSpecies(num);
if (num)
str = gSpeciesNames[num];
str = GetSpeciesName(num);
else
str = sText_TenDashes;
PrintMonDexNumAndName(0, FONT_NARROW, str, left, top);
@ -4112,7 +4112,7 @@ static void PrintMonInfo(u32 num, u32 value, u32 owned, u32 newEntry)
PrintInfoScreenText(str, 0x60, 0x19);
natNum = NationalPokedexNumToSpecies(num);
if (natNum)
name = gSpeciesNames[natNum];
name = GetSpeciesName(natNum);
else
name = sText_TenDashes2;
PrintInfoScreenText(name, 0x84, 0x19);
@ -4459,8 +4459,8 @@ static u8 PrintCryScreenSpeciesName(u8 windowId, u16 num, u8 left, u8 top)
switch (num)
{
default:
for (i = 0; gSpeciesNames[num][i] != EOS && i < POKEMON_NAME_LENGTH; i++)
str[i] = gSpeciesNames[num][i];
for (i = 0; GetSpeciesName(num)[i] != EOS && i < POKEMON_NAME_LENGTH; i++)
str[i] = GetSpeciesName(num)[i];
break;
case 0:
for (i = 0; i < 5; i++)
@ -4661,7 +4661,7 @@ static int DoPokedexSearch(u8 dexMode, u8 order, u8 abcGroup, u8 bodyColor, u8 t
u8 firstLetter;
species = NationalPokedexNumToSpecies(sPokedexView->pokedexList[i].dexNum);
firstLetter = gSpeciesNames[species][0];
firstLetter = GetSpeciesName(species)[0];
if (LETTER_IN_RANGE_UPPER(firstLetter, abcGroup) || LETTER_IN_RANGE_LOWER(firstLetter, abcGroup))
{
sPokedexView->pokedexList[resultsCount] = sPokedexView->pokedexList[i];

View File

@ -3504,7 +3504,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
checksum = CalculateBoxMonChecksum(boxMon);
SetBoxMonData(boxMon, MON_DATA_CHECKSUM, &checksum);
EncryptBoxMon(boxMon);
GetSpeciesName(speciesName, species);
StringCopy(speciesName, GetSpeciesName(species));
SetBoxMonData(boxMon, MON_DATA_NICKNAME, speciesName);
SetBoxMonData(boxMon, MON_DATA_LANGUAGE, &gGameLanguage);
SetBoxMonData(boxMon, MON_DATA_OT_NAME, gSaveBlock2Ptr->playerName);
@ -4509,14 +4509,14 @@ void SetMultiuseSpriteTemplateToPokemon(u16 speciesTag, u8 battlerPosition)
else if (speciesTag > SPECIES_SHINY_TAG)
{
if (gMonFrontAnimsPtrTable[speciesTag - SPECIES_SHINY_TAG] != NULL)
gMultiuseSpriteTemplate.anims = gMonFrontAnimsPtrTable[speciesTag - SPECIES_SHINY_TAG];
else
gMultiuseSpriteTemplate.anims = gMonFrontAnimsPtrTable[speciesTag - SPECIES_SHINY_TAG];
else
gMultiuseSpriteTemplate.anims = gMonFrontAnimsPtrTable[SPECIES_NONE];
}
else
{
if (gMonFrontAnimsPtrTable[speciesTag] != NULL)
gMultiuseSpriteTemplate.anims = gMonFrontAnimsPtrTable[speciesTag];
gMultiuseSpriteTemplate.anims = gMonFrontAnimsPtrTable[speciesTag];
else
gMultiuseSpriteTemplate.anims = gMonFrontAnimsPtrTable[SPECIES_NONE];
}
@ -5612,22 +5612,9 @@ bool8 IsPokemonStorageFull(void)
return TRUE;
}
void GetSpeciesName(u8 *name, u16 species)
const u8 *GetSpeciesName(u16 species)
{
s32 i;
for (i = 0; i <= POKEMON_NAME_LENGTH; i++)
{
if (species > NUM_SPECIES)
name[i] = gSpeciesNames[SPECIES_NONE][i];
else
name[i] = gSpeciesNames[species][i];
if (name[i] == EOS)
break;
}
name[i] = EOS;
return gSpeciesNames[SanitizeSpeciesId(species)];
}
u8 CalculatePPWithBonus(u16 move, u8 ppBonuses, u8 moveIndex)
@ -6918,8 +6905,8 @@ void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies)
u8 language;
GetMonData(mon, MON_DATA_NICKNAME, gStringVar1);
language = GetMonData(mon, MON_DATA_LANGUAGE, &language);
if (language == GAME_LANGUAGE && !StringCompare(gSpeciesNames[oldSpecies], gStringVar1))
SetMonData(mon, MON_DATA_NICKNAME, gSpeciesNames[newSpecies]);
if (language == GAME_LANGUAGE && !StringCompare(GetSpeciesName(oldSpecies), gStringVar1))
SetMonData(mon, MON_DATA_NICKNAME, GetSpeciesName(newSpecies));
}
// The below two functions determine which side of a multi battle the trainer battles on
@ -8551,6 +8538,19 @@ bool32 TryFormChange(u32 monId, u32 side, u16 method)
return FALSE;
}
u16 SanitizeSpeciesId(u16 species)
{
if (species > NUM_SPECIES || !IsSpeciesEnabled(species))
return SPECIES_NONE;
else
return species;
}
bool32 IsSpeciesEnabled(u16 species)
{
return gSpeciesInfo[species].baseHP > 0;
}
void TryToSetBattleFormChangeMoves(struct Pokemon *mon, u16 method)
{
int i, j;

View File

@ -493,7 +493,7 @@ static void PrintDigitChars(struct PokemonDebugMenu *data)
}
text[i++] = CHAR_SPACE;
StringCopy(&text[i], gSpeciesNames[species]);
StringCopy(&text[i], GetSpeciesName(species));
FillWindowPixelBuffer(WIN_NAME_NUMBERS, 0x11);
AddTextPrinterParameterized(WIN_NAME_NUMBERS, 1, text, 6, 0, 0, NULL);

View File

@ -148,7 +148,7 @@ static void GetMonSizeRecordInfo(u16 species, u16 *sizeRecord)
u32 size = GetMonSize(species, *sizeRecord);
FormatMonSizeRecord(gStringVar3, size);
StringCopy(gStringVar1, gSpeciesNames[species]);
StringCopy(gStringVar1, GetSpeciesName(species));
if (*sizeRecord == DEFAULT_MAX_SIZE)
StringCopy(gStringVar2, gText_Marco);
else

View File

@ -6993,7 +6993,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode)
txtPtr = sStorage->displayMonSpeciesName;
*(txtPtr)++ = CHAR_SLASH;
StringCopyPadded(txtPtr, gSpeciesNames[sStorage->displayMonSpecies], CHAR_SPACE, 5);
StringCopyPadded(txtPtr, GetSpeciesName(sStorage->displayMonSpecies), CHAR_SPACE, 5);
txtPtr = sStorage->displayMonGenderLvlText;
*(txtPtr)++ = EXT_CTRL_CODE_BEGIN;

View File

@ -2863,7 +2863,7 @@ static void PrintNotEggInfo(void)
GetMonNickname(mon, gStringVar1);
PrintTextOnWindow(PSS_LABEL_WINDOW_PORTRAIT_NICKNAME, gStringVar1, 0, 1, 0, 1);
strArray[0] = CHAR_SLASH;
StringCopy(&strArray[1], &gSpeciesNames[summary->species2][0]);
StringCopy(&strArray[1], &GetSpeciesName(summary->species2)[0]);
PrintTextOnWindow(PSS_LABEL_WINDOW_PORTRAIT_SPECIES, strArray, 0, 1, 0, 1);
PrintGenderSymbol(mon, summary->species2);
PutWindowTilemap(PSS_LABEL_WINDOW_PORTRAIT_NICKNAME);

View File

@ -365,7 +365,7 @@ static u8 *CopyConditionMonNameGender(u8 *str, u16 listId, bool8 skipPadding)
level = GetLevelFromBoxMonExp(boxMon);
}
if ((species == SPECIES_NIDORAN_F || species == SPECIES_NIDORAN_M) && !StringCompare(str, gSpeciesNames[species]))
if ((species == SPECIES_NIDORAN_F || species == SPECIES_NIDORAN_M) && !StringCompare(str, GetSpeciesName(species)))
gender = MON_GENDERLESS;
str_ = str; // For some reason, a variable is needed to match.

View File

@ -1552,7 +1552,7 @@ bool8 ScrCmd_bufferspeciesname(struct ScriptContext *ctx)
u8 stringVarIndex = ScriptReadByte(ctx);
u16 species = VarGet(ScriptReadHalfword(ctx));
StringCopy(sScriptStringVars[stringVarIndex], gSpeciesNames[species]);
StringCopy(sScriptStringVars[stringVarIndex], GetSpeciesName(species));
return FALSE;
}
@ -1563,7 +1563,7 @@ bool8 ScrCmd_bufferleadmonspeciesname(struct ScriptContext *ctx)
u8 *dest = sScriptStringVars[stringVarIndex];
u8 partyIndex = GetLeadMonIndex();
u32 species = GetMonData(&gPlayerParty[partyIndex], MON_DATA_SPECIES, NULL);
StringCopy(dest, gSpeciesNames[species]);
StringCopy(dest, GetSpeciesName(species));
return FALSE;
}

View File

@ -577,7 +577,7 @@ static void CreateStarterPokemonLabel(u8 selection)
u16 species = GetStarterPokemon(selection);
CopyMonCategoryText(SpeciesToNationalPokedexNum(species), categoryText);
speciesName = gSpeciesNames[species];
speciesName = GetSpeciesName(species);
winTemplate = sWindowTemplate_StarterLabel;
winTemplate.tilemapLeft = sStarterLabelCoords[selection][0];

View File

@ -1165,7 +1165,7 @@ static bool8 BufferTradeParties(void)
GetMonData(mon, MON_DATA_NICKNAME, name);
if (!StringCompareWithoutExtCtrlCodes(name, sText_ShedinjaJP))
SetMonData(mon, MON_DATA_NICKNAME, gSpeciesNames[SPECIES_SHEDINJA]);
SetMonData(mon, MON_DATA_NICKNAME, GetSpeciesName(SPECIES_SHEDINJA));
}
}
}
@ -4541,8 +4541,8 @@ static void SpriteCB_BouncingPokeballArrive(struct Sprite *sprite)
u16 GetInGameTradeSpeciesInfo(void)
{
const struct InGameTrade *inGameTrade = &sIngameTrades[gSpecialVar_0x8004];
StringCopy(gStringVar1, gSpeciesNames[inGameTrade->requestedSpecies]);
StringCopy(gStringVar2, gSpeciesNames[inGameTrade->species]);
StringCopy(gStringVar1, GetSpeciesName(inGameTrade->requestedSpecies));
StringCopy(gStringVar2, GetSpeciesName(inGameTrade->species));
return inGameTrade->requestedSpecies;
}
@ -4552,7 +4552,7 @@ static void BufferInGameTradeMonName(void)
const struct InGameTrade *inGameTrade = &sIngameTrades[gSpecialVar_0x8004];
GetMonData(&gPlayerParty[gSpecialVar_0x8005], MON_DATA_NICKNAME, nickname);
StringCopy_Nickname(gStringVar1, nickname);
StringCopy(gStringVar2, gSpeciesNames[inGameTrade->species]);
StringCopy(gStringVar2, GetSpeciesName(inGameTrade->species));
}
static void CreateInGameTradePokemonInternal(u8 whichPlayerMon, u8 whichInGameTrade)

202
src/tv.c
View File

@ -1116,7 +1116,7 @@ void TryPutPokemonTodayOnAir(void)
else
{
InitWorldOfMastersShowAttempt();
if (!rbernoulli(1, 1) && StringCompare(gSpeciesNames[gBattleResults.caughtMonSpecies], gBattleResults.caughtMonNick))
if (!rbernoulli(1, 1) && StringCompare(GetSpeciesName(gBattleResults.caughtMonSpecies), gBattleResults.caughtMonNick))
{
sCurTVShowSlot = FindFirstEmptyRecordMixTVShowSlot(gSaveBlock1Ptr->tvShows);
if (sCurTVShowSlot != -1 && IsRecordMixShowAlreadySpawned(TVSHOW_POKEMON_TODAY_CAUGHT, FALSE) != TRUE)
@ -2914,7 +2914,7 @@ static void InterviewBefore_FanClubLetter(void)
TryReplaceOldTVShowOfKind(TVSHOW_FAN_CLUB_LETTER);
if (!gSpecialVar_Result)
{
StringCopy(gStringVar1, gSpeciesNames[GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_SPECIES, NULL)]);
StringCopy(gStringVar1, GetSpeciesName(GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_SPECIES, NULL)));
InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubLetter.words,
ARRAY_COUNT(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubLetter.words));
}
@ -2935,7 +2935,7 @@ static void InterviewBefore_PkmnFanClubOpinions(void)
TryReplaceOldTVShowOfKind(TVSHOW_PKMN_FAN_CLUB_OPINIONS);
if (!gSpecialVar_Result)
{
StringCopy(gStringVar1, gSpeciesNames[GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_SPECIES, NULL)]);
StringCopy(gStringVar1, GetSpeciesName(GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_SPECIES, NULL)));
GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_NICKNAME, gStringVar2);
StringGet_Nickname(gStringVar2);
InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubOpinions.words,
@ -2995,7 +2995,7 @@ static bool8 IsPartyMonNicknamedOrNotEnglish(u8 monIdx)
pokemon = &gPlayerParty[monIdx];
GetMonData(pokemon, MON_DATA_NICKNAME, gStringVar1);
language = GetMonData(pokemon, MON_DATA_LANGUAGE, &language);
if (language == GAME_LANGUAGE && !StringCompare(gSpeciesNames[GetMonData(pokemon, MON_DATA_SPECIES, NULL)], gStringVar1))
if (language == GAME_LANGUAGE && !StringCompare(GetSpeciesName(GetMonData(pokemon, MON_DATA_SPECIES, NULL)), gStringVar1))
return FALSE;
return TRUE;
@ -3059,7 +3059,7 @@ static void CompactTVShowArray(TVShow *shows)
static u16 GetRandomDifferentSpeciesAndNameSeenByPlayer(u8 varIdx, u16 excludedSpecies)
{
u16 species = GetRandomDifferentSpeciesSeenByPlayer(excludedSpecies);
StringCopy(gTVStringVarPtrs[varIdx], gSpeciesNames[species]);
StringCopy(gTVStringVarPtrs[varIdx], GetSpeciesName(species));
return species;
}
@ -3221,24 +3221,24 @@ static void GetNicknameSubstring(u8 varIdx, u8 whichPosition, u8 charParam, u16
}
else
{
strlen = StringLength(gSpeciesNames[species]);
strlen = StringLength(GetSpeciesName(species));
if (charParam == 0)
{
buff[0] = gSpeciesNames[species][whichPosition];
buff[0] = GetSpeciesName(species)[whichPosition];
}
else if (charParam == 1)
{
buff[0] = gSpeciesNames[species][strlen - whichPosition];
buff[0] = GetSpeciesName(species)[strlen - whichPosition];
}
else if (charParam == 2)
{
buff[0] = gSpeciesNames[species][whichPosition];
buff[1] = gSpeciesNames[species][whichPosition + 1];
buff[0] = GetSpeciesName(species)[whichPosition];
buff[1] = GetSpeciesName(species)[whichPosition + 1];
}
else
{
buff[0] = gSpeciesNames[species][strlen - (whichPosition + 2)];
buff[1] = gSpeciesNames[species][strlen - (whichPosition + 1)];
buff[0] = GetSpeciesName(species)[strlen - (whichPosition + 2)];
buff[1] = GetSpeciesName(species)[strlen - (whichPosition + 1)];
}
}
StringCopy(gTVStringVarPtrs[varIdx], buff);
@ -4291,13 +4291,13 @@ static void DoTVShowBravoTrainerPokemonProfile(void)
TVShowConvertInternationalString(gStringVar1, show->bravoTrainer.playerName, show->bravoTrainer.language);
CopyContestCategoryToStringVar(1, show->bravoTrainer.contestCategory);
CopyContestRankToStringVar(2, show->bravoTrainer.contestRank);
if (!StringCompare(gSpeciesNames[show->bravoTrainer.species], show->bravoTrainer.pokemonNickname))
if (!StringCompare(GetSpeciesName(show->bravoTrainer.species), show->bravoTrainer.pokemonNickname))
sTVShowState = 8;
else
sTVShowState = 1;
break;
case 1:
StringCopy(gStringVar1, gSpeciesNames[show->bravoTrainer.species]);
StringCopy(gStringVar1, GetSpeciesName(show->bravoTrainer.species));
TVShowConvertInternationalString(gStringVar2, show->bravoTrainer.pokemonNickname, show->bravoTrainer.pokemonNameLanguage);
CopyContestCategoryToStringVar(2, show->bravoTrainer.contestCategory);
sTVShowState = 2;
@ -4331,18 +4331,18 @@ static void DoTVShowBravoTrainerPokemonProfile(void)
sTVShowState = 7;
break;
case 6:
StringCopy(gStringVar1, gSpeciesNames[show->bravoTrainer.species]);
StringCopy(gStringVar1, GetSpeciesName(show->bravoTrainer.species));
StringCopy(gStringVar2, gMoveNames[show->bravoTrainer.move]);
CopyEasyChatWord(gStringVar3, show->bravoTrainer.words[1]);
sTVShowState = 7;
break;
case 7:
TVShowConvertInternationalString(gStringVar1, show->bravoTrainer.playerName, show->bravoTrainer.language);
StringCopy(gStringVar2, gSpeciesNames[show->bravoTrainer.species]);
StringCopy(gStringVar2, GetSpeciesName(show->bravoTrainer.species));
TVShowDone();
break;
case 8:
StringCopy(gStringVar1, gSpeciesNames[show->bravoTrainer.species]);
StringCopy(gStringVar1, GetSpeciesName(show->bravoTrainer.species));
sTVShowState = 2;
break;
}
@ -4364,7 +4364,7 @@ static void DoTVShowBravoTrainerBattleTower(void)
{
case BRAVOTOWER_STATE_INTRO:
TVShowConvertInternationalString(gStringVar1, show->bravoTrainerTower.trainerName, show->bravoTrainerTower.language);
StringCopy(gStringVar2, gSpeciesNames[show->bravoTrainerTower.species]);
StringCopy(gStringVar2, GetSpeciesName(show->bravoTrainerTower.species));
if (show->bravoTrainerTower.numFights >= FRONTIER_STAGES_PER_CHALLENGE)
sTVShowState = BRAVOTOWER_STATE_NEW_RECORD;
else
@ -4393,7 +4393,7 @@ static void DoTVShowBravoTrainerBattleTower(void)
break;
case BRAVOTOWER_STATE_WON:
TVShowConvertInternationalString(gStringVar1, show->bravoTrainerTower.pokemonName, show->bravoTrainerTower.pokemonNameLanguage);
StringCopy(gStringVar2, gSpeciesNames[show->bravoTrainerTower.defeatedSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->bravoTrainerTower.defeatedSpecies));
if (show->bravoTrainerTower.interviewResponse == 0)
sTVShowState = BRAVOTOWER_STATE_SATISFIED;
else
@ -4401,7 +4401,7 @@ static void DoTVShowBravoTrainerBattleTower(void)
break;
case BRAVOTOWER_STATE_LOST_FINAL:
TVShowConvertInternationalString(gStringVar1, show->bravoTrainerTower.pokemonName, show->bravoTrainerTower.pokemonNameLanguage);
StringCopy(gStringVar2, gSpeciesNames[show->bravoTrainerTower.defeatedSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->bravoTrainerTower.defeatedSpecies));
if (show->bravoTrainerTower.interviewResponse == 0)
sTVShowState = BRAVOTOWER_STATE_SATISFIED;
else
@ -4440,7 +4440,7 @@ static void DoTVShowBravoTrainerBattleTower(void)
break;
case BRAVOTOWER_STATE_OUTRO:
TVShowConvertInternationalString(gStringVar1, show->bravoTrainerTower.trainerName, show->bravoTrainerTower.language);
StringCopy(gStringVar2, gSpeciesNames[show->bravoTrainerTower.species]);
StringCopy(gStringVar2, GetSpeciesName(show->bravoTrainerTower.species));
TVShowDone();
break;
}
@ -4555,7 +4555,7 @@ static void DoTVShowTheNameRaterShow(void)
{
case 0:
TVShowConvertInternationalString(gStringVar1, show->nameRaterShow.trainerName, show->nameRaterShow.language);
StringCopy(gStringVar2, gSpeciesNames[show->nameRaterShow.species]);
StringCopy(gStringVar2, GetSpeciesName(show->nameRaterShow.species));
TVShowConvertInternationalString(gStringVar3, show->nameRaterShow.pokemonName, show->nameRaterShow.pokemonNameLanguage);
sTVShowState = GetRandomNameRaterStateFromName(show) + 1;
break;
@ -4603,7 +4603,7 @@ static void DoTVShowTheNameRaterShow(void)
break;
case 15:
GetNicknameSubstring(0, 0, 2, 1, 0, show);
StringCopy(gStringVar2, gSpeciesNames[show->nameRaterShow.species]);
StringCopy(gStringVar2, GetSpeciesName(show->nameRaterShow.species));
GetNicknameSubstring(2, 0, 3, 2, show->nameRaterShow.species, show);
sTVShowState = 16;
break;
@ -4614,7 +4614,7 @@ static void DoTVShowTheNameRaterShow(void)
break;
case 17:
GetNicknameSubstring(0, 0, 2, 1, 0, show);
StringCopy(gStringVar2, gSpeciesNames[show->nameRaterShow.randomSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->nameRaterShow.randomSpecies));
GetNicknameSubstring(2, 0, 3, 2, show->nameRaterShow.randomSpecies, show);
sTVShowState = 18;
break;
@ -4641,7 +4641,7 @@ static void DoTVShowPokemonTodaySuccessfulCapture(void)
{
case 0:
TVShowConvertInternationalString(gStringVar1, show->pokemonToday.playerName, show->pokemonToday.language);
StringCopy(gStringVar2, gSpeciesNames[show->pokemonToday.species]);
StringCopy(gStringVar2, GetSpeciesName(show->pokemonToday.species));
TVShowConvertInternationalString(gStringVar3, show->pokemonToday.nickname, show->pokemonToday.language2);
if (show->pokemonToday.ball == ITEM_MASTER_BALL)
sTVShowState = 5;
@ -4661,7 +4661,7 @@ static void DoTVShowPokemonTodaySuccessfulCapture(void)
break;
case 3:
TVShowConvertInternationalString(gStringVar1, show->pokemonToday.playerName, show->pokemonToday.language);
StringCopy(gStringVar2, gSpeciesNames[show->pokemonToday.species]);
StringCopy(gStringVar2, GetSpeciesName(show->pokemonToday.species));
TVShowConvertInternationalString(gStringVar3, show->pokemonToday.nickname, show->pokemonToday.language2);
sTVShowState = 6;
break;
@ -4670,25 +4670,25 @@ static void DoTVShowPokemonTodaySuccessfulCapture(void)
break;
case 5:
TVShowConvertInternationalString(gStringVar1, show->pokemonToday.playerName, show->pokemonToday.language);
StringCopy(gStringVar2, gSpeciesNames[show->pokemonToday.species]);
StringCopy(gStringVar2, GetSpeciesName(show->pokemonToday.species));
sTVShowState = 6;
break;
case 6:
TVShowConvertInternationalString(gStringVar1, show->pokemonToday.playerName, show->pokemonToday.language);
StringCopy(gStringVar2, gSpeciesNames[show->pokemonToday.species]);
StringCopy(gStringVar2, GetSpeciesName(show->pokemonToday.species));
TVShowConvertInternationalString(gStringVar3, show->pokemonToday.nickname, show->pokemonToday.language2);
sTVShowState += 1 + (Random() % 4);
break;
case 7:
case 8:
StringCopy(gStringVar1, gSpeciesNames[show->pokemonToday.species]);
StringCopy(gStringVar1, GetSpeciesName(show->pokemonToday.species));
TVShowConvertInternationalString(gStringVar2, show->pokemonToday.nickname, show->pokemonToday.language2);
GetRandomDifferentSpeciesAndNameSeenByPlayer(2, show->pokemonToday.species);
sTVShowState = 11;
break;
case 9:
case 10:
StringCopy(gStringVar1, gSpeciesNames[show->pokemonToday.species]);
StringCopy(gStringVar1, GetSpeciesName(show->pokemonToday.species));
TVShowConvertInternationalString(gStringVar2, show->pokemonToday.nickname, show->pokemonToday.language2);
sTVShowState = 11;
break;
@ -4711,13 +4711,13 @@ static void DoTVShowPokemonTodayFailedCapture(void)
{
case 0:
TVShowConvertInternationalString(gStringVar1, show->pokemonTodayFailed.playerName, show->pokemonTodayFailed.language);
StringCopy(gStringVar2, gSpeciesNames[show->pokemonTodayFailed.species]);
StringCopy(gStringVar2, GetSpeciesName(show->pokemonTodayFailed.species));
sTVShowState = 1;
break;
case 1:
TVShowConvertInternationalString(gStringVar1, show->pokemonTodayFailed.playerName, show->pokemonTodayFailed.language);
GetMapName(gStringVar2, show->pokemonTodayFailed.location, 0);
StringCopy(gStringVar3, gSpeciesNames[show->pokemonTodayFailed.species2]);
StringCopy(gStringVar3, GetSpeciesName(show->pokemonTodayFailed.species2));
if (show->pokemonTodayFailed.outcome == 1)
sTVShowState = 3;
else
@ -4757,7 +4757,7 @@ static void DoTVShowPokemonFanClubLetter(void)
{
case 0:
TVShowConvertInternationalString(gStringVar1, show->fanclubLetter.playerName, show->fanclubLetter.language);
StringCopy(gStringVar2, gSpeciesNames[show->fanclubLetter.species]);
StringCopy(gStringVar2, GetSpeciesName(show->fanclubLetter.species));
sTVShowState = 50;
break;
case 1:
@ -4845,7 +4845,7 @@ static void DoTVShowPokemonFanClubOpinions(void)
{
case 0:
TVShowConvertInternationalString(gStringVar1, show->fanclubOpinions.playerName, show->fanclubOpinions.language);
StringCopy(gStringVar2, gSpeciesNames[show->fanclubOpinions.species]);
StringCopy(gStringVar2, GetSpeciesName(show->fanclubOpinions.species));
TVShowConvertInternationalString(gStringVar3, show->fanclubOpinions.nickname, show->fanclubOpinions.pokemonNameLanguage);
sTVShowState = show->fanclubOpinions.questionAsked + 1;
break;
@ -4853,7 +4853,7 @@ static void DoTVShowPokemonFanClubOpinions(void)
case 2:
case 3:
TVShowConvertInternationalString(gStringVar1, show->fanclubOpinions.playerName, show->fanclubOpinions.language);
StringCopy(gStringVar2, gSpeciesNames[show->fanclubOpinions.species]);
StringCopy(gStringVar2, GetSpeciesName(show->fanclubOpinions.species));
CopyEasyChatWord(gStringVar3, show->fanclubOpinions.words[0]);
sTVShowState = 4;
break;
@ -4877,7 +4877,7 @@ static void DoTVShowPokemonNewsMassOutbreak(void)
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
GetMapName(gStringVar1, show->massOutbreak.locationMapNum, 0);
StringCopy(gStringVar2, gSpeciesNames[show->massOutbreak.species]);
StringCopy(gStringVar2, GetSpeciesName(show->massOutbreak.species));
TVShowDone();
StartMassOutbreak();
ShowFieldMessage(sTVMassOutbreakTextGroup[sTVShowState]);
@ -4901,7 +4901,7 @@ static void DoTVShowPokemonContestLiveUpdates(void)
{
case CONTESTLIVE_STATE_INTRO:
BufferContestName(gStringVar1, show->contestLiveUpdates.category);
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
TVShowConvertInternationalString(gStringVar3, show->contestLiveUpdates.winningTrainerName, show->contestLiveUpdates.winningTrainerLanguage);
if (show->contestLiveUpdates.round1Placing == show->contestLiveUpdates.round2Placing)
{
@ -4920,7 +4920,7 @@ static void DoTVShowPokemonContestLiveUpdates(void)
}
break;
case CONTESTLIVE_STATE_WON_BOTH_ROUNDS:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
switch (show->contestLiveUpdates.winnerAppealFlag)
{
case CONTESTLIVE_FLAG_EXCITING_APPEAL:
@ -4950,7 +4950,7 @@ static void DoTVShowPokemonContestLiveUpdates(void)
}
break;
case CONTESTLIVE_STATE_BETTER_ROUND2:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
switch (show->contestLiveUpdates.winnerAppealFlag)
{
case CONTESTLIVE_FLAG_EXCITING_APPEAL:
@ -4980,7 +4980,7 @@ static void DoTVShowPokemonContestLiveUpdates(void)
}
break;
case CONTESTLIVE_STATE_EQUAL_ROUNDS:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
TVShowConvertInternationalString(gStringVar3, show->contestLiveUpdates.winningTrainerName, show->contestLiveUpdates.winningTrainerLanguage);
switch (show->contestLiveUpdates.winnerAppealFlag)
{
@ -5029,7 +5029,7 @@ static void DoTVShowPokemonContestLiveUpdates(void)
StringCopy(gStringVar1, gText_Tough);
break;
}
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
switch (show->contestLiveUpdates.winnerAppealFlag)
{
case CONTESTLIVE_FLAG_EXCITING_APPEAL:
@ -5059,19 +5059,19 @@ static void DoTVShowPokemonContestLiveUpdates(void)
}
break;
case CONTESTLIVE_STATE_GOT_NERVOUS:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
sTVShowState = CONTESTLIVE_STATE_TALK_ABOUT_LOSER;
break;
case CONTESTLIVE_STATE_STARTLED_OTHER:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
sTVShowState = CONTESTLIVE_STATE_TALK_ABOUT_LOSER;
break;
case CONTESTLIVE_STATE_USED_COMBO:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
sTVShowState = CONTESTLIVE_STATE_TALK_ABOUT_LOSER;
break;
case CONTESTLIVE_STATE_EXCITING_APPEAL:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
switch (show->contestLiveUpdates.category)
{
case CONTEST_CATEGORY_COOL:
@ -5092,27 +5092,27 @@ static void DoTVShowPokemonContestLiveUpdates(void)
}
break;
case CONTESTLIVE_STATE_COOL:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
sTVShowState = CONTESTLIVE_STATE_TALK_ABOUT_LOSER;
break;
case CONTESTLIVE_STATE_BEAUTIFUL:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
sTVShowState = CONTESTLIVE_STATE_TALK_ABOUT_LOSER;
break;
case CONTESTLIVE_STATE_CUTE:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
sTVShowState = CONTESTLIVE_STATE_TALK_ABOUT_LOSER;
break;
case CONTESTLIVE_STATE_SMART:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
sTVShowState = CONTESTLIVE_STATE_TALK_ABOUT_LOSER;
break;
case CONTESTLIVE_STATE_TOUGH:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
sTVShowState = CONTESTLIVE_STATE_TALK_ABOUT_LOSER;
break;
case CONTESTLIVE_STATE_VERY_EXCITING_APPEAL:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
switch (show->contestLiveUpdates.category)
{
case CONTEST_CATEGORY_COOL:
@ -5133,42 +5133,42 @@ static void DoTVShowPokemonContestLiveUpdates(void)
}
break;
case CONTESTLIVE_STATE_VERY_COOL:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
sTVShowState = CONTESTLIVE_STATE_TALK_ABOUT_LOSER;
break;
case CONTESTLIVE_STATE_VERY_BEAUTIFUL:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
sTVShowState = CONTESTLIVE_STATE_TALK_ABOUT_LOSER;
break;
case CONTESTLIVE_STATE_VERY_CUTE:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
sTVShowState = CONTESTLIVE_STATE_TALK_ABOUT_LOSER;
break;
case CONTESTLIVE_STATE_VERY_SMART:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
sTVShowState = CONTESTLIVE_STATE_TALK_ABOUT_LOSER;
break;
case CONTESTLIVE_STATE_VERY_TOUGH:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
sTVShowState = CONTESTLIVE_STATE_TALK_ABOUT_LOSER;
break;
case CONTESTLIVE_STATE_TOOK_BREAK:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
sTVShowState = CONTESTLIVE_STATE_TALK_ABOUT_LOSER;
break;
case CONTESTLIVE_STATE_GOT_STARTLED:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
sTVShowState = CONTESTLIVE_STATE_TALK_ABOUT_LOSER;
break;
case CONTESTLIVE_STATE_USED_MOVE:
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
StringCopy(gStringVar3, gMoveNames[show->contestLiveUpdates.move]);
sTVShowState = CONTESTLIVE_STATE_TALK_ABOUT_LOSER;
break;
case CONTESTLIVE_STATE_TALK_ABOUT_LOSER:
StringCopy(gStringVar1, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar1, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
TVShowConvertInternationalString(gStringVar2, show->contestLiveUpdates.losingTrainerName, show->contestLiveUpdates.losingTrainerLanguage);
StringCopy(gStringVar3, gSpeciesNames[show->contestLiveUpdates.losingSpecies]);
StringCopy(gStringVar3, GetSpeciesName(show->contestLiveUpdates.losingSpecies));
switch (show->contestLiveUpdates.loserAppealFlag)
{
case CONTESTLIVE_FLAG_LOST:
@ -5198,12 +5198,12 @@ static void DoTVShowPokemonContestLiveUpdates(void)
}
break;
case CONTESTLIVE_STATE_NO_APPEALS:
StringCopy(gStringVar1, gSpeciesNames[show->contestLiveUpdates.losingSpecies]);
StringCopy(gStringVar1, GetSpeciesName(show->contestLiveUpdates.losingSpecies));
sTVShowState = CONTESTLIVE_STATE_OUTRO;
break;
case CONTESTLIVE_STATE_LAST_BOTH:
TVShowConvertInternationalString(gStringVar1, show->contestLiveUpdates.losingTrainerName, show->contestLiveUpdates.losingTrainerLanguage);
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.losingSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.losingSpecies));
sTVShowState = CONTESTLIVE_STATE_OUTRO;
break;
case CONTESTLIVE_STATE_NO_EXCITING_APPEALS:
@ -5211,7 +5211,7 @@ static void DoTVShowPokemonContestLiveUpdates(void)
break;
case CONTESTLIVE_STATE_LOST_SMALL_MARGIN:
TVShowConvertInternationalString(gStringVar1, show->contestLiveUpdates.winningTrainerName, show->contestLiveUpdates.winningTrainerLanguage);
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
TVShowConvertInternationalString(gStringVar3, show->contestLiveUpdates.losingTrainerName, show->contestLiveUpdates.losingTrainerLanguage);
sTVShowState = CONTESTLIVE_STATE_OUTRO;
break;
@ -5224,7 +5224,7 @@ static void DoTVShowPokemonContestLiveUpdates(void)
break;
case CONTESTLIVE_STATE_OUTRO:
TVShowConvertInternationalString(gStringVar1, show->contestLiveUpdates.winningTrainerName, show->contestLiveUpdates.winningTrainerLanguage);
StringCopy(gStringVar2, gSpeciesNames[show->contestLiveUpdates.winningSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->contestLiveUpdates.winningSpecies));
TVShowDone();
break;
}
@ -5268,13 +5268,13 @@ static void DoTVShowPokemonBattleUpdate(void)
break;
case 2:
TVShowConvertInternationalString(gStringVar1, show->battleUpdate.playerName, show->battleUpdate.language);
StringCopy(gStringVar2, gSpeciesNames[show->battleUpdate.speciesPlayer]);
StringCopy(gStringVar2, GetSpeciesName(show->battleUpdate.speciesPlayer));
StringCopy(gStringVar3, gMoveNames[show->battleUpdate.move]);
sTVShowState = 3;
break;
case 3:
TVShowConvertInternationalString(gStringVar1, show->battleUpdate.linkOpponentName, show->battleUpdate.linkOpponentLanguage);
StringCopy(gStringVar2, gSpeciesNames[show->battleUpdate.speciesOpponent]);
StringCopy(gStringVar2, GetSpeciesName(show->battleUpdate.speciesOpponent));
sTVShowState = 4;
break;
case 4:
@ -5289,14 +5289,14 @@ static void DoTVShowPokemonBattleUpdate(void)
break;
case 6:
TVShowConvertInternationalString(gStringVar1, show->battleUpdate.playerName, show->battleUpdate.language);
StringCopy(gStringVar2, gSpeciesNames[show->battleUpdate.speciesPlayer]);
StringCopy(gStringVar2, GetSpeciesName(show->battleUpdate.speciesPlayer));
StringCopy(gStringVar3, gMoveNames[show->battleUpdate.move]);
sTVShowState = 7;
break;
case 7:
TVShowConvertInternationalString(gStringVar1, show->battleUpdate.playerName, show->battleUpdate.language);
TVShowConvertInternationalString(gStringVar2, show->battleUpdate.linkOpponentName, show->battleUpdate.linkOpponentLanguage);
StringCopy(gStringVar3, gSpeciesNames[show->battleUpdate.speciesOpponent]);
StringCopy(gStringVar3, GetSpeciesName(show->battleUpdate.speciesOpponent));
TVShowDone();
break;
}
@ -5430,9 +5430,9 @@ void DoTVShowInSearchOfTrainers(void)
sTVShowState = 3;
break;
case 3:
StringCopy(gStringVar1, gSpeciesNames[gSaveBlock1Ptr->gabbyAndTyData.mon1]);
StringCopy(gStringVar1, GetSpeciesName(gSaveBlock1Ptr->gabbyAndTyData.mon1));
StringCopy(gStringVar2, gMoveNames[gSaveBlock1Ptr->gabbyAndTyData.lastMove]);
StringCopy(gStringVar3, gSpeciesNames[gSaveBlock1Ptr->gabbyAndTyData.mon2]);
StringCopy(gStringVar3, GetSpeciesName(gSaveBlock1Ptr->gabbyAndTyData.mon2));
sTVShowState = 8;
break;
case 4:
@ -5443,8 +5443,8 @@ void DoTVShowInSearchOfTrainers(void)
break;
case 8:
CopyEasyChatWord(gStringVar1, gSaveBlock1Ptr->gabbyAndTyData.quote[0]);
StringCopy(gStringVar2, gSpeciesNames[gSaveBlock1Ptr->gabbyAndTyData.mon1]);
StringCopy(gStringVar3, gSpeciesNames[gSaveBlock1Ptr->gabbyAndTyData.mon2]);
StringCopy(gStringVar2, GetSpeciesName(gSaveBlock1Ptr->gabbyAndTyData.mon1));
StringCopy(gStringVar3, GetSpeciesName(gSaveBlock1Ptr->gabbyAndTyData.mon2));
gSpecialVar_Result = TRUE;
sTVShowState = 0;
TakeGabbyAndTyOffTheAir();
@ -5469,13 +5469,13 @@ static void DoTVShowPokemonAngler(void)
{
case 0:
TVShowConvertInternationalString(gStringVar1, show->pokemonAngler.playerName, show->pokemonAngler.language);
StringCopy(gStringVar2, gSpeciesNames[show->pokemonAngler.species]);
StringCopy(gStringVar2, GetSpeciesName(show->pokemonAngler.species));
ConvertIntToDecimalString(2, show->pokemonAngler.nFails);
TVShowDone();
break;
case 1:
TVShowConvertInternationalString(gStringVar1, show->pokemonAngler.playerName, show->pokemonAngler.language);
StringCopy(gStringVar2, gSpeciesNames[show->pokemonAngler.species]);
StringCopy(gStringVar2, GetSpeciesName(show->pokemonAngler.species));
ConvertIntToDecimalString(2, show->pokemonAngler.nBites);
TVShowDone();
break;
@ -5500,13 +5500,13 @@ static void DoTVShowTheWorldOfMasters(void)
sTVShowState = 1;
break;
case 1:
StringCopy(gStringVar1, gSpeciesNames[show->worldOfMasters.species]);
StringCopy(gStringVar1, GetSpeciesName(show->worldOfMasters.species));
sTVShowState = 2;
break;
case 2:
TVShowConvertInternationalString(gStringVar1, show->worldOfMasters.playerName, show->worldOfMasters.language);
GetMapName(gStringVar2, show->worldOfMasters.location, 0);
StringCopy(gStringVar3, gSpeciesNames[show->worldOfMasters.caughtPoke]);
StringCopy(gStringVar3, GetSpeciesName(show->worldOfMasters.caughtPoke));
TVShowDone();
break;
}
@ -5814,14 +5814,14 @@ static void DoTVShowBreakingNewsTV(void)
break;
case 1:
TVShowConvertInternationalString(gStringVar1, show->breakingNews.playerName, show->breakingNews.language);
StringCopy(gStringVar2, gSpeciesNames[show->breakingNews.lastOpponentSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->breakingNews.lastOpponentSpecies));
GetMapName(gStringVar3, show->breakingNews.location, 0);
sTVShowState = 2;
break;
case 2:
TVShowConvertInternationalString(gStringVar1, show->breakingNews.playerName, show->breakingNews.language);
StringCopy(gStringVar2, gSpeciesNames[show->breakingNews.lastOpponentSpecies]);
StringCopy(gStringVar3, gSpeciesNames[show->breakingNews.poke1Species]);
StringCopy(gStringVar2, GetSpeciesName(show->breakingNews.lastOpponentSpecies));
StringCopy(gStringVar3, GetSpeciesName(show->breakingNews.poke1Species));
sTVShowState = 3;
break;
case 3:
@ -5836,14 +5836,14 @@ static void DoTVShowBreakingNewsTV(void)
break;
case 5:
TVShowConvertInternationalString(gStringVar1, show->breakingNews.playerName, show->breakingNews.language);
StringCopy(gStringVar2, gSpeciesNames[show->breakingNews.lastOpponentSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->breakingNews.lastOpponentSpecies));
GetMapName(gStringVar3, show->breakingNews.location, 0);
sTVShowState = 6;
break;
case 6:
TVShowConvertInternationalString(gStringVar1, show->breakingNews.playerName, show->breakingNews.language);
StringCopy(gStringVar2, gSpeciesNames[show->breakingNews.lastOpponentSpecies]);
StringCopy(gStringVar3, gSpeciesNames[show->breakingNews.poke1Species]);
StringCopy(gStringVar2, GetSpeciesName(show->breakingNews.lastOpponentSpecies));
StringCopy(gStringVar3, GetSpeciesName(show->breakingNews.poke1Species));
switch (show->breakingNews.outcome)
{
case 1:
@ -5862,13 +5862,13 @@ static void DoTVShowBreakingNewsTV(void)
break;
case 7:
StringCopy(gStringVar1, gMoveNames[show->breakingNews.lastUsedMove]);
StringCopy(gStringVar2, gSpeciesNames[show->breakingNews.poke1Species]);
StringCopy(gStringVar2, GetSpeciesName(show->breakingNews.poke1Species));
sTVShowState = 8;
break;
case 12:
TVShowConvertInternationalString(gStringVar1, show->breakingNews.playerName, show->breakingNews.language);
StringCopy(gStringVar2, gSpeciesNames[show->breakingNews.lastOpponentSpecies]);
StringCopy(gStringVar3, gSpeciesNames[show->breakingNews.poke1Species]);
StringCopy(gStringVar2, GetSpeciesName(show->breakingNews.lastOpponentSpecies));
StringCopy(gStringVar3, GetSpeciesName(show->breakingNews.poke1Species));
sTVShowState = 8;
break;
case 8:
@ -5879,7 +5879,7 @@ static void DoTVShowBreakingNewsTV(void)
case 9:
case 10:
TVShowConvertInternationalString(gStringVar1, show->breakingNews.playerName, show->breakingNews.language);
StringCopy(gStringVar2, gSpeciesNames[show->breakingNews.lastOpponentSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->breakingNews.lastOpponentSpecies));
GetMapName(gStringVar3, show->breakingNews.location, 0);
sTVShowState = 11;
break;
@ -5960,7 +5960,7 @@ static void DoTVShowSecretBaseVisit(void)
case 11:
case 12:
TVShowConvertInternationalString(gStringVar1, show->secretBaseVisit.playerName, show->secretBaseVisit.language);
StringCopy(gStringVar2, gSpeciesNames[show->secretBaseVisit.species]);
StringCopy(gStringVar2, GetSpeciesName(show->secretBaseVisit.species));
StringCopy(gStringVar3, gMoveNames[show->secretBaseVisit.move]);
sTVShowState = 13;
break;
@ -6005,18 +6005,18 @@ static void DoTVShowThePokemonBattleSeminar(void)
{
case 0:
TVShowConvertInternationalString(gStringVar1, show->battleSeminar.playerName, show->battleSeminar.language);
StringCopy(gStringVar2, gSpeciesNames[show->battleSeminar.species]);
StringCopy(gStringVar3, gSpeciesNames[show->battleSeminar.foeSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->battleSeminar.species));
StringCopy(gStringVar3, GetSpeciesName(show->battleSeminar.foeSpecies));
sTVShowState = 1;
break;
case 1:
TVShowConvertInternationalString(gStringVar1, show->battleSeminar.playerName, show->battleSeminar.language);
StringCopy(gStringVar2, gSpeciesNames[show->battleSeminar.foeSpecies]);
StringCopy(gStringVar2, GetSpeciesName(show->battleSeminar.foeSpecies));
StringCopy(gStringVar3, gMoveNames[show->battleSeminar.move]);
sTVShowState = 2;
break;
case 2:
StringCopy(gStringVar1, gSpeciesNames[show->battleSeminar.species]);
StringCopy(gStringVar1, GetSpeciesName(show->battleSeminar.species));
switch (show->battleSeminar.nOtherMoves)
{
case 1:
@ -6428,24 +6428,24 @@ static void DoTVShowPokemonNewsBattleFrontier(void)
sTVShowState = 14;
break;
case 14:
StringCopy(gStringVar1, gSpeciesNames[show->frontier.species1]);
StringCopy(gStringVar2, gSpeciesNames[show->frontier.species2]);
StringCopy(gStringVar3, gSpeciesNames[show->frontier.species3]);
StringCopy(gStringVar1, GetSpeciesName(show->frontier.species1));
StringCopy(gStringVar2, GetSpeciesName(show->frontier.species2));
StringCopy(gStringVar3, GetSpeciesName(show->frontier.species3));
sTVShowState = 18;
break;
case 15:
StringCopy(gStringVar1, gSpeciesNames[show->frontier.species1]);
StringCopy(gStringVar2, gSpeciesNames[show->frontier.species2]);
StringCopy(gStringVar1, GetSpeciesName(show->frontier.species1));
StringCopy(gStringVar2, GetSpeciesName(show->frontier.species2));
sTVShowState = 18;
break;
case 16:
StringCopy(gStringVar1, gSpeciesNames[show->frontier.species1]);
StringCopy(gStringVar2, gSpeciesNames[show->frontier.species2]);
StringCopy(gStringVar3, gSpeciesNames[show->frontier.species3]);
StringCopy(gStringVar1, GetSpeciesName(show->frontier.species1));
StringCopy(gStringVar2, GetSpeciesName(show->frontier.species2));
StringCopy(gStringVar3, GetSpeciesName(show->frontier.species3));
sTVShowState = 17;
break;
case 17:
StringCopy(gStringVar1, gSpeciesNames[show->frontier.species4]);
StringCopy(gStringVar1, GetSpeciesName(show->frontier.species4));
sTVShowState = 18;
break;
case 18:

View File

@ -3050,7 +3050,7 @@ static void Task_RunUnionRoom(u8 taskId)
}
else
{
StringCopy(gStringVar1, gSpeciesNames[GetHostRfuGameData()->tradeSpecies]);
StringCopy(gStringVar1, GetSpeciesName(GetHostRfuGameData()->tradeSpecies));
ConvertIntToDecimalStringN(gStringVar2, GetHostRfuGameData()->tradeLevel, STR_CONV_MODE_LEFT_ALIGN, 3);
StringExpandPlaceholders(gStringVar4, sText_CancelRegistrationOfMon);
}
@ -4109,7 +4109,7 @@ static void TradeBoardPrintItemInfo(u8 windowId, u8 y, struct RfuGameData * data
else
{
BlitMenuInfoIcon(windowId, type + 1, 68, y);
PrintUnionRoomText(windowId, FONT_NORMAL, gSpeciesNames[species], 118, y, colorIdx);
PrintUnionRoomText(windowId, FONT_NORMAL, GetSpeciesName(species), 118, y, colorIdx);
ConvertIntToDecimalStringN(levelStr, level, STR_CONV_MODE_RIGHT_ALIGN, 3);
PrintUnionRoomText(windowId, FONT_NORMAL, levelStr, 198, y, colorIdx);
}
@ -4250,13 +4250,13 @@ static s32 GetChatLeaderActionRequestMessage(u8 *dst, u32 gender, u16 *activityD
break;
case ACTIVITY_TRADE | IN_UNION_ROOM:
ConvertIntToDecimalStringN(uroom->activityRequestStrbufs[0], sUnionRoomTrade.playerLevel, STR_CONV_MODE_LEFT_ALIGN, 3);
StringCopy(uroom->activityRequestStrbufs[1], gSpeciesNames[sUnionRoomTrade.playerSpecies]);
StringCopy(uroom->activityRequestStrbufs[1], GetSpeciesName(sUnionRoomTrade.playerSpecies));
for (i = 0; i < RFU_CHILD_MAX; i++)
{
if (gRfuLinkStatus->partner[i].serialNo == RFU_SERIAL_GAME)
{
ConvertIntToDecimalStringN(uroom->activityRequestStrbufs[2], activityData[2], STR_CONV_MODE_LEFT_ALIGN, 3);
StringCopy(uroom->activityRequestStrbufs[3], gSpeciesNames[activityData[1]]);
StringCopy(uroom->activityRequestStrbufs[3], GetSpeciesName(activityData[1]));
species = activityData[1];
break;
}