summaryrefslogtreecommitdiff
path: root/src/code/z_parameter.c
diff options
context:
space:
mode:
authorDragorn421 <Dragorn421@users.noreply.github.com>2022-12-13 03:45:54 +0100
committerGitHub <noreply@github.com>2022-12-12 21:45:54 -0500
commit880e7c937c81cc55fea876b1d85294ffba43a4d8 (patch)
treee7679144b7ec6ba325679c4e2d77d0701ded6c49 /src/code/z_parameter.c
parentc420885513db9c170dff67f81c849a58b67a0ae1 (diff)
Some cleanup/doc on the item icons (#1263)
* Some cleanup/doc on the item enum and icons * `gItemIconBigBottlePoeTex` -> `gItemIconBottleBigPoeTex` * Biggoron sword / giant knife items (?) * `SPSTONE_` -> `SPIRITUAL_` ? * `gItemIconBrokenBiggoronSwordTex` -> `gItemIconBrokenGoronsSwordTex` * `gQuestIcon...MedallionTex` -> `gQuestIconMedallion...Tex` * `ITEM_MAGIC_` -> `ITEM_MAGIC_JAR_`small/big * `ITEM_BOW_ARROW_` -> `ITEM_BOW_` * `MASK_BUNNY` -> `MASK_BUNNY_HOOD` * Update `GID_` enum from `ITEM_` enum * ITEM/GID`_ARROW_`small/medium/large -> 5/10/30 * Run formatter * . * fix regressions and revert bad ideas * chicken * obey the newline police and also prevent the range police from intervening * fixups * dimensions -> dimension (singular) * Note on inconsequential oddities about the `gItemIcons` mapping
Diffstat (limited to 'src/code/z_parameter.c')
-rw-r--r--src/code/z_parameter.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c
index 9809191d8..6b9ae2b52 100644
--- a/src/code/z_parameter.c
+++ b/src/code/z_parameter.c
@@ -1298,10 +1298,9 @@ void Interface_LoadItemIcon1(PlayState* play, u16 button) {
InterfaceContext* interfaceCtx = &play->interfaceCtx;
osCreateMesgQueue(&interfaceCtx->loadQueue, &interfaceCtx->loadMsg, 1);
- DmaMgr_RequestAsync(&interfaceCtx->dmaRequest_160, interfaceCtx->iconItemSegment + button * ICON_ITEM_TEX_SIZE,
- (uintptr_t)_icon_item_staticSegmentRomStart +
- (gSaveContext.equips.buttonItems[button] * ICON_ITEM_TEX_SIZE),
- ICON_ITEM_TEX_SIZE, 0, &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 1171);
+ DmaMgr_RequestAsync(&interfaceCtx->dmaRequest_160, interfaceCtx->iconItemSegment + (button * ITEM_ICON_SIZE),
+ GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[button]), ITEM_ICON_SIZE, 0,
+ &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 1171);
osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK);
}
@@ -1309,10 +1308,9 @@ void Interface_LoadItemIcon2(PlayState* play, u16 button) {
InterfaceContext* interfaceCtx = &play->interfaceCtx;
osCreateMesgQueue(&interfaceCtx->loadQueue, &interfaceCtx->loadMsg, 1);
- DmaMgr_RequestAsync(&interfaceCtx->dmaRequest_180, interfaceCtx->iconItemSegment + button * ICON_ITEM_TEX_SIZE,
- (uintptr_t)_icon_item_staticSegmentRomStart +
- (gSaveContext.equips.buttonItems[button] * ICON_ITEM_TEX_SIZE),
- ICON_ITEM_TEX_SIZE, 0, &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 1193);
+ DmaMgr_RequestAsync(&interfaceCtx->dmaRequest_180, interfaceCtx->iconItemSegment + (button * ITEM_ICON_SIZE),
+ GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[button]), ITEM_ICON_SIZE, 0,
+ &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 1193);
osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK);
}
@@ -3375,8 +3373,8 @@ void Interface_Draw(PlayState* play) {
gSPVertex(OVERLAY_DISP++, &pauseCtx->cursorVtx[16], 4, 0);
gDPLoadTextureBlock(OVERLAY_DISP++, gItemIcons[pauseCtx->equipTargetItem], G_IM_FMT_RGBA, G_IM_SIZ_32b,
- 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
- G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
+ ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 0, G_TX_NOMIRROR | G_TX_WRAP,
+ G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
} else {
// Magic Arrow Equip Effect
svar1 = pauseCtx->equipTargetItem - 0xBF;