From 1fe862515d4cea739cb3c462914851dcd9eae242 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Tue, 17 Jan 2023 15:42:09 -0500 Subject: [PATCH] fix top left dungeon entrance icon in graveyard (#2303) Co-authored-by: briaguya --- soh/src/code/z_map_exp.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/soh/src/code/z_map_exp.c b/soh/src/code/z_map_exp.c index 33c89fe47..45ae89099 100644 --- a/soh/src/code/z_map_exp.c +++ b/soh/src/code/z_map_exp.c @@ -897,21 +897,17 @@ void Minimap_Draw(PlayState* play) { //No idea why and how Original value work but this does actually fix them all. PosY = PosY+1024; } - if ((gMapData->owEntranceFlag[sEntranceIconMapIndex] == 0xFFFF) || - ((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) && - (gSaveContext.infTable[26] & gBitFlags[gMapData->owEntranceFlag[mapIndex]]))) { + if (((gMapData->owEntranceFlag[sEntranceIconMapIndex] == 0xFFFF) || + ((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) && + (gSaveContext.infTable[26] & gBitFlags[gMapData->owEntranceFlag[mapIndex]]) + )) || CVar_GetS32("gAlwaysShowDungeonMinimapIcon", 0)) { if (!Map0 || !CVar_GetS32("gFixDungeonMinimapIcon", 0)) { gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, IconSize, IconSize, 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); gSPWideTextureRectangle(OVERLAY_DISP++, TopLeftX, TopLeftY, TopLeftW, TopLeftH, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); } - } else if (CVar_GetS32("gAlwaysShowDungeonMinimapIcon", 0) != 0){ //Ability to show entrance Before beating the dungeon itself - gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, - IconSize, IconSize, 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); - gSPWideTextureRectangle(OVERLAY_DISP++, TopLeftX, TopLeftY, TopLeftW, TopLeftH, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); - } + } } s16 entranceX = OTRGetRectDimensionFromRightEdge(270 + X_Margins_Minimap);