Added a constant for NPC trainer name length (#1712)

This commit is contained in:
LOuroboros
2022-07-25 23:59:13 -03:00
committed by GitHub
parent a8c93dcf35
commit b59f7aed7f
7 changed files with 10 additions and 10 deletions

View File

@@ -103,6 +103,7 @@
#define WONDER_NEWS_BODY_TEXT_LINES 10
#define TYPE_NAME_LENGTH 6
#define ABILITY_NAME_LENGTH 12
#define TRAINER_NAME_LENGTH 10
#define MAX_STAMP_CARD_STAMPS 7

View File

@@ -52,8 +52,6 @@
#define TRAINER_HILL_PLAYER_STATUS_ECARD_SCANNED 1
#define TRAINER_HILL_PLAYER_STATUS_NORMAL 2
#define HILL_TRAINER_NAME_LENGTH 11
#define TRAINER_HILL_OTID 0x10000000
// The full map of each Trainer Hill floor is 16x21.

View File

@@ -71,7 +71,7 @@ struct Trainer
/*0x01*/ u8 trainerClass;
/*0x02*/ u8 encounterMusic_gender; // last bit is gender
/*0x03*/ u8 trainerPic;
/*0x04*/ u8 trainerName[12];
/*0x04*/ u8 trainerName[TRAINER_NAME_LENGTH + 1];
/*0x10*/ u16 items[MAX_TRAINER_ITEMS];
/*0x18*/ bool8 doubleBattle;
/*0x1C*/ u32 aiFlags;

View File

@@ -81,7 +81,8 @@ typedef union // size = 0x24
/*0x01*/ bool8 active;
/*0x02*/ u16 species;
/*0x04*/ u8 pokemonName[POKEMON_NAME_LENGTH + 1];
/*0x0F*/ u8 trainerName[11];
/*0x0F*/ u8 trainerName[PLAYER_NAME_LENGTH + 1];
/*0x17*/ u8 unused[3];
/*0x1A*/ u8 random;
/*0x1B*/ u8 random2;
/*0x1C*/ u16 randomSpecies;

View File

@@ -5,7 +5,7 @@
struct TrainerHillTrainer
{
u8 name[HILL_TRAINER_NAME_LENGTH];
u8 name[TRAINER_NAME_LENGTH + 1];
u8 facilityClass;
bool32 unused; // Set to TRUE on JP trainers
u16 speechBefore[EASY_CHAT_BATTLE_WORDS_COUNT];