Skip to content

Commit

Permalink
fix some actor shadow textures not updating (HarbourMasters#758)
Browse files Browse the repository at this point in the history
  • Loading branch information
Archez authored Sep 8, 2024
1 parent 466a716 commit 6ff3be9
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mm/src/code/z_sub_s.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,8 @@ void SubS_DrawShadowTex(Actor* actor, GameState* gameState, u8* tex) {

OPEN_DISPS(gfxCtx);

gSPInvalidateTexCache(POLY_OPA_DISP++, tex);

Gfx_SetupDL25_Opa(gfxCtx);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, 100);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0);
Expand Down
2 changes: 2 additions & 0 deletions mm/src/overlays/actors/ovl_Boss_01/z_boss_01.c
Original file line number Diff line number Diff line change
Expand Up @@ -3108,6 +3108,8 @@ void Boss01_DrawShadowTex(u8* tex, Boss01* this, PlayState* play) {

OPEN_DISPS(gfxCtx);

gSPInvalidateTexCache(POLY_OPA_DISP++, tex);

Gfx_SetupDL25_Opa(play->state.gfxCtx);

alpha = (400.0f - this->actor.world.pos.y) * (1.0f / 400.0f);
Expand Down
2 changes: 2 additions & 0 deletions mm/src/overlays/actors/ovl_Boss_07/z_boss_07.c
Original file line number Diff line number Diff line change
Expand Up @@ -2935,6 +2935,8 @@ void Boss07_Wrath_DrawShadowTex(u8* shadowTex, Boss07* this, PlayState* play) {

OPEN_DISPS(gfxCtx);

gSPInvalidateTexCache(POLY_OPA_DISP++, shadowTex);

Gfx_SetupDL25_Opa(play->state.gfxCtx);
phi_f0 = (400.0f - this->actor.world.pos.y) * 0.0025f;
phi_f0 = CLAMP_MIN(phi_f0, 0.0f);
Expand Down
2 changes: 2 additions & 0 deletions mm/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -3066,6 +3066,8 @@ void BossHakugin_DrawShadowTex(u8* tex, BossHakugin* this, PlayState* play) {

OPEN_DISPS(gfxCtx);

gSPInvalidateTexCache(POLY_OPA_DISP++, tex);

Gfx_SetupDL25_Opa(play->state.gfxCtx);

alpha = (400.0f - this->actor.world.pos.y) * (1.0f / 400.0f);
Expand Down
1 change: 1 addition & 0 deletions mm/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,7 @@ void EnKanban_Draw(Actor* thisx, PlayState* play) {
}
}

gSPInvalidateTexCache(POLY_XLU_DISP++, shadowTex);
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(shadowTex));
gSPDisplayList(POLY_XLU_DISP++, gEnKanban_D_80957DE0);
}
Expand Down
2 changes: 2 additions & 0 deletions mm/src/overlays/actors/ovl_En_Sda/z_en_sda.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ void func_80947668(u8* shadowTexture, Player* player, PlayState* play) {

OPEN_DISPS(gfxCtx);

gSPInvalidateTexCache(POLY_XLU_DISP++, shadowTexture);

Gfx_SetupDL44_Xlu(play->state.gfxCtx);

gDPSetPrimColor(POLY_XLU_DISP++, 0x00, 0x00, 0, 0, 0, (BREG(52) + 50));
Expand Down

0 comments on commit 6ff3be9

Please sign in to comment.