summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorKiritoDev <36680385+KiritoDv@users.noreply.github.com>2022-06-13 10:18:38 -0500
committerGitHub <noreply@github.com>2022-06-13 10:18:38 -0500
commit8a7aa5fa53d687bfe0a54f84d55a1a70ab22543e (patch)
treefcb759879656128c44f028d87ba950544e3962ba /soh/src/code
parent9e851ebd9371a9c2241a0e87973923c2db69b537 (diff)
parentbda5ba8cbc98fea82ffaab7078e5c5c8e86e586a (diff)
Merge branch 'develop' into zelda64
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/shrink_window.c8
-rw-r--r--soh/src/code/z_actor.c20
-rw-r--r--soh/src/code/z_en_item00.c3
-rw-r--r--soh/src/code/z_map_exp.c13
-rw-r--r--soh/src/code/z_parameter.c2
5 files changed, 31 insertions, 15 deletions
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);
}
diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c
index bdb2fe78c..79a3f4032 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) {
@@ -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;
}
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)) {
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);
diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c
index 57cb53c1a..f53e35b7c 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) {