This commit is contained in:
Eduardo Quezada
2022-08-01 15:16:58 -04:00
parent 19a521fe33
commit 95b16a2391
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -16,8 +16,6 @@
// between 2 Pokémon with held items // between 2 Pokémon with held items
#define MAX_ITEM_ICONS 3 #define MAX_ITEM_ICONS 3
#define MAX_MENU_ITEMS 7
enum enum
{ {
MODE_PARTY, MODE_PARTY,
@@ -308,7 +306,7 @@ struct PokemonStorageSystemData
/* 0c66 */ u8 iconScrollState; /* 0c66 */ u8 iconScrollState;
/* 0c67 */ u8 iconScrollToBoxId; // Unused duplicate of scrollToBoxId /* 0c67 */ u8 iconScrollToBoxId; // Unused duplicate of scrollToBoxId
/* 0c68 */ struct WindowTemplate menuWindow; /* 0c68 */ struct WindowTemplate menuWindow;
/* 0c70 */ struct StorageMenu menuItems[MAX_MENU_ITEMS]; /* 0c70 */ struct StorageMenu menuItems[7];
/* 0ca8 */ u8 menuItemsCount; /* 0ca8 */ u8 menuItemsCount;
/* 0ca9 */ u8 menuWidth; /* 0ca9 */ u8 menuWidth;
/* 0caa */ u8 menuUnusedField; // Never read. /* 0caa */ u8 menuUnusedField; // Never read.
+1 -1
View File
@@ -58,7 +58,7 @@ static const u8 *const sMenuTexts[] = {
void SetMenuText(u8 textId) void SetMenuText(u8 textId)
{ {
if (gPSSData->menuItemsCount < MAX_MENU_ITEMS) if (gPSSData->menuItemsCount < ARRAY_COUNT(gPSSData->menuItems))
{ {
u8 len; u8 len;
struct StorageMenu *menu = &gPSSData->menuItems[gPSSData->menuItemsCount]; struct StorageMenu *menu = &gPSSData->menuItems[gPSSData->menuItemsCount];