aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-03-21 12:52:17 +0100
committerStapleButter <thetotalworm@gmail.com>2017-03-21 12:52:17 +0100
commit3590d210f3c0dde8d071f7cb7f87110c1edec72c (patch)
tree6a4fc8ecf6bf70d3ddabb7d45a235e39a7aa3d3d
parent3dd79d63f19f779077966add3fc934d3ff07acf5 (diff)
always apply matrix push/pop/store/restore to the vector matrix stack, even in mode 1. fixes SM64DS lighting.
-rw-r--r--src/GPU3D.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp
index bbf9a16..939cb8a 100644
--- a/src/GPU3D.cpp
+++ b/src/GPU3D.cpp
@@ -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;