From 51b2671aa9204cc5c49092219b7b5be9fbc25e3b Mon Sep 17 00:00:00 2001 From: RSDuck Date: Wed, 9 Dec 2020 19:18:42 +0100 Subject: add cur vertex and light information to savestate --- src/GPU3D.cpp | 16 ++++++++++++++++ src/Savestate.h | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'src') 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 #include "types.h" -#define SAVESTATE_MAJOR 6 +#define SAVESTATE_MAJOR 7 #define SAVESTATE_MINOR 0 class Savestate -- cgit v1.2.3