summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArchez <Archez@users.noreply.github.com>2024-05-05 08:16:15 -0400
committerGitHub <noreply@github.com>2024-05-05 08:16:15 -0400
commit7a26cca36d87d228909c9ecda0dc3403f2b150df (patch)
tree5d8985be666b3df5e3a4d14a68dca6a2916f7aa1 /src
parentd0bdbd6f5308356794d321e7d7480d0436d7a002 (diff)
CLOSE_DISPS fixes and avoid early return (#1621)
* fix en_osn close_disps position * rework en_mnk draw face to avoid returns * use goto in effect draw to avoid returns * feedback
Diffstat (limited to 'src')
-rw-r--r--src/code/z_eff_blure.c2
-rw-r--r--src/overlays/actors/ovl_En_Mnk/z_en_mnk.c6
-rw-r--r--src/overlays/actors/ovl_En_Osn/z_en_osn.c4
3 files changed, 7 insertions, 5 deletions
diff --git a/src/code/z_eff_blure.c b/src/code/z_eff_blure.c
index de9932df8..6ac53632f 100644
--- a/src/code/z_eff_blure.c
+++ b/src/code/z_eff_blure.c
@@ -658,6 +658,7 @@ void EffectBlure_DrawSmooth(EffectBlure* this2, GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx);
if (this->numElements < 2) {
+ //! @bug Skips CLOSE_DISPS
return;
}
@@ -678,6 +679,7 @@ void EffectBlure_DrawSmooth(EffectBlure* this2, GraphicsContext* gfxCtx) {
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &sp5C);
if (mtx == NULL) {
+ //! @bug Skips CLOSE_DISPS
return;
}
diff --git a/src/overlays/actors/ovl_En_Mnk/z_en_mnk.c b/src/overlays/actors/ovl_En_Mnk/z_en_mnk.c
index 62cd6add9..5dcdfaf87 100644
--- a/src/overlays/actors/ovl_En_Mnk/z_en_mnk.c
+++ b/src/overlays/actors/ovl_En_Mnk/z_en_mnk.c
@@ -2203,17 +2203,17 @@ void EnMnk_Monkey_DrawFace(EnMnk* this, PlayState* play) {
} else {
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sMonkeyFaceTextures[this->blinkFrame]));
}
- return;
+ break;
case 2:
case 3:
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sMonkeyFaceTextures[this->unk_3E0]));
- return;
+ break;
default:
+ gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sMonkeyFaceTextures[this->blinkFrame]));
break;
}
- gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sMonkeyFaceTextures[this->blinkFrame]));
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/src/overlays/actors/ovl_En_Osn/z_en_osn.c b/src/overlays/actors/ovl_En_Osn/z_en_osn.c
index 2daba7444..f36cf6c5a 100644
--- a/src/overlays/actors/ovl_En_Osn/z_en_osn.c
+++ b/src/overlays/actors/ovl_En_Osn/z_en_osn.c
@@ -1064,7 +1064,7 @@ void EnOsn_Draw(Actor* thisx, PlayState* play) {
POLY_XLU_DISP =
SkelAnime_DrawFlex(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnOsn_OverrideLimbDraw, EnOsn_PostLimbDraw, &this->actor, POLY_XLU_DISP);
-
- CLOSE_DISPS(play->state.gfxCtx);
}
+
+ CLOSE_DISPS(play->state.gfxCtx);
}