From 447c6514b9b9eb309497e2bae433ca6722792f59 Mon Sep 17 00:00:00 2001 From: silv3rwing07 <62714207+silv3rwing07@users.noreply.github.com> Date: Fri, 15 Jan 2021 13:50:44 -0800 Subject: [PATCH] Fixed descriptions of Zelda's Lullaby, Song of Time, and Scarecrow's Song effect actors (#579) * Fixed descriptions of Zelda's Lullaby, Song of Time, and Scarecrow's Song effect actors * Added enums for song types * fixes Co-authored-by: Fig02 --- src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c | 6 ++++-- src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.h | 5 +++++ src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c | 7 +++++-- src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.h | 5 +++++ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c index f9360755be..1cc40ceb6a 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c +++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c @@ -1,7 +1,7 @@ /* * File: z_oceff_wipe.c * Overlay: ovl_Oceff_Wipe - * Description: Zelda's Lullaby Effect + * Description: Zelda's Lullaby and Song of Time Ocarina Effect */ #include "z_oceff_wipe.h" @@ -37,6 +37,7 @@ u8 sOceffWipeAlphaIndices[] = { void OceffWipe_Init(Actor* thisx, GlobalContext* globalCtx) { OceffWipe* this = THIS; + Actor_SetScale(&this->actor, 0.1f); this->counter = 0; this->actor.posRot.pos = ACTIVE_CAM->eye; @@ -55,6 +56,7 @@ void OceffWipe_Destroy(Actor* thisx, GlobalContext* globalCtx) { void OceffWipe_Update(Actor* thisx, GlobalContext* globalCtx) { OceffWipe* this = THIS; + this->actor.posRot.pos = ACTIVE_CAM->eye; if (this->counter < 100) { this->counter++; @@ -111,7 +113,7 @@ void OceffWipe_Draw(Actor* thisx, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe.c", 375), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - if (this->actor.params) { + if (this->actor.params != OCEFF_WIPE_ZL) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 170, 255, 255, 255); gDPSetEnvColor(POLY_XLU_DISP++, 0, 150, 255, 128); } else { diff --git a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.h b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.h index 3a2950629b..8ed21f5c8b 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.h +++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.h @@ -4,6 +4,11 @@ #include "ultra64.h" #include "global.h" +typedef enum { + /* 0x00 */ OCEFF_WIPE_ZL, + /* 0x01 */ OCEFF_WIPE_SOT +} OceffWipeType; + struct OceffWipe; typedef struct OceffWipe { diff --git a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c index 9d14346fdb..379482ef45 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c +++ b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c @@ -1,7 +1,7 @@ /* * File: z_oceff_wipe4.c * Overlay: ovl_Oceff_Wipe4 - * Description: Song of Time effect + * Description: Scarecrow's Song and an unused Ocarina Effect */ #include "z_oceff_wipe4.h" @@ -32,6 +32,7 @@ const ActorInit Oceff_Wipe4_InitVars = { void OceffWipe4_Init(Actor* thisx, GlobalContext* globalCtx) { OceffWipe4* this = THIS; + Actor_SetScale(&this->actor, 0.1f); this->counter = 0; this->actor.posRot.pos = ACTIVE_CAM->eye; @@ -40,11 +41,13 @@ void OceffWipe4_Init(Actor* thisx, GlobalContext* globalCtx) { void OceffWipe4_Destroy(Actor* thisx, GlobalContext* globalCtx) { OceffWipe4* this = THIS; + func_800876C8(globalCtx); } void OceffWipe4_Update(Actor* thisx, GlobalContext* globalCtx) { OceffWipe4* this = THIS; + this->actor.posRot.pos = ACTIVE_CAM->eye; if (this->counter < 50) { this->counter++; @@ -94,7 +97,7 @@ void OceffWipe4_Draw(Actor* thisx, GlobalContext* globalCtx) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe4.c", 324), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - if (this->actor.params == 1) { + if (this->actor.params == OCEFF_WIPE4_UNUSED) { gSPDisplayList(POLY_XLU_DISP++, sTextureDL1); } else { gSPDisplayList(POLY_XLU_DISP++, sTextureDL0); diff --git a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.h b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.h index 15e81f58e0..53c0f23b70 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.h +++ b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.h @@ -4,6 +4,11 @@ #include "ultra64.h" #include "global.h" +typedef enum { + /* 0x00 */ OCEFF_WIPE4_SCARECROWS, + /* 0x01 */ OCEFF_WIPE4_UNUSED +} OceffWipe4Type; + struct OceffWipe4; typedef struct OceffWipe4 {