From 902b842bcbb9f39f31c148d4064f8559a215b349 Mon Sep 17 00:00:00 2001 From: PurpleHato Date: Thu, 2 Jun 2022 19:14:14 +0200 Subject: FIX: Default Navi's colors have been altered recent merged PRs This fix restore Navi's original colors which have been altered with recent merged PRs --- soh/src/code/z_actor.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'soh/src/code') diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index bdb2fe78c..702ab622a 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -339,19 +339,19 @@ void func_8002BF60(TargetContext* targetCtx, Actor* actor, s32 actorCategory, Gl if (CVar_GetS32("gUseNaviCol",0) != 1 ) { if (actorCategory == ACTORCAT_PLAYER) { naviColor->inner.r = 255; naviColor->inner.g = 255; naviColor->inner.b = 255; - naviColor->outer.r = 115; naviColor->outer.g = 230; naviColor->outer.b = 255; + naviColor->outer.r = 0; naviColor->outer.g = 0; naviColor->outer.b = 255; } if (actorCategory == ACTORCAT_NPC) { - naviColor->inner.r = 100; naviColor->inner.g = 100; naviColor->inner.b = 255; - naviColor->outer.r = 90; naviColor->outer.g = 90; naviColor->outer.b = 255; + naviColor->inner.r = 150; naviColor->inner.g = 150; naviColor->inner.b = 255; + naviColor->outer.r = 150; naviColor->outer.g = 150; naviColor->outer.b = 255; } if (actorCategory == ACTORCAT_BOSS || actorCategory == ACTORCAT_ENEMY) { naviColor->inner.r = 255; naviColor->inner.g = 255; naviColor->inner.b = 0; - naviColor->outer.r = 220; naviColor->outer.g = 220; naviColor->outer.b = 0; + naviColor->outer.r = 220; naviColor->outer.g = 155; naviColor->outer.b = 0; } if (actorCategory == ACTORCAT_PROP) { - naviColor->inner.r = 0; naviColor->inner.g = 255; naviColor->inner.b = 90; - naviColor->outer.r = 0; naviColor->outer.g = 220; naviColor->outer.b = 0; + naviColor->inner.r = 0; naviColor->inner.g = 255; naviColor->inner.b = 0; + naviColor->outer.r = 0; naviColor->outer.g = 255; naviColor->outer.b = 0; } } else { if (actorCategory == ACTORCAT_PLAYER) { -- cgit v1.2.3 From 596d5b478bfbe5e7bcd389877ccd3815c3958721 Mon Sep 17 00:00:00 2001 From: vaguerant Date: Tue, 7 Jun 2022 09:16:47 +1000 Subject: Fix Navi text HUD position (#406) * Fix Navi text HUD position * Force cvar to return 0 or 1 As suggested by Gary * Disable all bug fixes by default per Kenix --- soh/src/code/z_parameter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'soh/src/code') diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index a9e9e4f9e..14d677219 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -2935,7 +2935,7 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { } const s16 rCUpBtnX = OTRGetRectDimensionFromRightEdge(R_C_UP_BTN_X+Right_HUD_Margin); - const s16 rCUPIconX = OTRGetRectDimensionFromRightEdge(R_C_UP_ICON_X+Right_HUD_Margin); + const s16 rCUPIconX = OTRGetRectDimensionFromRightEdge(R_C_UP_ICON_X+Right_HUD_Margin-!!CVar_GetS32("gNaviTextFix", 0)); if (CVar_GetS32("gHudColors", 1) == 0) { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), temp); } else if (CVar_GetS32("gHudColors", 1) == 1) { -- cgit v1.2.3 From ac2127094b0ba1d2c99850a32eb8fe1cd5003055 Mon Sep 17 00:00:00 2001 From: PurpleHato Date: Thu, 9 Jun 2022 00:00:10 +0200 Subject: ADDED: Draw Distance toggle under Experimental enhancement + Bugfix (#398) * ADDED: Draw Distance toggle under Experimental enhancement * FIXED: Dark Link Apparition + Kokiri NPC spawn * Added a Toggle for Kokiri NPC since they are mystics * TWKEA: Desciription got the Kokiri draw distance * FIXED: Horses behavior Fixed Epona shout on title screen + Epona call from songFixed Zelda and Ganon horses that could still be seen on camera pan on the castle escape cinematic --- soh/src/code/z_actor.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'soh/src/code') diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index 702ab622a..79a3f4032 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -1163,7 +1163,9 @@ void Actor_Init(Actor* actor, GlobalContext* globalCtx) { actor->uncullZoneForward = 1000.0f; actor->uncullZoneScale = 350.0f; actor->uncullZoneDownward = 700.0f; - if (CVar_GetS32("gDisableDrawDistance", 0) != 0) { + if (CVar_GetS32("gDisableDrawDistance", 0) != 0 && actor->id != ACTOR_EN_TORCH2 && actor->id != ACTOR_EN_BLKOBJ // Extra check for Dark Link and his room + && actor->id != ACTOR_EN_HORSE // Check for Epona, else if we call her she will spawn at the other side of the map + we can hear her during the title screen sequence + && actor->id != ACTOR_EN_HORSE_GANON && actor->id != ACTOR_EN_HORSE_ZELDA) { // check for Zelda's and Ganondorf's horses that will always be scene during cinematic whith camera paning actor->uncullZoneForward = 32767.0f; actor->uncullZoneScale = 32767.0f; actor->uncullZoneDownward = 32767.0f; @@ -2690,7 +2692,9 @@ s32 func_800314B0(GlobalContext* globalCtx, Actor* actor) { s32 func_800314D4(GlobalContext* globalCtx, Actor* actor, Vec3f* arg2, f32 arg3) { f32 var; - if (CVar_GetS32("gDisableDrawDistance", 0) != 0) { + if (CVar_GetS32("gDisableDrawDistance", 0) != 0 && actor->id != ACTOR_EN_TORCH2 && actor->id != ACTOR_EN_BLKOBJ // Extra check for Dark Link and his room + && actor->id != ACTOR_EN_HORSE // Check for Epona, else if we call her she will spawn at the other side of the map + we can hear her during the title screen sequence + && actor->id != ACTOR_EN_HORSE_GANON && actor->id != ACTOR_EN_HORSE_ZELDA) { // check for Zelda's and Ganondorf's horses that will always be scene during cinematic whith camera paning return true; } -- cgit v1.2.3 From 257cc41d2b537e4a1ef2e6dd0cf6907380abf46d Mon Sep 17 00:00:00 2001 From: Josh Bodner <30329717+jbodner09@users.noreply.github.com> Date: Thu, 9 Jun 2022 14:28:58 -0700 Subject: Stop the dropped item despawn timer on demand (#382) * Stop the despawn timer on demand * But do make them disappear once they're collected! --- soh/src/code/z_en_item00.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'soh/src/code') diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c index d0179a5e1..a7de67900 100644 --- a/soh/src/code/z_en_item00.c +++ b/soh/src/code/z_en_item00.c @@ -896,6 +896,9 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { if (this->unk_15A > 0) { this->unk_15A--; + if (CVar_GetS32("gDropsDontDie", 0) && (this->unk_154 <= 0)) { + this->unk_15A++; + } } if ((this->unk_15A > 0) && (this->unk_15A < 41) && (this->unk_154 <= 0)) { -- cgit v1.2.3 From 1cb3cd550970f86e167f94d3eda21923fc9b9852 Mon Sep 17 00:00:00 2001 From: BountyChocolate123456 <101743444+BountyChocolate123456@users.noreply.github.com> Date: Sat, 11 Jun 2022 17:07:13 +0100 Subject: #243 Add option to disable black bars letterboxes (#376) * #243 Add option to disable black bars letterboxes * #243 Add option to disable black bars letterboxes * Update libultraship/libultraship/SohImGuiImpl.cpp * Update libultraship/libultraship/SohImGuiImpl.cpp * Update libultraship/libultraship/SohImGuiImpl.cpp Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com> * Add new line Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com> --- soh/src/code/shrink_window.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'soh/src/code') diff --git a/soh/src/code/shrink_window.c b/soh/src/code/shrink_window.c index cc68129e2..ee7822df0 100644 --- a/soh/src/code/shrink_window.c +++ b/soh/src/code/shrink_window.c @@ -6,6 +6,10 @@ s32 sShrinkWindowVal = 0; s32 sShrinkWindowCurrentVal = 0; void ShrinkWindow_SetVal(s32 value) { + if (CVar_GetS32("gDisableBlackBars", 0)) { + sShrinkWindowVal = 0; + return; + } if (HREG(80) == 0x13 && HREG(81) == 1) { osSyncPrintf("shrink_window_setval(%d)\n", value); } @@ -17,6 +21,10 @@ u32 ShrinkWindow_GetVal(void) { } void ShrinkWindow_SetCurrentVal(s32 currentVal) { + if (CVar_GetS32("gDisableBlackBars", 0)) { + sShrinkWindowCurrentVal = 0; + return; + } if (HREG(80) == 0x13 && HREG(81) == 1) { osSyncPrintf("shrink_window_setnowval(%d)\n", currentVal); } -- cgit v1.2.3 From a46bee95350c6dca91486227720ad4da0c6c984f Mon Sep 17 00:00:00 2001 From: vaguerant Date: Sun, 12 Jun 2022 02:13:09 +1000 Subject: Unfix dungeon map icon when bugfix CVar is off (#455) * Unfix dungeon map icon when bugfix CVar is off * Big brain optimization by @InfoManiac742 --- soh/src/code/z_map_exp.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'soh/src/code') diff --git a/soh/src/code/z_map_exp.c b/soh/src/code/z_map_exp.c index 5402cee44..aaee434b0 100644 --- a/soh/src/code/z_map_exp.c +++ b/soh/src/code/z_map_exp.c @@ -755,22 +755,23 @@ void Minimap_Draw(GlobalContext* globalCtx) { if (((globalCtx->sceneNum != SCENE_SPOT01) && (globalCtx->sceneNum != SCENE_SPOT04) && (globalCtx->sceneNum != SCENE_SPOT08)) || (LINK_AGE_IN_YEARS != YEARS_ADULT)) { + bool Map0 = gMapData->owEntranceIconPosY[sEntranceIconMapIndex] << 2 == 0; s16 IconSize = 8; - s16 PosX = gMapData->owEntranceIconPosX[sEntranceIconMapIndex]+Right_MM_Margin; - s16 PosY = gMapData->owEntranceIconPosY[sEntranceIconMapIndex]+Bottom_MM_Margin; + s16 PosX = gMapData->owEntranceIconPosX[sEntranceIconMapIndex] + (Map0 ? 0 : Right_MM_Margin); + s16 PosY = gMapData->owEntranceIconPosY[sEntranceIconMapIndex] + (Map0 ? 0 : Bottom_MM_Margin); //gFixDungeonMinimapIcon fix both Y position of visible icon and hide these non needed. - if (CVar_GetS32("gFixDungeonMinimapIcon", 1) != 0){ + if (CVar_GetS32("gFixDungeonMinimapIcon", 0) != 0){ //No idea why and how Original value work but this does actually fix them all. PosY = PosY+1024; } - s16 TopLeftX = OTRGetRectDimensionFromRightEdge(PosX) << 2; + s16 TopLeftX = (Map0 ? OTRGetRectDimensionFromLeftEdge(PosX) : OTRGetRectDimensionFromRightEdge(PosX)) << 2; s16 TopLeftY = PosY << 2; - s16 TopLeftW = OTRGetRectDimensionFromRightEdge(PosX + IconSize) << 2; + s16 TopLeftW = (Map0 ? OTRGetRectDimensionFromLeftEdge(PosX + IconSize) : OTRGetRectDimensionFromRightEdge(PosX + IconSize)) << 2; s16 TopLeftH = (PosY + IconSize) << 2; if ((gMapData->owEntranceFlag[sEntranceIconMapIndex] == 0xFFFF) || ((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) && (gSaveContext.infTable[26] & gBitFlags[gMapData->owEntranceFlag[mapIndex]]))) { - if (gMapData->owEntranceIconPosY[sEntranceIconMapIndex] << 2 != 0 && CVar_GetS32("gFixDungeonMinimapIcon", 1) != 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); -- cgit v1.2.3