1
0
mirror of https://github.com/blawar/ooot.git synced 2024-07-02 09:03:36 +00:00

Fixed the Zelda Power effect. (#192)

Co-authored-by: DaMarkov <DaMarkovZED@gmail.com>
This commit is contained in:
DaMarkov 2022-03-02 06:57:31 +01:00 committed by GitHub
parent ed7023f460
commit 618d31e833
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -1558,7 +1558,7 @@ void func_80B56D44(EnZl3* pthis, GlobalContext* globalCtx) {
func_80B564A8(pthis, globalCtx); func_80B564A8(pthis, globalCtx);
} }
void func_80B56DA4(EnZl3* pthis) { void EnZl3_PlayPowerSfx(EnZl3* pthis) {
Common_PlaySfx2(NA_SE_EV_ZELDA_POWER); Common_PlaySfx2(NA_SE_EV_ZELDA_POWER);
} }
@ -1838,7 +1838,7 @@ void func_80B57754(EnZl3* pthis, GlobalContext* globalCtx) {
if (gSaveContext.unk_13F0 == 0) { if (gSaveContext.unk_13F0 == 0) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_OCEFF_WIPE4, pthis->actor.world.pos.x, Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_OCEFF_WIPE4, pthis->actor.world.pos.x,
pthis->actor.world.pos.y, pthis->actor.world.pos.z, 0, 0, 0, 1); pthis->actor.world.pos.y, pthis->actor.world.pos.z, 0, 0, 0, 1);
func_80B56DA4(pthis); EnZl3_PlayPowerSfx(pthis);
} }
} }

View File

@ -3,7 +3,7 @@
/* /*
* File: z_oceff_wipe4.c * File: z_oceff_wipe4.c
* Overlay: ovl_Oceff_Wipe4 * Overlay: ovl_Oceff_Wipe4
* Description: Scarecrow's Song and an unused Ocarina Effect * Description: Scarecrow's Song and an unused Ocarina Effect and used for Zelda during escape
*/ */
#include "z_oceff_wipe4.h" #include "z_oceff_wipe4.h"
@ -14,6 +14,7 @@
#include "def/z_lib.h" #include "def/z_lib.h"
#include "def/z_parameter.h" #include "def/z_parameter.h"
#include "def/z_rcp.h" #include "def/z_rcp.h"
#include "gfx_align.h"
#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
@ -98,7 +99,8 @@ void OceffWipe4_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_80093D84(globalCtx->state.gfxCtx); func_80093D84(globalCtx->state.gfxCtx);
Matrix_Translate(eye.x + vec.x, eye.y + vec.y, eye.z + vec.z, MTXMODE_NEW); Matrix_Translate(eye.x + vec.x, eye.y + vec.y, eye.z + vec.z, MTXMODE_NEW);
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY); const float correction_factor = (gfx_width() * 3.0f) / (gfx_height() * 4.0f); // Should be 1 on a 4:3 display
Matrix_Scale(0.1f * correction_factor, 0.1f, 0.1f, MTXMODE_APPLY);
func_800D1FD4(&globalCtx->billboardMtxF); func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY); Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY);