diff --git a/include/item_menu.h b/include/item_menu.h index 9930ccd4f3..edfb986f7f 100644 --- a/include/item_menu.h +++ b/include/item_menu.h @@ -52,10 +52,7 @@ struct BagMenuStruct void (*exitCallback)(void); u8 tilemapBuffer[0x800]; u8 spriteId[12]; - u8 windowPointers[7]; - u8 unk817; - u8 unk818; - u8 unk819; + u8 windowPointers[10]; u8 itemOriginalLocation; u8 pocketSwitchDisabled:4; u8 itemIconSlot:2; diff --git a/src/item_menu.c b/src/item_menu.c index 561019e89f..591ebe018d 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -1776,7 +1776,7 @@ void Task_ChooseHowManyToToss(u8 taskId) if (AdjustQuantityAccordingToDPadInput(&tItemCount, data[2]) == TRUE) { - PrintItemDepositAmount(gBagMenu->unk817, tItemCount); + PrintItemDepositAmount(gBagMenu->windowPointers[7], tItemCount); } else if (gMain.newKeys & A_BUTTON) { @@ -2050,7 +2050,7 @@ void Task_BuyHowManyDialogueHandleInput(u8 taskId) if (AdjustQuantityAccordingToDPadInput(&tItemCount, data[2]) == TRUE) { - PrintItemSoldAmount(gBagMenu->unk818, tItemCount, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * tItemCount); + PrintItemSoldAmount(gBagMenu->windowPointers[8], tItemCount, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * tItemCount); } else if (gMain.newKeys & A_BUTTON) { @@ -2094,7 +2094,7 @@ void sub_81AD8C8(u8 taskId) LoadBagItemListBuffers(gBagPositionStruct.pocket); data[0] = ListMenuInit(&gMultiuseListMenuTemplate, *scrollPos, *cursorPos); BagMenu_PrintCursor_(data[0], 2); - PrintMoneyAmountInMoneyBox(gBagMenu->unk819, GetMoney(&gSaveBlock1Ptr->money), 0); + PrintMoneyAmountInMoneyBox(gBagMenu->windowPointers[9], GetMoney(&gSaveBlock1Ptr->money), 0); gTasks[taskId].func = sub_81AD9C0; } @@ -2134,7 +2134,7 @@ void sub_81ADA7C(u8 taskId) if (AdjustQuantityAccordingToDPadInput(&tItemCount, data[2]) == TRUE) { - PrintItemDepositAmount(gBagMenu->unk817, tItemCount); + PrintItemDepositAmount(gBagMenu->windowPointers[7], tItemCount); } else if (gMain.newKeys & A_BUTTON) { diff --git a/src/pokedex.c b/src/pokedex.c index d2e1a06665..0541f3f2e6 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -4521,7 +4521,11 @@ static void UnusedPrintMonName(u8 windowId, const u8* name, u8 left, u8 top) ; for (i = 0; i < nameLength; i++) str[ARRAY_COUNT(str) - nameLength + i] = name[i]; +#ifdef UBFIX + str[ARRAY_COUNT(str) - 1] = EOS; +#else str[ARRAY_COUNT(str)] = EOS; +#endif PrintInfoSubMenuText(windowId, str, left, top); }