diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index 4a79bd3bc..4c7443f9f 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -1676,13 +1676,15 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { if (item == ITEM_SWORD_BGS) { gSaveContext.swordHealth = 8; - if (ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xF) { - gSaveContext.inventory.equipment ^= 8 << gEquipShifts[EQUIP_SWORD]; + if (ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xF + ||(gSaveContext.n64ddFlag && ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xE)) { // In rando, when buying Giant's Knife, also check + gSaveContext.inventory.equipment ^= 8 << gEquipShifts[EQUIP_SWORD]; // for 0xE in case we don't have Kokiri Sword if (gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KNIFE) { gSaveContext.equips.buttonItems[0] = ITEM_SWORD_BGS; Interface_LoadItemIcon1(globalCtx, 0); } } + } else if (item == ITEM_SWORD_MASTER) { gSaveContext.equips.buttonItems[0] = ITEM_SWORD_MASTER; gSaveContext.equips.equipment &= 0xFFF0; diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index a7d22e584..863c8ef4a 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -637,24 +637,23 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) { gItemIcons[sAdultUpgradeItemBases[i] + CUR_UPG_VALUE(sAdultUpgrades[i]) - 1], 32, 32, 0); } } - + // Draw inventory screen icons for (k = 0, bit = rowStart, point = 4; k < 3; k++, point += 4, temp++, bit++) { + int itemId = ITEM_SWORD_KOKIRI + temp; + bool age_restricted = (gItemAgeReqs[itemId] != 9) && (gItemAgeReqs[itemId] != gSaveContext.linkAge); + if (age_restricted) { + gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255); + gsSPGrayscale(POLY_KAL_DISP++, true); + } if (((u32)i == 0) && (k == 2) && (gSaveContext.bgsFlag != 0)) { KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gBiggoronSwordIconTex, 32, 32, point); } else if ((i == 0) && (k == 2) && (gBitFlags[bit + 1] & gSaveContext.inventory.equipment)) { KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gBrokenGiantsKnifeIconTex, 32, 32, point); - } - if (gBitFlags[bit] & gSaveContext.inventory.equipment) { - int itemId = ITEM_SWORD_KOKIRI + temp; - bool not_acquired = (gItemAgeReqs[itemId] != 9) && (gItemAgeReqs[itemId] != gSaveContext.linkAge); - if (not_acquired) { - gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255); - gsSPGrayscale(POLY_KAL_DISP++, true); - } + } else if (gBitFlags[bit] & gSaveContext.inventory.equipment) { KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gItemIcons[itemId], 32, 32, point); - gsSPGrayscale(POLY_KAL_DISP++, false); } + gsSPGrayscale(POLY_KAL_DISP++, false); } }