mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
ADD: Widescreen Ocarina Effects (#219)
* ADD: Widescreen Ocarina Effect * TWEAK: remove unecessary reassignment * TWEAK: better assignments * TWEAK: forgot some vanilla value
This commit is contained in:
@@ -77,10 +77,21 @@ void OceffWipe_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (this->counter < 32) {
|
||||
z = Math_SinS(this->counter << 9) * 1360.0f;
|
||||
// #region 2S2H [Widescreen] Ocarina Effects
|
||||
f32 effectDistance;
|
||||
s32 x = OTRGetRectDimensionFromLeftEdge(0) << 2;
|
||||
if (x < 0) {
|
||||
// Only render if the screen is wider then original
|
||||
effectDistance = 1360.0f / (OTRGetAspectRatio() * 0.85f); // Widescreen value
|
||||
} else {
|
||||
z = 1360.0f;
|
||||
effectDistance = 1360.0f; // Vanilla value
|
||||
}
|
||||
// #endregion
|
||||
|
||||
if (this->counter < 32) {
|
||||
z = Math_SinS(this->counter << 9) * effectDistance;
|
||||
} else {
|
||||
z = effectDistance;
|
||||
}
|
||||
|
||||
if (this->counter >= 80) {
|
||||
|
||||
@@ -71,10 +71,19 @@ void OceffWipe2_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
vtxPtr = ResourceMgr_LoadVtxByName(sEponaSongFrustumVtx);
|
||||
|
||||
// #region 2S2H [Widescreen] Ocarina Effects
|
||||
f32 effectDistance = 1220.0f; // Vanilla value
|
||||
s32 x = OTRGetRectDimensionFromLeftEdge(0) << 2;
|
||||
if (x < 0) {
|
||||
// Only render if the screen is wider then original
|
||||
effectDistance = 1220.0f / (OTRGetAspectRatio() * 0.85f); // Widescreen value
|
||||
}
|
||||
// #endregion
|
||||
|
||||
if (this->timer < 32) {
|
||||
z = Math_SinS(this->timer * 0x200) * 1220.0f;
|
||||
z = Math_SinS(this->timer * 0x200) * effectDistance;
|
||||
} else {
|
||||
z = 1220.0f;
|
||||
z = effectDistance;
|
||||
}
|
||||
|
||||
if (this->timer >= 80) {
|
||||
|
||||
@@ -72,10 +72,19 @@ void OceffWipe3_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
vtxPtr = ResourceMgr_LoadVtxByName(sSariaSongFrustumVtx);
|
||||
|
||||
// #region 2S2H [Widescreen] Ocarina Effects
|
||||
f32 effectDistance = 1220.0f; // Vanilla value
|
||||
s32 x = OTRGetRectDimensionFromLeftEdge(0) << 2;
|
||||
if (x < 0) {
|
||||
// Only render if the screen is wider then original
|
||||
effectDistance = 1220.0f / (OTRGetAspectRatio() * 0.85f); // Widescreen value
|
||||
}
|
||||
// #endregion
|
||||
|
||||
if (this->counter < 32) {
|
||||
z = Math_SinS(this->counter * 512) * 1220.0f;
|
||||
z = Math_SinS(this->counter * 512) * effectDistance;
|
||||
} else {
|
||||
z = 1220.0f;
|
||||
z = effectDistance;
|
||||
}
|
||||
|
||||
if (this->counter >= 80) {
|
||||
|
||||
@@ -69,10 +69,19 @@ void OceffWipe4_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
quakeOffset = Camera_GetQuakeOffset(GET_ACTIVE_CAM(play));
|
||||
|
||||
// #region 2S2H [Widescreen] Ocarina Effects
|
||||
f32 effectDistance = 1220.0f; // Vanilla value
|
||||
s32 x = OTRGetRectDimensionFromLeftEdge(0) << 2;
|
||||
if (x < 0) {
|
||||
// Only render if the screen is wider then original
|
||||
effectDistance = 1220.0f / (OTRGetAspectRatio() * 0.85f); // Widescreen value
|
||||
}
|
||||
// #endregion
|
||||
|
||||
if (this->counter < 16) {
|
||||
z = Math_SinS(this->counter * 0x400) * 1220.0f;
|
||||
z = Math_SinS(this->counter * 0x400) * effectDistance;
|
||||
} else {
|
||||
z = 1220.0f;
|
||||
z = effectDistance;
|
||||
}
|
||||
|
||||
vtxPtr = ResourceMgr_LoadVtxByName(sScarecrowSongFrustumVtx);
|
||||
|
||||
@@ -82,10 +82,25 @@ void OceffWipe5_Draw(Actor* thisx, PlayState* play) {
|
||||
s32 colorIndex = OCEFF_WIPE5_GET_SONG_TYPE(thisx) * 3;
|
||||
f32 phi_fv1 = 1220.0f;
|
||||
|
||||
// #region 2S2H [Widescreen] Ocarina Effects
|
||||
s32 x = OTRGetRectDimensionFromLeftEdge(0) << 2;
|
||||
if (x < 0) {
|
||||
// Only render if the screen is wider then original
|
||||
phi_fv1 = 1220.0f / (OTRGetAspectRatio() * 0.85f); // Widescreen value
|
||||
}
|
||||
// #endregion
|
||||
|
||||
if ((((OCEFF_WIPE5_GET_SONG_TYPE(thisx) == 2) && (play->sceneId == SCENE_LABO)) &&
|
||||
((play->csCtx.scriptIndex == 0) || (play->csCtx.scriptIndex == 1))) &&
|
||||
(play->csCtx.state != CS_STATE_IDLE)) {
|
||||
phi_fv1 = 1150.0f;
|
||||
// #region 2S2H [Widescreen] Ocarina Effects
|
||||
if (x < 0) {
|
||||
// Only render if the screen is wider then original
|
||||
phi_fv1 = 1150.0f / (OTRGetAspectRatio() * 0.85f); // Widescreen value
|
||||
} else {
|
||||
phi_fv1 = 1150.0f; // Vanilla value
|
||||
}
|
||||
// #endregion
|
||||
}
|
||||
|
||||
if (colorIndex >= 13) {
|
||||
|
||||
@@ -72,11 +72,20 @@ void OceffWipe6_Draw(Actor* thisx, PlayState* play) {
|
||||
activeCamEye = GET_ACTIVE_CAM(play)->eye;
|
||||
quakeOffset = Camera_GetQuakeOffset(GET_ACTIVE_CAM(play));
|
||||
|
||||
// #region 2S2H [Widescreen] Ocarina Effects
|
||||
f32 effectDistance = 1220.0f; // Vanilla value
|
||||
s32 x = OTRGetRectDimensionFromLeftEdge(0) << 2;
|
||||
if (x < 0) {
|
||||
// Only render if the screen is wider then original
|
||||
effectDistance = 1220.0f / (OTRGetAspectRatio() * 0.85f); // Widescreen value
|
||||
}
|
||||
// #endregion
|
||||
|
||||
if (this->counter < 32) {
|
||||
counter = this->counter;
|
||||
z = Math_SinS(counter * 0x200) * 1220.0f;
|
||||
z = Math_SinS(counter * 0x200) * effectDistance;
|
||||
} else {
|
||||
z = 1220.0f;
|
||||
z = effectDistance;
|
||||
}
|
||||
|
||||
if (this->counter >= 80) {
|
||||
|
||||
@@ -74,10 +74,19 @@ void OceffWipe7_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
quakeOffset = Camera_GetQuakeOffset(GET_ACTIVE_CAM(play));
|
||||
|
||||
// #region 2S2H [Widescreen] Ocarina Effects
|
||||
f32 effectDistance = 1220.0f; // Vanilla value
|
||||
s32 x = OTRGetRectDimensionFromLeftEdge(0) << 2;
|
||||
if (x < 0) {
|
||||
// Only render if the screen is wider then original
|
||||
effectDistance = 1220.0f / (OTRGetAspectRatio() * 0.85f); // Widescreen value
|
||||
}
|
||||
// #endregion
|
||||
|
||||
if (this->counter < 32) {
|
||||
z = Math_SinS(this->counter * 0x200) * 1220.0f;
|
||||
z = Math_SinS(this->counter * 0x200) * effectDistance;
|
||||
} else {
|
||||
z = 1220.0f;
|
||||
z = effectDistance;
|
||||
}
|
||||
|
||||
if (this->counter >= 80) {
|
||||
|
||||
Reference in New Issue
Block a user