diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-01-06 00:23:55 -0500 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-01-06 00:23:55 -0500 |
| commit | 37dbfd75de367d41e5a2edffa00b1b6027b1bd8e (patch) | |
| tree | 6525c7b1e2086d4cbffd97c0c15df1391bec5b1a /src/d/d_item.cpp | |
| parent | 4a0a89501d765c5682e76ed5e05cd45648977614 (diff) | |
Add item button enum and talk button enum
Diffstat (limited to 'src/d/d_item.cpp')
| -rw-r--r-- | src/d/d_item.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/d/d_item.cpp b/src/d/d_item.cpp index 2569849b..9710818d 100644 --- a/src/d/d_item.cpp +++ b/src/d/d_item.cpp @@ -816,9 +816,9 @@ void item_func_magic_arrow() { #if VERSION != VERSION_JPN // If the regular bow was equipped on an X/Y/Z button, force it to update. - for (int btnIdx = 0; btnIdx < 3; btnIdx++) { - if (dComIfGp_getSelectItem(btnIdx) == dItem_BOW_e) { - dComIfGp_setSelectItem(btnIdx); + for (int itemBtn = 0; itemBtn < dItemBtn_COUNT_e; itemBtn++) { + if (dComIfGp_getSelectItem(itemBtn) == dItem_BOW_e) { + dComIfGp_setSelectItem(itemBtn); } } #endif @@ -831,9 +831,9 @@ void item_func_light_arrow() { #if VERSION != VERSION_JPN // If the fire/ice bow was equipped on an X/Y/Z button, force it to update. - for (int btnIdx = 0; btnIdx < 3; btnIdx++) { - if (dComIfGp_getSelectItem(btnIdx) == dItem_MAGIC_ARROW_e) { - dComIfGp_setSelectItem(btnIdx); + for (int itemBtn = 0; itemBtn < dItemBtn_COUNT_e; itemBtn++) { + if (dComIfGp_getSelectItem(itemBtn) == dItem_MAGIC_ARROW_e) { + dComIfGp_setSelectItem(itemBtn); } } #endif @@ -2815,7 +2815,7 @@ u8 getEmonoItemFromLifeBallTable(u16 itemTableIdx) { items[14] = dComIfGp_CharTbl()->GetInf(dComIfGp_CharTbl()->GetNITEM14(), itemTableIdx); items[15] = dComIfGp_CharTbl()->GetInf(dComIfGp_CharTbl()->GetNITEM15(), itemTableIdx); - for (int i = 0; i < 16; i++) { + for (int i = 0; i < (int)ARRAY_SIZE(items); i++) { if (isEmono(items[i])) { return items[i]; } |
