always apply matrix push/pop/store/restore to the vector matrix stack, even in mode 1. fixes SM64DS lighting.

This commit is contained in:
StapleButter 2017-03-21 12:52:17 +01:00
parent 3dd79d63f1
commit 3590d210f3

View File

@ -1168,8 +1168,7 @@ void ExecuteCommand()
}
memcpy(PosMatrixStack[PosMatrixStackPointer], PosMatrix, 16*4);
if (MatrixMode == 2)
memcpy(VecMatrixStack[PosMatrixStackPointer], VecMatrix, 16*4);
memcpy(VecMatrixStack[PosMatrixStackPointer], VecMatrix, 16*4);
PosMatrixStackPointer++;
GXStat |= (1<<14);
}
@ -1217,8 +1216,7 @@ void ExecuteCommand()
}
memcpy(PosMatrix, PosMatrixStack[PosMatrixStackPointer], 16*4);
if (MatrixMode == 2)
memcpy(VecMatrix, VecMatrixStack[PosMatrixStackPointer], 16*4);
memcpy(VecMatrix, VecMatrixStack[PosMatrixStackPointer], 16*4);
GXStat |= (1<<14);
ClipMatrixDirty = true;
}
@ -1244,8 +1242,7 @@ void ExecuteCommand()
}
memcpy(PosMatrixStack[addr], PosMatrix, 16*4);
if (MatrixMode == 2)
memcpy(VecMatrixStack[addr], VecMatrix, 16*4);
memcpy(VecMatrixStack[addr], VecMatrix, 16*4);
}
break;
@ -1270,8 +1267,7 @@ void ExecuteCommand()
}
memcpy(PosMatrix, PosMatrixStack[addr], 16*4);
if (MatrixMode == 2)
memcpy(VecMatrix, VecMatrixStack[addr], 16*4);
memcpy(VecMatrix, VecMatrixStack[addr], 16*4);
ClipMatrixDirty = true;
}
break;