diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/battle_scripts.h | 1 | ||||
-rw-r--r-- | include/battle_tower.h | 6 | ||||
-rw-r--r-- | include/global.berry.h | 8 | ||||
-rw-r--r-- | include/global.h | 31 | ||||
-rw-r--r-- | include/pokemon.h | 2 | ||||
-rw-r--r-- | include/record_mixing.h | 6 |
6 files changed, 27 insertions, 27 deletions
diff --git a/include/battle_scripts.h b/include/battle_scripts.h index a52d256fc..9c4537363 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -207,6 +207,7 @@ extern const u8 BattleScript_ActionSelectionItemsCantBeUsed[]; extern const u8 BattleScript_ArenaTurnBeginning[]; extern const u8 BattleScript_82DB881[]; extern const u8 BattleScript_82DB8F3[]; +extern const u8 BattleScript_82DAA0B[]; extern const u8 BattleScript_AskIfWantsToForfeitMatch[]; extern const u8 BattleScript_PrintPlayerForfeited[]; extern const u8 BattleScript_PrintPlayerForfeitedLinkBattle[]; diff --git a/include/battle_tower.h b/include/battle_tower.h index d7ff70006..f07e9e544 100644 --- a/include/battle_tower.h +++ b/include/battle_tower.h @@ -6,7 +6,7 @@ struct RSBattleTowerRecord /*0x00*/ u8 battleTowerLevelType; // 0 = level 50, 1 = level 100 /*0x01*/ u8 trainerClass; /*0x02*/ u16 winStreak; - /*0x04*/ u8 name[8]; + /*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1]; /*0x0C*/ u8 trainerId[4]; /*0x10*/ struct { u16 easyChat[6]; @@ -22,10 +22,12 @@ union BattleTowerRecord struct EmeraldBattleTowerRecord emerald; }; +#define FRONTIER_TRAINER_NAME_LENGTH 7 + struct BattleFrontierTrainer { u32 facilityClass; - u8 trainerName[8]; + u8 trainerName[FRONTIER_TRAINER_NAME_LENGTH + 1]; u16 speechBefore[6]; u16 speechWin[6]; u16 speechLose[6]; diff --git a/include/global.berry.h b/include/global.berry.h index 5c8a43a02..8046d344e 100644 --- a/include/global.berry.h +++ b/include/global.berry.h @@ -1,12 +1,12 @@ #ifndef GUARD_GLOBAL_BERRY_H #define GUARD_GLOBAL_BERRY_H -#define BERRY_NAME_COUNT 7 +#define BERRY_NAME_LENGTH 6 #define BERRY_ITEM_EFFECT_COUNT 18 struct Berry { - const u8 name[BERRY_NAME_COUNT]; + const u8 name[BERRY_NAME_LENGTH + 1]; u8 firmness; u16 size; u8 maxYield; @@ -26,7 +26,7 @@ struct Berry struct Berry2 { - u8 name[BERRY_NAME_COUNT]; + u8 name[BERRY_NAME_LENGTH + 1]; u8 firmness; u16 size; u8 maxYield; @@ -53,7 +53,7 @@ struct EnigmaBerry struct BattleEnigmaBerry { - /*0x00*/ u8 name[BERRY_NAME_COUNT]; + /*0x00*/ u8 name[BERRY_NAME_LENGTH + 1]; /*0x07*/ u8 holdEffect; /*0x08*/ u8 itemEffect[BERRY_ITEM_EFFECT_COUNT]; /*0x1A*/ u8 holdEffectParam; diff --git a/include/global.h b/include/global.h index 0fff11d09..6977d4059 100644 --- a/include/global.h +++ b/include/global.h @@ -57,8 +57,6 @@ #define PARTY_SIZE 6 #define POKEMON_SLOTS_NUMBER 412 -#define POKEMON_NAME_LENGTH 10 -#define OT_NAME_LENGTH 7 #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) >= (b) ? (a) : (b)) @@ -134,8 +132,7 @@ enum LanguageId // string lengths #define ITEM_NAME_LENGTH 14 #define POKEMON_NAME_LENGTH 10 -#define OT_NAME_LENGTH 7 -#define PLAYER_NAME_LENGTH 8 +#define PLAYER_NAME_LENGTH 7 #define MAIL_WORDS_COUNT 9 enum @@ -326,7 +323,7 @@ struct EmeraldBattleTowerRecord /*0x00*/ u8 battleTowerLevelType; // 0 = level 50, 1 = level 100 /*0x01*/ u8 trainerClass; /*0x02*/ u16 winStreak; - /*0x04*/ u8 name[8]; + /*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1]; /*0x0C*/ u8 trainerId[4]; /*0x10*/ struct { u16 easyChat[6]; @@ -450,7 +447,7 @@ struct BattleFrontier /*0xEBF*/ u8 field_EBF; /*0xEC0*/ u16 field_EC0[16]; /*0xEE0*/ u8 field_EE0; - /*0xEE1*/ u8 field_EE1[2][PLAYER_NAME_LENGTH]; + /*0xEE1*/ u8 field_EE1[2][PLAYER_NAME_LENGTH + 1]; /*0xEF1*/ u8 field_EF1[2][4]; /*0xEF9*/ u8 field_EF9; /*0xEFA*/ u8 field_EFA; @@ -460,7 +457,7 @@ struct BattleFrontier struct SaveBlock2 { - /*0x00*/ u8 playerName[PLAYER_NAME_LENGTH]; + /*0x00*/ u8 playerName[PLAYER_NAME_LENGTH + 1]; /*0x08*/ u8 playerGender; // MALE, FEMALE /*0x09*/ u8 specialSaveWarp; /*0x0A*/ u8 playerTrainerId[4]; @@ -516,7 +513,7 @@ struct SecretBaseRecord /*0x1A9D*/ u8 gender:1; /*0x1A9D*/ u8 sbr_field_1_5:1; /*0x1A9D*/ u8 sbr_field_1_6:2; - /*0x1A9E*/ u8 trainerName[OT_NAME_LENGTH]; + /*0x1A9E*/ u8 trainerName[PLAYER_NAME_LENGTH]; /*0x1AA5*/ u8 trainerId[4]; // byte 0 is used for determining trainer class /*0x1AA9*/ u8 language; /*0x1AAA*/ u16 sbr_field_e; @@ -602,7 +599,7 @@ struct EasyChatPair struct MailStruct { /*0x00*/ u16 words[MAIL_WORDS_COUNT]; - /*0x12*/ u8 playerName[PLAYER_NAME_LENGTH]; + /*0x12*/ u8 playerName[PLAYER_NAME_LENGTH + 1]; /*0x1A*/ u8 trainerId[4]; /*0x1E*/ u16 species; /*0x20*/ u16 itemId; @@ -691,7 +688,7 @@ struct RecordMixing_UnknownStruct struct LinkBattleRecord { - u8 name[8]; + u8 name[PLAYER_NAME_LENGTH + 1]; u16 trainerId; u16 wins; u16 losses; @@ -724,15 +721,15 @@ struct ContestWinner u32 trainerId; u16 species; u8 contestCategory; - u8 monName[11]; - u8 trainerName[8]; + u8 monName[POKEMON_NAME_LENGTH + 1]; + u8 trainerName[PLAYER_NAME_LENGTH + 1]; u8 contestRank; }; struct DayCareMail { struct MailStruct message; - u8 OT_name[OT_NAME_LENGTH + 1]; + u8 OT_name[PLAYER_NAME_LENGTH + 1]; u8 monName[POKEMON_NAME_LENGTH + 1]; u8 gameLanguage:4; u8 monLanguage:4; @@ -773,7 +770,7 @@ struct LilycoveLadyQuiz /*0x002*/ u16 unk_002[9]; /*0x014*/ u16 unk_014; /*0x016*/ u16 unk_016; - /*0x018*/ u8 playerName[8]; + /*0x018*/ u8 playerName[PLAYER_NAME_LENGTH + 1]; /*0x020*/ u16 playerTrainerId[4]; /*0x028*/ u16 itemId; /*0x02a*/ u8 unk_02a; @@ -788,7 +785,7 @@ struct LilycoveLadyFavour /*0x001*/ u8 phase; /*0x002*/ u8 unk_002; /*0x003*/ u8 unk_003; - /*0x004*/ u8 playerName[8]; + /*0x004*/ u8 playerName[PLAYER_NAME_LENGTH + 1]; /*0x00c*/ u8 unk_00c; /*0x00e*/ u16 itemId; /*0x010*/ u16 unk_010; @@ -801,7 +798,7 @@ struct LilycoveLadyContest /*0x001*/ u8 phase; /*0x002*/ u8 fave_pkblk; /*0x003*/ u8 other_pkblk; - /*0x004*/ u8 playerName[8]; + /*0x004*/ u8 playerName[PLAYER_NAME_LENGTH + 1]; /*0x00c*/ u8 max_sheen; /*0x00d*/ u8 category; /*0x00e*/ u8 language; @@ -828,7 +825,7 @@ struct WaldaPhrase struct UnkSaveSubstruct_3b98 { u32 trainerId; - u8 trainerName[8]; + u8 trainerName[PLAYER_NAME_LENGTH + 1]; }; struct SaveBlock1 diff --git a/include/pokemon.h b/include/pokemon.h index 09496b5c3..abfb360f0 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -205,7 +205,7 @@ struct BoxPokemon u8 hasSpecies:1; u8 isEgg:1; u8 unused:5; - u8 otName[OT_NAME_LENGTH]; + u8 otName[PLAYER_NAME_LENGTH]; u8 markings; u16 checksum; u16 unknown; diff --git a/include/record_mixing.h b/include/record_mixing.h index 3cd4d649e..f1b74c143 100644 --- a/include/record_mixing.h +++ b/include/record_mixing.h @@ -6,7 +6,7 @@ struct UnkRecordMixingStruct2a { u8 playerId[4]; u16 field_4; - u8 playerName[PLAYER_NAME_LENGTH]; + u8 playerName[PLAYER_NAME_LENGTH + 1]; u8 language; }; @@ -15,8 +15,8 @@ struct UnkRecordMixingStruct2b u8 playerId1[4]; u8 playerId2[4]; u16 field_8; - u8 playerName1[PLAYER_NAME_LENGTH]; - u8 playerName2[PLAYER_NAME_LENGTH]; + u8 playerName1[PLAYER_NAME_LENGTH + 1]; + u8 playerName2[PLAYER_NAME_LENGTH + 1]; u8 language; }; |