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
This commit is contained in:
Archez 2024-05-05 08:16:15 -04:00 committed by GitHub
parent d0bdbd6f53
commit 7a26cca36d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 5 deletions

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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);
}