mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 06:24:30 +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:
parent
c420885513
commit
880e7c937c
17 changed files with 369 additions and 336 deletions
|
@ -1133,7 +1133,7 @@ s32 EnOssan_HasPlayerSelectedItem(PlayState* play, EnOssan* this, Input* input)
|
|||
case SI_MILK_BOTTLE:
|
||||
func_80078884(NA_SE_SY_DECIDE);
|
||||
this->drawCursor = 0;
|
||||
this->stateFlag = OSSAN_STATE_SELECT_ITEM_MILK_BOTTLE;
|
||||
this->stateFlag = OSSAN_STATE_SELECT_ITEM_BOTTLE_MILK_FULL;
|
||||
return true;
|
||||
case SI_WEIRD_EGG:
|
||||
func_80078884(NA_SE_SY_DECIDE);
|
||||
|
@ -1840,7 +1840,8 @@ void EnOssan_UpdateItemSelectedProperty(EnOssan* this) {
|
|||
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (temp_a1[0] != NULL) {
|
||||
if (this->stateFlag != OSSAN_STATE_SELECT_ITEM && this->stateFlag != OSSAN_STATE_SELECT_ITEM_MILK_BOTTLE &&
|
||||
if (this->stateFlag != OSSAN_STATE_SELECT_ITEM &&
|
||||
this->stateFlag != OSSAN_STATE_SELECT_ITEM_BOTTLE_MILK_FULL &&
|
||||
this->stateFlag != OSSAN_STATE_SELECT_ITEM_WEIRD_EGG &&
|
||||
this->stateFlag != OSSAN_STATE_SELECT_ITEM_UNIMPLEMENTED &&
|
||||
this->stateFlag != OSSAN_STATE_SELECT_ITEM_BOMBS && this->stateFlag != OSSAN_STATE_SELECT_ITEM_MASK &&
|
||||
|
|
|
@ -108,7 +108,7 @@ typedef enum {
|
|||
/* 07 */ OSSAN_STATE_BROWSE_RIGHT_SHELF,
|
||||
/* 08 */ OSSAN_STATE_LOOK_SHOPKEEPER, // From looking at shelf
|
||||
/* 09 */ OSSAN_STATE_SELECT_ITEM, // Select most items
|
||||
/* 10 */ OSSAN_STATE_SELECT_ITEM_MILK_BOTTLE,
|
||||
/* 10 */ OSSAN_STATE_SELECT_ITEM_BOTTLE_MILK_FULL,
|
||||
/* 11 */ OSSAN_STATE_SELECT_ITEM_WEIRD_EGG,
|
||||
/* 12 */ OSSAN_STATE_SELECT_ITEM_UNIMPLEMENTED, // Handles two unfinished shop items
|
||||
/* 13 */ OSSAN_STATE_SELECT_ITEM_BOMBS,
|
||||
|
|
|
@ -30,7 +30,11 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
static void* D_8082A130[] = {
|
||||
gOcarinaATex, gOcarinaCDownTex, gOcarinaCRightTex, gOcarinaCLeftTex, gOcarinaCUpTex,
|
||||
gOcarinaBtnIconATex, // OCARINA_BTN_A
|
||||
gOcarinaBtnIconCDownTex, // OCARINA_BTN_C_DOWN
|
||||
gOcarinaBtnIconCRightTex, // OCARINA_BTN_C_RIGHT
|
||||
gOcarinaBtnIconCLeftTex, // OCARINA_BTN_C_LEFT
|
||||
gOcarinaBtnIconCUpTex, // OCARINA_BTN_C_UP
|
||||
};
|
||||
static u16 D_8082A144[] = {
|
||||
0xFFCC, 0xFFCC, 0xFFCC, 0xFFCC, 0xFFCC,
|
||||
|
@ -333,7 +337,8 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
gDPSetEnvColor(POLY_OPA_DISP++, D_8082A0D8[sp218], D_8082A0E4[sp218], D_8082A0F0[sp218], 0);
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[sp21A], 4, 0);
|
||||
|
||||
KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_MEDALLION_FOREST + sp218], 24, 24, 0);
|
||||
KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_MEDALLION_FOREST + sp218], QUEST_ICON_WIDTH,
|
||||
QUEST_ICON_HEIGHT, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -381,7 +386,8 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
for (sp218 = 0; sp218 < 3; sp218++, sp21A += 4) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD + sp218)) {
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[sp21A], 4, 0);
|
||||
KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_KOKIRI_EMERALD + sp218], 24, 24, 0);
|
||||
KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_KOKIRI_EMERALD + sp218], QUEST_ICON_WIDTH,
|
||||
QUEST_ICON_HEIGHT, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -392,7 +398,8 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
if (CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY + sp218)) {
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[sp21A], 4, 0);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
|
||||
KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_STONE_OF_AGONY + sp218], 24, 24, 0);
|
||||
KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_STONE_OF_AGONY + sp218], QUEST_ICON_WIDTH,
|
||||
QUEST_ICON_HEIGHT, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -449,7 +456,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
|
||||
POLY_OPA_DISP = KaleidoScope_QuadTextureIA8(
|
||||
POLY_OPA_DISP,
|
||||
gItemIcons[0x79 +
|
||||
gItemIcons[ITEM_HEART_PIECE_2 - 1 +
|
||||
(((gSaveContext.inventory.questItems & 0xF0000000) & 0xF0000000) >> QUEST_HEART_PIECE_COUNT)],
|
||||
48, 48, 0);
|
||||
}
|
||||
|
|
|
@ -555,29 +555,32 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
|||
if (1) {}
|
||||
if ((point != 0) && (CUR_UPG_VALUE(sChildUpgrades[i]) != 0)) {
|
||||
KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx,
|
||||
gItemIcons[sChildUpgradeItemBases[i] + point - 1], 32, 32, 0);
|
||||
gItemIcons[sChildUpgradeItemBases[i] + point - 1], ITEM_ICON_WIDTH,
|
||||
ITEM_ICON_HEIGHT, 0);
|
||||
}
|
||||
} else {
|
||||
if ((i == 0) && (CUR_UPG_VALUE(sAdultUpgrades[i]) == 0)) {
|
||||
KaleidoScope_DrawQuadTextureRGBA32(
|
||||
play->state.gfxCtx, gItemIcons[sChildUpgradeItemBases[i] + CUR_UPG_VALUE(sChildUpgrades[i]) - 1],
|
||||
32, 32, 0);
|
||||
ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 0);
|
||||
} else if (CUR_UPG_VALUE(sAdultUpgrades[i]) != 0) {
|
||||
KaleidoScope_DrawQuadTextureRGBA32(
|
||||
play->state.gfxCtx, gItemIcons[sAdultUpgradeItemBases[i] + CUR_UPG_VALUE(sAdultUpgrades[i]) - 1],
|
||||
32, 32, 0);
|
||||
ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 0);
|
||||
}
|
||||
}
|
||||
|
||||
for (k = 0, bit = rowStart, point = 4; k < 3; k++, point += 4, temp++, bit++) {
|
||||
|
||||
if (((u32)i == 0) && (k == 2) && (gSaveContext.bgsFlag != 0)) {
|
||||
KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gBiggoronSwordIconTex, 32, 32, point);
|
||||
KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIconSwordBiggoronTex, ITEM_ICON_WIDTH,
|
||||
ITEM_ICON_HEIGHT, point);
|
||||
} else if ((i == 0) && (k == 2) && (gBitFlags[bit + 1] & gSaveContext.inventory.equipment)) {
|
||||
KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gBrokenGiantsKnifeIconTex, 32, 32, point);
|
||||
KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIconBrokenGiantsKnifeTex, ITEM_ICON_WIDTH,
|
||||
ITEM_ICON_HEIGHT, point);
|
||||
} else if (gBitFlags[bit] & gSaveContext.inventory.equipment) {
|
||||
KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIcons[ITEM_SWORD_KOKIRI + temp], 32, 32,
|
||||
point);
|
||||
KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIcons[ITEM_SWORD_KOKIRI + temp],
|
||||
ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, point);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -467,8 +467,8 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
|||
}
|
||||
|
||||
gSPVertex(POLY_OPA_DISP++, &pauseCtx->itemVtx[j + 0], 4, 0);
|
||||
KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIcons[gSaveContext.inventory.items[i]], 32, 32,
|
||||
0);
|
||||
KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIcons[gSaveContext.inventory.items[i]],
|
||||
ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
static void* dungeonItemTexs[] = {
|
||||
gBossKeyIconTex,
|
||||
gCompassIconTex,
|
||||
gDungeonMapIconTex,
|
||||
gQuestIconDungeonBossKeyTex,
|
||||
gQuestIconDungeonCompassTex,
|
||||
gQuestIconDungeonMapTex,
|
||||
};
|
||||
static void* dungeonTitleTexs[] = {
|
||||
gPauseDekuTitleENGTex, gPauseDodongoTitleENGTex, gPauseJabuTitleENGTex, gPauseForestTitleENGTex,
|
||||
|
@ -302,7 +302,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
|
||||
|
||||
if (GET_GS_FLAGS(gSaveContext.mapIndex) == gAreaGsFlags[gSaveContext.mapIndex]) {
|
||||
KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gGoldSkulltulaIconTex, 24, 24, 8);
|
||||
KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gQuestIconGoldSkulltulaTex, QUEST_ICON_WIDTH, QUEST_ICON_HEIGHT, 8);
|
||||
}
|
||||
|
||||
if ((play->sceneId >= SCENE_DEKU_TREE) && (play->sceneId <= SCENE_TREASURE_BOX_SHOP)) {
|
||||
|
|
|
@ -1184,7 +1184,8 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
|||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0);
|
||||
|
||||
KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gGoldSkulltulaIconTex, 24, 24, 0);
|
||||
KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gQuestIconGoldSkulltulaTex, QUEST_ICON_WIDTH,
|
||||
QUEST_ICON_HEIGHT, 0);
|
||||
}
|
||||
}
|
||||
} else if ((pauseCtx->unk_1E4 < 3) || (pauseCtx->unk_1E4 == 7) || (pauseCtx->unk_1E4 == 8)) {
|
||||
|
@ -2550,7 +2551,8 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
|
||||
for (i = 0; i < ARRAY_COUNTU(gItemAgeReqs); i++) {
|
||||
if ((gItemAgeReqs[i] != 9) && (gItemAgeReqs[i] != ((void)0, gSaveContext.linkAge))) {
|
||||
KaleidoScope_GrayOutTextureRGBA32(SEGMENTED_TO_VIRTUAL(gItemIcons[i]), 0x400);
|
||||
KaleidoScope_GrayOutTextureRGBA32(SEGMENTED_TO_VIRTUAL(gItemIcons[i]),
|
||||
ITEM_ICON_WIDTH * ITEM_ICON_HEIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue