aboutsummaryrefslogtreecommitdiff
path: root/src/GPU3D.cpp
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2018-10-23 20:40:57 +0200
committerStapleButter <thetotalworm@gmail.com>2018-10-23 20:40:57 +0200
commita4a9bca5f035c45a246afe31e9a0c1e280c3225e (patch)
tree5df5e386c1fa7674d3e3cbfc3cb3b7b5afa2fc0b /src/GPU3D.cpp
parent98076f2334388f7774514dbb8a3ec3d3d7c031f9 (diff)
fix more shit
Diffstat (limited to 'src/GPU3D.cpp')
-rw-r--r--src/GPU3D.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp
index 47843e4..7aa7142 100644
--- a/src/GPU3D.cpp
+++ b/src/GPU3D.cpp
@@ -402,6 +402,42 @@ void DoSavestate(Savestate* file)
file->Var32(&VertexNum);
file->Var32(&VertexNumInPoly);
+ file->Var32(&NumConsecutivePolygons);
+ /*Vertex TempVertexBuffer[4];
+u32 VertexNum;
+u32 VertexNumInPoly;
+u32 NumConsecutivePolygons;
+Polygon* LastStripPolygon;
+u32 NumOpaquePolygons;*/
+
+ for (int i = 0; i < 4; i++)
+ {
+ Vertex* vtx = &TempVertexBuffer[i];
+
+ file->VarArray(vtx->Position, sizeof(s32)*4);
+ file->VarArray(vtx->Color, sizeof(s32)*3);
+ file->VarArray(vtx->TexCoords, sizeof(s16)*2);
+
+ file->Var32((u32*)&vtx->Clipped);
+
+ file->VarArray(vtx->FinalPosition, sizeof(s32)*2);
+ file->VarArray(vtx->FinalColor, sizeof(s32)*3);
+ }
+
+ if (file->Saving)
+ {
+ u32 id;
+ if (LastStripPolygon) id = (u32)((LastStripPolygon - (&PolygonRAM[0])) / sizeof(Polygon));
+ else id = -1;
+ file->Var32(&id);
+ }
+ else
+ {
+ u32 id;
+ file->Var32(&id);
+ if (id == -1) LastStripPolygon = NULL;
+ else LastStripPolygon = &PolygonRAM[id];
+ }
file->Var32(&CurRAMBank);
file->Var32(&NumVertices);