From e0d9bd24939ff0f0533bb218c2140d4a6d9e2654 Mon Sep 17 00:00:00 2001 From: Garrett Cox Date: Fri, 19 Jan 2024 22:22:03 +0000 Subject: [PATCH] Temporary fix for skull kid XLU crash (#74) * Temporary fix for skull kid XLU crash * Update z_dm_stk.c --------- Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com> --- mm/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mm/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c b/mm/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c index 5feb13536..1e3890b74 100644 --- a/mm/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c +++ b/mm/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c @@ -2105,13 +2105,16 @@ void DmStk_Draw(Actor* thisx, PlayState* play) { if (this->alpha < 255) { Gfx_SetupDL25_Xlu(play->state.gfxCtx); Scene_SetRenderModeXlu(play, 1, 2); + // BENTODO + // #region 2S2H [TODO] This should be XLU, but it crashes because for some reason the limbs are attempting to + // render before the DrawFlex matrix is added to the segment (or something, not really certain) + gDPPipeSync(POLY_OPA_DISP++); + gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, this->alpha); - gDPPipeSync(POLY_XLU_DISP++); - gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha); - - POLY_XLU_DISP = + POLY_OPA_DISP = SkelAnime_DrawFlex(play, this->skelAnime.skeleton, this->skelAnime.jointTable, - this->skelAnime.dListCount, NULL, DmStk_PostLimbDraw2, &this->actor, POLY_XLU_DISP); + this->skelAnime.dListCount, NULL, DmStk_PostLimbDraw2, &this->actor, POLY_OPA_DISP); + // #endregion } else { Scene_SetRenderModeXlu(play, 0, 1);