From cbc89b8af4718e72349552642d162c2ef2725587 Mon Sep 17 00:00:00 2001 From: louist103 <35883445+louist103@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:51:47 -0400 Subject: [PATCH] Fix item id type (#813) * fix wrong type * Update z_kaleido_item.c --- .../kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c b/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c index 2441c27bf..b4d7e5179 100644 --- a/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c +++ b/mm/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c @@ -322,10 +322,8 @@ void KaleidoScope_DrawItemSelect(PlayState* play) { pauseCtx->itemVtx[j + 0].v.ob[1] - 32; } } - // #region 2S2H [Port] Originally this was done in KaleidoScope_Update, but now we are using gSPGrayscale on - // the fly It reads odd here to assign a u8 to a u16, then cast it to s32 for gPlayerFormItemRestrictions - // but this matches the behavior of the original code - u16 itemId = gSaveContext.save.saveInfo.inventory.items[i]; + // #region 2S2H [Port] Originally this was done in KaleidoScope_Update, but now we are using gSPGrayscale. + ItemId itemId = gSaveContext.save.saveInfo.inventory.items[i]; u8 itemRestricted = GameInteractor_Should( VB_ITEM_BE_RESTRICTED, !gPlayerFormItemRestrictions[GET_PLAYER_FORM][(s32)itemId], &itemId); if (itemRestricted) {