aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRSDuck <rsduck@users.noreply.github.com>2020-12-09 19:18:42 +0100
committerRSDuck <rsduck@users.noreply.github.com>2020-12-09 19:18:42 +0100
commit51b2671aa9204cc5c49092219b7b5be9fbc25e3b (patch)
treec71617027fb7d7428244684538c9c0aa83cca584 /src
parentee75443d50d57f7f0fb47f27b3016d1672c9e48a (diff)
add cur vertex and light information to savestate
Diffstat (limited to 'src')
-rw-r--r--src/GPU3D.cpp16
-rw-r--r--src/Savestate.h2
2 files changed, 17 insertions, 1 deletions
diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp
index 4e6ac42..fd8d320 100644
--- a/src/GPU3D.cpp
+++ b/src/GPU3D.cpp
@@ -608,6 +608,22 @@ void DoSavestate(Savestate* file)
// might cause a blank frame but atleast it won't shit itself
RenderNumPolygons = 0;
}
+
+ file->VarArray(CurVertex, sizeof(s16)*3);
+ file->VarArray(VertexColor, sizeof(u8)*3);
+ file->VarArray(TexCoords, sizeof(s16)*2);
+ file->VarArray(RawTexCoords, sizeof(s16)*2);
+ file->VarArray(Normal, sizeof(s16)*3);
+
+ file->VarArray(LightDirection, sizeof(s16)*4*3);
+ file->VarArray(LightColor, sizeof(u8)*4*3);
+ file->VarArray(MatDiffuse, sizeof(u8)*3);
+ file->VarArray(MatAmbient, sizeof(u8)*3);
+ file->VarArray(MatSpecular, sizeof(u8)*3);
+ file->VarArray(MatEmission, sizeof(u8)*3);
+
+ file->Bool32(&UseShininessTable);
+ file->VarArray(ShininessTable, 128*sizeof(u8));
}
diff --git a/src/Savestate.h b/src/Savestate.h
index c3c2e1d..ae8fced 100644
--- a/src/Savestate.h
+++ b/src/Savestate.h
@@ -22,7 +22,7 @@
#include <stdio.h>
#include "types.h"
-#define SAVESTATE_MAJOR 6
+#define SAVESTATE_MAJOR 7
#define SAVESTATE_MINOR 0
class Savestate