1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-08 00:44:42 +00:00

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
This commit is contained in:
Dragorn421 2022-12-13 03:45:54 +01:00 committed by GitHub
parent c420885513
commit 880e7c937c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 369 additions and 336 deletions

View file

@ -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;