diff options
Diffstat (limited to 'src/item_menu.c')
-rwxr-xr-x | src/item_menu.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/item_menu.c b/src/item_menu.c index 470757f8d..56ef3cba3 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -974,7 +974,7 @@ static void BagMenu_ItemPrintCallback(u8 windowId, u32 itemIndex, u8 y) ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, BERRY_CAPACITY_DIGITS); StringExpandPlaceholders(gStringVar4, gText_xVar1); offset = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119); - BagMenu_Print(windowId, FONT_NARROW, gStringVar4, offset, y, 0, 0, TEXT_SPEED_FF, COLORID_NORMAL); + BagMenu_Print(windowId, FONT_NARROW, gStringVar4, offset, y, 0, 0, TEXT_SKIP_DRAW, COLORID_NORMAL); } else if (gBagPosition.pocket != KEYITEMS_POCKET && ItemId_GetImportance(itemId) == FALSE) { @@ -982,7 +982,7 @@ static void BagMenu_ItemPrintCallback(u8 windowId, u32 itemIndex, u8 y) ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, BAG_ITEM_CAPACITY_DIGITS); StringExpandPlaceholders(gStringVar4, gText_xVar1); offset = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119); - BagMenu_Print(windowId, FONT_NARROW, gStringVar4, offset, y, 0, 0, TEXT_SPEED_FF, COLORID_NORMAL); + BagMenu_Print(windowId, FONT_NARROW, gStringVar4, offset, y, 0, 0, TEXT_SKIP_DRAW, COLORID_NORMAL); } else { @@ -1204,7 +1204,7 @@ static void PrintItemSoldAmount(int windowId, int numSold, int moneyEarned) u8 numDigits = (gBagPosition.pocket == BERRIES_POCKET) ? BERRY_CAPACITY_DIGITS : BAG_ITEM_CAPACITY_DIGITS; ConvertIntToDecimalStringN(gStringVar1, numSold, STR_CONV_MODE_LEADING_ZEROS, numDigits); StringExpandPlaceholders(gStringVar4, gText_xVar1); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, 0); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, 0); PrintMoneyAmount(windowId, 38, 1, moneyEarned, 0); } @@ -1667,8 +1667,8 @@ static void OpenContextMenu(u8 taskId) static void PrintContextMenuItems(u8 windowId) { - AddItemMenuActionTextPrinters(windowId, FONT_NARROW, 8, 1, 0, 16, gBagMenu->contextMenuNumItems, sItemMenuActions, gBagMenu->contextMenuItemsPtr); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, gBagMenu->contextMenuNumItems, 0); + PrintMenuActionTexts(windowId, FONT_NARROW, 8, 1, 0, 16, gBagMenu->contextMenuNumItems, sItemMenuActions, gBagMenu->contextMenuItemsPtr); + InitMenuInUpperLeftCornerNormal(windowId, gBagMenu->contextMenuNumItems, 0); } static void PrintContextMenuItemGrid(u8 windowId, u8 columns, u8 rows) @@ -1720,7 +1720,7 @@ static void Task_ItemContext_MultipleRows(u8 taskId) if (cursorPos > 0 && IsValidContextMenuPos(cursorPos - 2)) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_UP); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_UP); } } else if (JOY_NEW(DPAD_DOWN)) @@ -1728,7 +1728,7 @@ static void Task_ItemContext_MultipleRows(u8 taskId) if (cursorPos < (gBagMenu->contextMenuNumItems - 2) && IsValidContextMenuPos(cursorPos + 2)) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_DOWN); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_DOWN); } } else if (JOY_NEW(DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED) @@ -1736,7 +1736,7 @@ static void Task_ItemContext_MultipleRows(u8 taskId) if ((cursorPos & 1) && IsValidContextMenuPos(cursorPos - 1)) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_LEFT, MENU_CURSOR_DELTA_NONE); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_LEFT, MENU_CURSOR_DELTA_NONE); } } else if (JOY_NEW(DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED) @@ -1744,7 +1744,7 @@ static void Task_ItemContext_MultipleRows(u8 taskId) if (!(cursorPos & 1) && IsValidContextMenuPos(cursorPos + 1)) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_RIGHT, MENU_CURSOR_DELTA_NONE); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_RIGHT, MENU_CURSOR_DELTA_NONE); } } else if (JOY_NEW(A_BUTTON)) @@ -2039,7 +2039,7 @@ bool8 UseRegisteredKeyItemOnField(void) if (InUnionRoom() == TRUE || InBattlePyramid() || InBattlePike() || InMultiPartnerRoom() == TRUE) return FALSE; HideMapNamePopUpWindow(); - ChangeBgY_ScreenOff(0, 0, 0); + ChangeBgY_ScreenOff(0, 0, BG_COORD_SET); if (gSaveBlock1Ptr->registeredItem != ITEM_NONE) { if (CheckBagHasItem(gSaveBlock1Ptr->registeredItem, 1) == TRUE) @@ -2417,11 +2417,11 @@ static void PrintPocketNames(const u8 *pocketName1, const u8 *pocketName2) windowId = AddWindow(&window); FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); offset = GetStringCenterAlignXOffset(FONT_NORMAL, pocketName1, 0x40); - BagMenu_Print(windowId, FONT_NORMAL, pocketName1, offset, 1, 0, 0, TEXT_SPEED_FF, COLORID_POCKET_NAME); + BagMenu_Print(windowId, FONT_NORMAL, pocketName1, offset, 1, 0, 0, TEXT_SKIP_DRAW, COLORID_POCKET_NAME); if (pocketName2) { offset = GetStringCenterAlignXOffset(FONT_NORMAL, pocketName2, 0x40); - BagMenu_Print(windowId, FONT_NORMAL, pocketName2, offset + 0x40, 1, 0, 0, TEXT_SPEED_FF, COLORID_POCKET_NAME); + BagMenu_Print(windowId, FONT_NORMAL, pocketName2, offset + 0x40, 1, 0, 0, TEXT_SKIP_DRAW, COLORID_POCKET_NAME); } CpuCopy32((u8*)GetWindowAttribute(windowId, WINDOW_TILE_DATA), gBagMenu->pocketNameBuffer, sizeof(gBagMenu->pocketNameBuffer)); RemoveWindow(windowId); @@ -2439,7 +2439,7 @@ static void CopyPocketNameToWindow(u32 a) CpuCopy32(tileDataBuffer[0][a], windowTileData, 0x100); // Top half of pocket name b = a + 16; CpuCopy32(tileDataBuffer[0][b], windowTileData + 0x100, 0x100); // Bottom half of pocket name - CopyWindowToVram(WIN_POCKET_NAME, 2); + CopyWindowToVram(WIN_POCKET_NAME, COPYWIN_GFX); } static void LoadBagMenuTextWindows(void) @@ -2544,7 +2544,7 @@ static void PrepareTMHMMoveWindow(void) BlitMenuInfoIcon(WIN_TMHM_INFO_ICONS, MENU_INFO_ICON_POWER, 0, 12); BlitMenuInfoIcon(WIN_TMHM_INFO_ICONS, MENU_INFO_ICON_ACCURACY, 0, 24); BlitMenuInfoIcon(WIN_TMHM_INFO_ICONS, MENU_INFO_ICON_PP, 0, 36); - CopyWindowToVram(WIN_TMHM_INFO_ICONS, 2); + CopyWindowToVram(WIN_TMHM_INFO_ICONS, COPYWIN_GFX); } static void PrintTMHMMoveData(u16 itemId) @@ -2557,8 +2557,8 @@ static void PrintTMHMMoveData(u16 itemId) if (itemId == ITEM_NONE) { for (i = 0; i < 4; i++) - BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gText_ThreeDashes, 7, i * 12, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); - CopyWindowToVram(WIN_TMHM_INFO, 2); + BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gText_ThreeDashes, 7, i * 12, 0, 0, TEXT_SKIP_DRAW, COLORID_TMHM_INFO); + CopyWindowToVram(WIN_TMHM_INFO, COPYWIN_GFX); } else { @@ -2575,7 +2575,7 @@ static void PrintTMHMMoveData(u16 itemId) ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].power, STR_CONV_MODE_RIGHT_ALIGN, 3); text = gStringVar1; } - BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, text, 7, 12, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); + BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, text, 7, 12, 0, 0, TEXT_SKIP_DRAW, COLORID_TMHM_INFO); // Print TMHM accuracy if (gBattleMoves[moveId].accuracy == 0) @@ -2587,12 +2587,12 @@ static void PrintTMHMMoveData(u16 itemId) ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].accuracy, STR_CONV_MODE_RIGHT_ALIGN, 3); text = gStringVar1; } - BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, text, 7, 24, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); + BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, text, 7, 24, 0, 0, TEXT_SKIP_DRAW, COLORID_TMHM_INFO); // Print TMHM pp ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].pp, STR_CONV_MODE_RIGHT_ALIGN, 3); - BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gStringVar1, 7, 36, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); + BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gStringVar1, 7, 36, 0, 0, TEXT_SKIP_DRAW, COLORID_TMHM_INFO); - CopyWindowToVram(WIN_TMHM_INFO, 2); + CopyWindowToVram(WIN_TMHM_INFO, COPYWIN_GFX); } } |