diff --git a/include/list_menu.h b/include/list_menu.h index 0a54a069a..1c18f3dff 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -31,7 +31,7 @@ struct ListMenuTemplate { const struct ListMenuItem *items; void (* moveCursorFunc)(s32 itemIndex, bool8 onInit, struct ListMenu *list); - void (* itemPrintFunc)(u8 windowId, s32 itemId, u8 y); + void (* itemPrintFunc)(u8 windowId, u32 itemId, u8 y); u16 totalItems; u16 maxShowed; u8 windowId; diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index 0b13512ec..095cd2bdf 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -106,7 +106,7 @@ static void BagAction_Give(u8); static void BagAction_Cancel(u8); static void BagAction_UseInBattle(u8); static void BagCursorMoved(s32, bool8, struct ListMenu *); -static void PrintItemQuantity(u8, s32, u8); +static void PrintItemQuantity(u8 windowId, u32 itemId, u8 y); static void TossItem(u8); static void DontTossItem(u8); @@ -651,7 +651,7 @@ static void BagCursorMoved(s32 itemIndex, bool8 onInit, struct ListMenu *list) } } -static void PrintItemQuantity(u8 windowId, s32 itemIndex, u8 y) +static void PrintItemQuantity(u8 windowId, u32 itemIndex, u8 y) { s32 xAlign; if (itemIndex == LIST_CANCEL) diff --git a/src/daycare.c b/src/daycare.c index 4199bfda6..6a1715049 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -29,7 +29,7 @@ extern const struct Evolution gEvolutionTable[][EVOS_PER_MON]; static void ClearDaycareMonMail(struct DaycareMail *mail); static void SetInitialEggData(struct Pokemon *mon, u16 species, struct DayCare *daycare); static u8 GetDaycareCompatibilityScore(struct DayCare *daycare); -static void DaycarePrintMonInfo(u8 windowId, s32 daycareSlotId, u8 y); +static void DaycarePrintMonInfo(u8 windowId, u32 daycareSlotId, u8 y); // RAM buffers used to assist with BuildEggMoveset() EWRAM_DATA static u16 sHatchedEggLevelUpMoves[EGG_LVL_UP_MOVES_ARRAY_COUNT] = {0}; @@ -1226,7 +1226,7 @@ static void DaycarePrintMonLvl(struct DayCare *daycare, u8 windowId, u32 daycare DaycareAddTextPrinter(windowId, lvlText, x, y); } -static void DaycarePrintMonInfo(u8 windowId, s32 daycareSlotId, u8 y) +static void DaycarePrintMonInfo(u8 windowId, u32 daycareSlotId, u8 y) { if (daycareSlotId < (unsigned) DAYCARE_MON_COUNT) { diff --git a/src/decoration.c b/src/decoration.c index 6b6cf21e8..ebd7eb26c 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -147,7 +147,7 @@ static void ReturnToActionsMenuFromCategories(u8 taskId); static void ExitTraderDecorationMenu(u8 taskId); static void CopyDecorationMenuItemName(u8 *dest, u16 decoration); static void DecorationItemsMenu_OnCursorMove(s32 itemIndex, bool8 flag, struct ListMenu *menu); -static void DecorationItemsMenu_PrintDecorationInUse(u8 windowId, s32 itemIndex, u8 y); +static void DecorationItemsMenu_PrintDecorationInUse(u8 windowId, u32 itemIndex, u8 y); static void ShowDecorationItemsWindow(u8 taskId); static void HandleDecorationItemsMenuInput(u8 taskId); static void PrintDecorationItemDescription(s32 itemIndex); @@ -912,9 +912,9 @@ static void DecorationItemsMenu_OnCursorMove(s32 itemIndex, bool8 flag, struct L PrintDecorationItemDescription(itemIndex); } -static void DecorationItemsMenu_PrintDecorationInUse(u8 windowId, s32 itemIndex, u8 y) +static void DecorationItemsMenu_PrintDecorationInUse(u8 windowId, u32 itemIndex, u8 y) { - if (itemIndex != -2) + if (itemIndex != LIST_CANCEL) { if (IsDecorationIndexInSecretBase(itemIndex + 1) == TRUE) BlitMenuInfoIcon(windowId, MENU_INFO_ICON_BALL_RED, 92, y + 2); diff --git a/src/item_menu.c b/src/item_menu.c index de4d82e9b..39abf883a 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -133,7 +133,7 @@ void UpdatePocketScrollPositions(void); u8 CreateBagInputHandlerTask(u8); void sub_81AC23C(u8); void BagMenu_MoveCursorCallback(s32 a, bool8 b, struct ListMenu*); -void BagMenu_ItemPrintCallback(u8 windowId, s32 itemIndex, u8 a); +void BagMenu_ItemPrintCallback(u8 windowId, u32 itemIndex, u8 a); void ItemMenu_UseOutOfBattle(u8 taskId); void ItemMenu_Toss(u8 taskId); void ItemMenu_Register(u8 taskId); @@ -893,7 +893,7 @@ void BagMenu_MoveCursorCallback(s32 itemIndex, bool8 onInit, struct ListMenu *li } } -void BagMenu_ItemPrintCallback(u8 windowId, s32 itemIndex, u8 y) +void BagMenu_ItemPrintCallback(u8 windowId, u32 itemIndex, u8 y) { u16 itemId; u16 itemQuantity; diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 4c4be57f0..2afcf51ca 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -253,7 +253,7 @@ static u8 sub_81D1D34(u8 a0) return sUnknown_0203CF48[a0]; } -static void sub_81D1D44(u8 windowId, s32 itemId, u8 y) +static void sub_81D1D44(u8 windowId, u32 itemId, u8 y) { u8 buffer[30]; u16 length; diff --git a/src/player_pc.c b/src/player_pc.c index a040ba5b6..946f0645c 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -119,7 +119,7 @@ static void sub_816C060(u16 itemId); static void sub_816BEF0(s32 id); static void sub_816B4DC(u8 taskId); static void ItemStorage_MoveCursor(s32 id, bool8 b, struct ListMenu * thisMenu); -static void fish4_goto_x5_or_x6(u8 windowId, s32 id, u8 yOffset); +static void fish4_goto_x5_or_x6(u8 windowId, u32 id, u8 yOffset); // EWRAM static EWRAM_DATA const u8 *gPcItemMenuOptionOrder = NULL; @@ -943,7 +943,7 @@ static void ItemStorage_MoveCursor(s32 id, bool8 b, struct ListMenu *thisMenu) if (gUnknown_0203BCC4->unk666 == 0xFF) { sub_816C0C8(); - if (id != -2) + if (id != LIST_CANCEL) sub_816C060(gSaveBlock1Ptr->pcItems[id].itemId); else sub_816C060(ITEMPC_GO_BACK_TO_PREV); @@ -951,9 +951,9 @@ static void ItemStorage_MoveCursor(s32 id, bool8 b, struct ListMenu *thisMenu) } } -static void fish4_goto_x5_or_x6(u8 windowId, s32 id, u8 yOffset) +static void fish4_goto_x5_or_x6(u8 windowId, u32 id, u8 yOffset) { - if (id != -2) + if (id != LIST_CANCEL) { if (gUnknown_0203BCC4->unk666 != 0xFF) { diff --git a/src/shop.c b/src/shop.c index 55b421928..2a30bea22 100755 --- a/src/shop.c +++ b/src/shop.c @@ -91,7 +91,7 @@ static void Task_ReturnToItemListAfterDecorationPurchase(u8 taskId); static void Task_HandleShopMenuBuy(u8 taskId); static void Task_HandleShopMenuSell(u8 taskId); static void BuyMenuPrintItemDescriptionAndShowItemIcon(s32 item, bool8 onInit, struct ListMenu *list); -static void BuyMenuPrintPriceInList(u8 windowId, s32 item, u8 y); +static void BuyMenuPrintPriceInList(u8 windowId, u32 itemId, u8 y); static const struct YesNoFuncTable sShopPurchaseYesNoFuncs = { @@ -552,17 +552,17 @@ static void BuyMenuPrintItemDescriptionAndShowItemIcon(s32 item, bool8 onInit, s BuyMenuPrint(2, description, 3, 1, 0, 0); } -static void BuyMenuPrintPriceInList(u8 windowId, s32 item, u8 y) +static void BuyMenuPrintPriceInList(u8 windowId, u32 itemId, u8 y) { u8 x; - if (item != LIST_CANCEL) + if (itemId != LIST_CANCEL) { if (sMartInfo.martType == MART_TYPE_NORMAL) { ConvertIntToDecimalStringN( gStringVar1, - ItemId_GetPrice(item) >> GetPriceReduction(POKENEWS_SLATEPORT), + ItemId_GetPrice(itemId) >> GetPriceReduction(POKENEWS_SLATEPORT), STR_CONV_MODE_LEFT_ALIGN, 5); } @@ -570,7 +570,7 @@ static void BuyMenuPrintPriceInList(u8 windowId, s32 item, u8 y) { ConvertIntToDecimalStringN( gStringVar1, - gDecorations[item].price, + gDecorations[itemId].price, STR_CONV_MODE_LEFT_ALIGN, 5); } diff --git a/src/union_room.c b/src/union_room.c index 395650f28..8d02a260d 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -253,10 +253,10 @@ static bool32 UR_PrintFieldMessage(const u8 *); static s32 GetChatLeaderActionRequestMessage(u8 *, u32, u16 *, struct WirelessLink_URoom *); static void Task_InitUnionRoom(u8 taskId); static bool8 AreGnameUnameDifferent(struct WirelessGnameUnamePair*, const struct WirelessGnameUnamePair*); -static void ItemPrintFunc_PossibleGroupMembers(u8, s32, u8); -static void ListMenuItemPrintFunc_UnionRoomGroups(u8, s32, u8); -static void TradeBoardListMenuItemPrintFunc(u8, s32, u8); -static void nullsub_14(u8, s32, u8); +static void ItemPrintFunc_PossibleGroupMembers(u8 windowId, u32 id, u8 y); +static void ListMenuItemPrintFunc_UnionRoomGroups(u8 windowId, u32 id, u8 y); +static void TradeBoardListMenuItemPrintFunc(u8 windowId, u32 id, u8 y); +static void nullsub_14(u8 windowId, u32 id, u8 y); #include "data/union_room.h" @@ -835,7 +835,7 @@ static bool8 Leader_SetStateIfMemberListChanged(struct WirelessLink_Leader *data return FALSE; } -static void ItemPrintFunc_PossibleGroupMembers(u8 windowId, s32 id, u8 y) +static void ItemPrintFunc_PossibleGroupMembers(u8 windowId, u32 id, u8 y) { struct WirelessLink_Leader *data = sWirelessLinkMain.leader; u8 colorIdx = UR_COLOR_DKE_WHT_LTE; @@ -1363,7 +1363,7 @@ static u8 URoomGroupListGetTextColor(struct WirelessLink_Group *data, u32 id) return UR_COLOR_DKE_WHT_LTE; } -static void ListMenuItemPrintFunc_UnionRoomGroups(u8 windowId, s32 id, u8 y) +static void ListMenuItemPrintFunc_UnionRoomGroups(u8 windowId, u32 id, u8 y) { struct WirelessLink_Group *data = sWirelessLinkMain.group; u8 colorId = URoomGroupListGetTextColor(data, id); @@ -4074,9 +4074,8 @@ static s32 UnionRoomGetPlayerInteractionResponse(struct UnkStruct_Main0 *main0, } } -void nullsub_14(u8 windowId, s32 itemId, u8 y) +void nullsub_14(u8 windowId, u32 itemId, u8 y) { - } static void TradeBoardPrintItemInfo(u8 windowId, u8 y, struct GFtgtGname * gname, const u8 * uname, u8 colorIdx) @@ -4100,7 +4099,7 @@ static void TradeBoardPrintItemInfo(u8 windowId, u8 y, struct GFtgtGname * gname } } -static void TradeBoardListMenuItemPrintFunc(u8 windowId, s32 itemId, u8 y) +static void TradeBoardListMenuItemPrintFunc(u8 windowId, u32 itemId, u8 y) { struct WirelessLink_Leader *data = sWirelessLinkMain.leader; struct GFtgtGname *rfu;