diff --git a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c index ff738dc70a..9eebc0fd91 100644 --- a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c +++ b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c @@ -5,7 +5,7 @@ */ #include "z_demo_tre_lgt.h" -#include "../ovl_En_Box/z_en_box.h" +#include "overlays/actors/ovl_En_Box/z_en_box.h" #include "objects/object_box/object_box.h" #define FLAGS (ACTOR_FLAG_10) @@ -58,12 +58,14 @@ static DemoTreLgtActionFunc sActionFuncs[] = { }; void DemoTreLgt_Init(Actor* thisx, GlobalContext* globalCtx) { - DemoTreLgt* this = (DemoTreLgt*)thisx; + DemoTreLgt* this = THIS; + SkelCurve_Init(globalCtx, &this->skelCurve, &gBoxLightCurveSkel, sBoxLightAnimations[0]); this->colorAlpha1 = 255; this->colorAlpha2 = 255; this->status = 0; - if (gSaveContext.playerForm == 0) { + //! @bug Zora Link should also use animationType 0 + if (gSaveContext.playerForm == PLAYER_FORM_FIERCE_DEITY) { this->animationType = 0; } else { this->animationType = 1; @@ -72,7 +74,7 @@ void DemoTreLgt_Init(Actor* thisx, GlobalContext* globalCtx) { } void DemoTreLgt_Destroy(Actor* thisx, GlobalContext* globalCtx) { - DemoTreLgt* this = (DemoTreLgt*)thisx; + DemoTreLgt* this = THIS; SkelCurve_Destroy(globalCtx, &this->skelCurve); } @@ -123,20 +125,20 @@ void DemoTreLgt_Animate(DemoTreLgt* this, GlobalContext* globalCtx) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_TRE_BOX_FLASH); } } - if (SkelCurve_Update(globalCtx, &this->skelCurve) != 0) { + if (SkelCurve_Update(globalCtx, &this->skelCurve)) { Actor_MarkForDeath(&this->actor); } } void DemoTreLgt_Update(Actor* thisx, GlobalContext* globalCtx) { - DemoTreLgt* this = (DemoTreLgt*)thisx; + DemoTreLgt* this = THIS; sActionFuncs[this->action](this, globalCtx); } s32 DemoTreLgt_OverrideLimbDraw(GlobalContext* globalCtx, SkelAnimeCurve* skelCuve, s32 limbIndex, Actor* thisx) { s32 pad; - DemoTreLgt* this = (DemoTreLgt*)thisx; + DemoTreLgt* this = THIS; OPEN_DISPS(globalCtx->state.gfxCtx); @@ -157,7 +159,7 @@ s32 DemoTreLgt_OverrideLimbDraw(GlobalContext* globalCtx, SkelAnimeCurve* skelCu void DemoTreLgt_Draw(Actor* thisx, GlobalContext* globalCtx) { GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - DemoTreLgt* this = (DemoTreLgt*)thisx; + DemoTreLgt* this = THIS; OPEN_DISPS(gfxCtx); if (this->action == DEMO_TRE_LGT_ACTION_ANIMATE) { diff --git a/src/overlays/actors/ovl_En_Box/z_en_box.c b/src/overlays/actors/ovl_En_Box/z_en_box.c index 311ad9aaa3..8029c4988c 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -432,7 +432,7 @@ void func_80868B74(EnBox* this, GlobalContext* globalCtx) { } else { this->dyna.actor.world.pos.y += 1.25f; } - this->unk_1A0 += 1; + this->unk_1A0++; if (this->cutsceneIdxA != -1 && ActorCutscene_GetCurrentIndex() == this->cutsceneIdxA) { if (this->unk_1A0 == 2) { func_800B724C(globalCtx, &this->dyna.actor, 4); @@ -468,6 +468,7 @@ void EnBox_WaitOpen(EnBox* this, GlobalContext* globalCtx) { playbackSpeed = 1.5f; } else { u8 playerForm; + playbackSpeedTable = sPlaybackSpeed; playerForm = gSaveContext.playerForm; animHeader = sAnimations[playerForm]; @@ -521,7 +522,7 @@ void EnBox_Open(EnBox* this, GlobalContext* globalCtx) { this->dyna.actor.flags &= ~ACTOR_FLAG_80; - if (SkelAnime_Update(&this->skelAnime) != 0) { + if (SkelAnime_Update(&this->skelAnime)) { if (this->unk_1EC > 0) { if (this->unk_1EC < 120) { this->unk_1EC++;