Automatically update nickname buffer sizes

This commit is contained in:
GriffinR
2023-08-08 15:27:52 -04:00
parent da238562f0
commit 65fee186f8
20 changed files with 83 additions and 73 deletions

View File

@@ -1,7 +1,11 @@
#ifndef GUARD_BATTLE_MESSAGE_H
#define GUARD_BATTLE_MESSAGE_H
#define TEXT_BUFF_ARRAY_COUNT 16
// This buffer can hold many different things. Some of the things it can hold
// that have explicit sizes are listed below to ensure it can contain them.
#define TEXT_BUFF_ARRAY_COUNT max(16, \
max(MOVE_NAME_LENGTH + 2, /* +2 to hold the "!" and EOS. */ \
POKEMON_NAME_LENGTH + 1))
// for 0xFD
#define B_TXT_BUFF1 0x0

View File

@@ -92,6 +92,7 @@
// string lengths
#define ITEM_NAME_LENGTH 14
#define POKEMON_NAME_LENGTH 10
#define POKEMON_NAME_BUFFER_SIZE max(20, POKEMON_NAME_LENGTH + 1) // Frequently used buffer size. Larger than necessary
#define PLAYER_NAME_LENGTH 7
#define MAIL_WORDS_COUNT 9
#define EASY_CHAT_BATTLE_WORDS_COUNT 6