summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSonic Dreamcaster <alejandro.asenjo88@gmail.com>2025-04-03 14:03:45 -0300
committerSonic Dreamcaster <alejandro.asenjo88@gmail.com>2025-04-03 14:03:45 -0300
commitfc87a68896f9d2905dc67c0327ae2b87710cbb86 (patch)
tree7b8325a663ff1d08e2e2ee68519997d1059e71ec
parenta69167abe7502cb0b3396d1a915b4edaf7c122de (diff)
fix train and landmaster wheel rotation
-rw-r--r--src/engine/fox_tank.c1
-rw-r--r--src/overlays/ovl_i5/fox_ma.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c
index 70f44f7e..94174cb5 100644
--- a/src/engine/fox_tank.c
+++ b/src/engine/fox_tank.c
@@ -53,6 +53,7 @@ void func_tank_80043280(u16* text0, u16* text1, f32 zRot) {
}
}
Matrix_Pop(&gCalcMatrix);
+ gSPInvalidateTexCache(gMasterDisp++, text0);
}
void Player_UpdateTankCamOnRails(Player* player) {
diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c
index d8abc023..414d0090 100644
--- a/src/overlays/ovl_i5/fox_ma.c
+++ b/src/overlays/ovl_i5/fox_ma.c
@@ -430,11 +430,10 @@ void Macbeth_Texture_RotateZ(u8* destTex, u8* srcTex, f32 angle) {
}
}
Matrix_Pop(&gCalcMatrix);
+ gSPInvalidateTexCache(gMasterDisp++, destTex);
}
void Macbeth_Texture_Scroll(u8* tex, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
- // return;
-
// LTODO: this is causing corruption, overflow.
// Texture at D_MA_6023228 might be the culprit.
u8* texPtr = SEGMENTED_TO_VIRTUAL(tex);
@@ -455,6 +454,7 @@ void Macbeth_Texture_Scroll(u8* tex, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
texPtr[((arg2 - 2) * arg1) + i] = b;
texPtr[((arg2 - 1) * arg1) + i] = a;
}
+ gSPInvalidateTexCache(gMasterDisp++, tex);
}
void Macbeth_Texture_Scroll2(u16* tex, s32 arg1, s32 arg2) {
@@ -472,6 +472,7 @@ void Macbeth_Texture_Scroll2(u16* tex, s32 arg1, s32 arg2) {
texPtr[i] = a;
}
+ gSPInvalidateTexCache(gMasterDisp++, tex);
}
void Macbeth_Train_Init(Actor* this) {