Fix item id type (#813)
Some checks failed
generate-builds / generate-2ship-otr (push) Has been cancelled
generate-builds / build-macos (push) Has been cancelled
generate-builds / build-linux (push) Has been cancelled
generate-builds / build-windows (push) Has been cancelled

* fix wrong type

* Update z_kaleido_item.c
This commit is contained in:
louist103 2024-10-21 11:51:47 -04:00 committed by GitHub
parent 9cd2f6e784
commit cbc89b8af4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) {