Added a constant for NPC trainer name length (#1712)
This commit is contained in:
@@ -31,7 +31,7 @@ struct GFRomHeader
|
||||
u32 mysteryEventFlag;
|
||||
u32 pokedexCount;
|
||||
u8 playerNameLength;
|
||||
u8 unk2;
|
||||
u8 trainerNameLength;
|
||||
u8 pokemonNameLength1;
|
||||
u8 pokemonNameLength2;
|
||||
u8 unk5;
|
||||
@@ -111,7 +111,7 @@ static const struct GFRomHeader sGFRomHeader = {
|
||||
.mysteryEventFlag = FLAG_SYS_MYSTERY_EVENT_ENABLE,
|
||||
.pokedexCount = NATIONAL_DEX_COUNT,
|
||||
.playerNameLength = PLAYER_NAME_LENGTH,
|
||||
.unk2 = 10,
|
||||
.trainerNameLength = TRAINER_NAME_LENGTH,
|
||||
.pokemonNameLength1 = POKEMON_NAME_LENGTH,
|
||||
.pokemonNameLength2 = POKEMON_NAME_LENGTH,
|
||||
// Two of the below 12s are likely move/ability name length, given their presence in this header
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
struct FloorTrainers
|
||||
{
|
||||
u8 name[HILL_TRAINERS_PER_FLOOR][HILL_TRAINER_NAME_LENGTH];
|
||||
u8 name[HILL_TRAINERS_PER_FLOOR][TRAINER_NAME_LENGTH + 1];
|
||||
u8 facilityClass[HILL_TRAINERS_PER_FLOOR];
|
||||
};
|
||||
|
||||
@@ -305,7 +305,7 @@ void GetTrainerHillTrainerName(u8 *dst, u16 trainerId)
|
||||
s32 i;
|
||||
u8 id = trainerId - 1;
|
||||
|
||||
for (i = 0; i < HILL_TRAINER_NAME_LENGTH; i++)
|
||||
for (i = 0; i < TRAINER_NAME_LENGTH + 1; i++)
|
||||
dst[i] = sFloorTrainers->name[id][i];
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ void InitTrainerHillBattleStruct(void)
|
||||
|
||||
for (i = 0; i < HILL_TRAINERS_PER_FLOOR; i++)
|
||||
{
|
||||
for (j = 0; j < HILL_TRAINER_NAME_LENGTH; j++)
|
||||
for (j = 0; j < TRAINER_NAME_LENGTH + 1; j++)
|
||||
sFloorTrainers->name[i][j] = sHillData->floors[sHillData->floorId].trainers[i].name[j];
|
||||
|
||||
sFloorTrainers->facilityClass[i] = sHillData->floors[sHillData->floorId].trainers[i].facilityClass;
|
||||
|
||||
Reference in New Issue
Block a user