FIX: Song's Overlay with Fast Ocarina Playback (#2431)

* FIX: Affected songs

* TWEAK: Addressed comments
This commit is contained in:
PurpleHato 2023-02-06 16:56:40 +01:00 committed by GitHub
parent 8a76a3aa83
commit 3218b2def2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 8 deletions

View File

@ -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) {

View File

@ -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);

View File

@ -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);

View File

@ -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);