fix train and landmaster wheel rotation
Some checks failed
GenerateBuilds / generate-port-o2r (push) Has been cancelled
GenerateBuilds / build-windows (push) Has been cancelled
GenerateBuilds / build-macos (push) Has been cancelled
GenerateBuilds / build-linux (push) Has been cancelled
GenerateBuilds / build-switch (push) Has been cancelled

This commit is contained in:
Sonic Dreamcaster 2025-04-03 14:03:45 -03:00
parent a69167abe7
commit fc87a68896
2 changed files with 4 additions and 2 deletions

View file

@ -53,6 +53,7 @@ void func_tank_80043280(u16* text0, u16* text1, f32 zRot) {
} }
} }
Matrix_Pop(&gCalcMatrix); Matrix_Pop(&gCalcMatrix);
gSPInvalidateTexCache(gMasterDisp++, text0);
} }
void Player_UpdateTankCamOnRails(Player* player) { void Player_UpdateTankCamOnRails(Player* player) {

View file

@ -430,11 +430,10 @@ void Macbeth_Texture_RotateZ(u8* destTex, u8* srcTex, f32 angle) {
} }
} }
Matrix_Pop(&gCalcMatrix); Matrix_Pop(&gCalcMatrix);
gSPInvalidateTexCache(gMasterDisp++, destTex);
} }
void Macbeth_Texture_Scroll(u8* tex, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { void Macbeth_Texture_Scroll(u8* tex, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
// return;
// LTODO: this is causing corruption, overflow. // LTODO: this is causing corruption, overflow.
// Texture at D_MA_6023228 might be the culprit. // Texture at D_MA_6023228 might be the culprit.
u8* texPtr = SEGMENTED_TO_VIRTUAL(tex); 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 - 2) * arg1) + i] = b;
texPtr[((arg2 - 1) * arg1) + i] = a; texPtr[((arg2 - 1) * arg1) + i] = a;
} }
gSPInvalidateTexCache(gMasterDisp++, tex);
} }
void Macbeth_Texture_Scroll2(u16* tex, s32 arg1, s32 arg2) { 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; texPtr[i] = a;
} }
gSPInvalidateTexCache(gMasterDisp++, tex);
} }
void Macbeth_Train_Init(Actor* this) { void Macbeth_Train_Init(Actor* this) {