diff options
author | WaluigiWare64 <68647953+WaluigiWare64@users.noreply.github.com> | 2020-10-23 00:39:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-23 00:39:29 +0100 |
commit | 8d70d0926c6307368398a894cbebfbdc0f538194 (patch) | |
tree | 72774a626ff8a30850c36eba33fdac38962739cb /src/GPU3D.cpp | |
parent | a8851a51f19577f153a3fa5d1021be5794f0921a (diff) | |
parent | 65be1840f02a7499fa08178abcefddfefec6d9b0 (diff) |
Merge branch 'master' into feature/zip-support
Diffstat (limited to 'src/GPU3D.cpp')
-rw-r--r-- | src/GPU3D.cpp | 48 |
1 files changed, 38 insertions, 10 deletions
diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp index bd27783..74debfe 100644 --- a/src/GPU3D.cpp +++ b/src/GPU3D.cpp @@ -401,8 +401,33 @@ void DoSavestate(Savestate* file) file->Var32(&NumTestCommands); file->Var32(&DispCnt); + file->Var8(&AlphaRefVal); file->Var8(&AlphaRef); + file->VarArray(ToonTable, 32*2); + file->VarArray(EdgeTable, 8*2); + + file->Var32(&FogColor); + file->Var32(&FogOffset); + file->VarArray(FogDensityTable, 32); + + file->Var32(&ClearAttr1); + file->Var32(&ClearAttr2); + + file->Var32(&RenderDispCnt); + file->Var8(&RenderAlphaRef); + + file->VarArray(RenderToonTable, 32*2); + file->VarArray(RenderEdgeTable, 8*2); + + file->Var32(&RenderFogColor); + file->Var32(&RenderFogOffset); + file->Var32(&RenderFogShift); + file->VarArray(RenderFogDensityTable, 34); + + file->Var32(&RenderClearAttr1); + file->Var32(&RenderClearAttr2); + file->Var32(&ZeroDotWLimit); file->Var32(&GXStat); @@ -445,7 +470,7 @@ void DoSavestate(Savestate* file) file->VarArray(vtx->Color, sizeof(s32)*3); file->VarArray(vtx->TexCoords, sizeof(s16)*2); - file->Var32((u32*)&vtx->Clipped); + file->Bool32(&vtx->Clipped); file->VarArray(vtx->FinalPosition, sizeof(s32)*2); file->VarArray(vtx->FinalColor, sizeof(s32)*3); @@ -471,9 +496,6 @@ void DoSavestate(Savestate* file) file->Var32(&NumPolygons); file->Var32(&NumOpaquePolygons); - file->Var32(&ClearAttr1); - file->Var32(&ClearAttr2); - file->Var32(&FlushRequest); file->Var32(&FlushAttributes); @@ -485,7 +507,7 @@ void DoSavestate(Savestate* file) file->VarArray(vtx->Color, sizeof(s32)*3); file->VarArray(vtx->TexCoords, sizeof(s16)*2); - file->Var32((u32*)&vtx->Clipped); + file->Bool32(&vtx->Clipped); file->VarArray(vtx->FinalPosition, sizeof(s32)*2); file->VarArray(vtx->FinalColor, sizeof(s32)*3); @@ -523,17 +545,17 @@ void DoSavestate(Savestate* file) file->VarArray(poly->FinalZ, sizeof(s32)*10); file->VarArray(poly->FinalW, sizeof(s32)*10); - file->Var32((u32*)&poly->WBuffer); + file->Bool32(&poly->WBuffer); file->Var32(&poly->Attr); file->Var32(&poly->TexParam); file->Var32(&poly->TexPalette); - file->Var32((u32*)&poly->FacingView); - file->Var32((u32*)&poly->Translucent); + file->Bool32(&poly->FacingView); + file->Bool32(&poly->Translucent); - file->Var32((u32*)&poly->IsShadowMask); - file->Var32((u32*)&poly->IsShadow); + file->Bool32(&poly->IsShadowMask); + file->Bool32(&poly->IsShadow); if (file->IsAtleastVersion(4, 1)) file->Var32((u32*)&poly->Type); @@ -2506,13 +2528,19 @@ void VBlank() void VCount215() { if (GPU::Renderer == 0) SoftRenderer::RenderFrame(); +#ifdef OGLRENDERER_ENABLED else GLRenderer::RenderFrame(); +#endif } u32* GetLine(int line) { if (GPU::Renderer == 0) return SoftRenderer::GetLine(line); +#ifdef OGLRENDERER_ENABLED else return GLRenderer::GetLine(line); +#else + return NULL; +#endif } |