summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPurpleHato <linkvssangoku.jr@gmail.com>2023-02-06 16:56:40 +0100
committerGitHub <noreply@github.com>2023-02-06 10:56:40 -0500
commit3218b2def281efe4cb24dfaaf64706298279d9bd (patch)
treec23c2460d2bd799242392a8280fe56855246d0eb
parent8a76a3aa83c3578a612baef7d19ae838ffdc75bc (diff)
FIX: Song's Overlay with Fast Ocarina Playback (#2431)
* FIX: Affected songs * TWEAK: Addressed comments
-rw-r--r--soh/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c5
-rw-r--r--soh/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c6
-rw-r--r--soh/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c6
-rw-r--r--soh/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c6
4 files changed, 15 insertions, 8 deletions
diff --git a/soh/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/soh/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c
index a8e6637d7..2daa546a2 100644
--- a/soh/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c
+++ b/soh/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c
@@ -80,10 +80,11 @@ void OceffWipe_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx);
+ int fastOcarinaPlayback = (CVarGetInteger("gFastOcarinaPlayback", 0) != 0);
if (this->timer < 32) {
- z = Math_SinS(this->timer << 9) * 1400;
+ z = Math_SinS(this->timer << 9) * (fastOcarinaPlayback ? 1200.0f : 1400.0f);
} else {
- z = 1400;
+ z = fastOcarinaPlayback ? 1200.0f : 1400.0f;
}
if (this->timer >= 80) {
diff --git a/soh/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c b/soh/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c
index 2d143b8a8..44c47e116 100644
--- a/soh/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c
+++ b/soh/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c
@@ -71,10 +71,12 @@ void OceffWipe2_Draw(Actor* thisx, PlayState* play) {
eye = GET_ACTIVE_CAM(play)->eye;
Camera_GetSkyboxOffset(&vec, GET_ACTIVE_CAM(play));
+
+ int fastOcarinaPlayback = (CVarGetInteger("gFastOcarinaPlayback", 0) != 0);
if (this->timer < 32) {
- z = Math_SinS(this->timer << 9) * 1330;
+ z = Math_SinS(this->timer << 9) * (fastOcarinaPlayback ? 1200.0f : 1330.0f);
} else {
- z = 1330;
+ z = fastOcarinaPlayback ? 1200.0f : 1330.0f;
}
vtxPtr = ResourceMgr_LoadVtxByName(sFrustumVtx);
diff --git a/soh/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c b/soh/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c
index f1a36a894..e73cb0101 100644
--- a/soh/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c
+++ b/soh/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c
@@ -72,10 +72,12 @@ void OceffWipe3_Draw(Actor* thisx, PlayState* play) {
eye = GET_ACTIVE_CAM(play)->eye;
Camera_GetSkyboxOffset(&vec, GET_ACTIVE_CAM(play));
+
+ int fastOcarinaPlayback = (CVarGetInteger("gFastOcarinaPlayback", 0) != 0);
if (this->counter < 32) {
- z = Math_SinS(this->counter << 9) * 1330;
+ z = Math_SinS(this->counter << 9) * (fastOcarinaPlayback ? 1200.0f : 1330.0f);
} else {
- z = 1330;
+ z = fastOcarinaPlayback ? 1200.0f : 1330.0f;
}
vtxPtr = ResourceMgr_LoadVtxByName(sFrustumVtx);
diff --git a/soh/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c b/soh/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c
index 8e46acbba..d668349c0 100644
--- a/soh/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c
+++ b/soh/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c
@@ -67,10 +67,12 @@ void OceffWipe4_Draw(Actor* thisx, PlayState* play) {
eye = GET_ACTIVE_CAM(play)->eye;
Camera_GetSkyboxOffset(&vec, GET_ACTIVE_CAM(play));
+
+ int fastOcarinaPlayback = (CVarGetInteger("gFastOcarinaPlayback", 0) != 0);
if (this->timer < 16) {
- z = Math_SinS(this->timer * 1024) * 1330.0f;
+ z = Math_SinS(this->timer * 1024) * (fastOcarinaPlayback ? 1200.0f : 1330.0f);
} else {
- z = 1330.0f;
+ z = fastOcarinaPlayback ? 1200.0f : 1330.0f;
}
vtxPtr = ResourceMgr_LoadVtxByName(sFrustumVtx);