summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VideoState.cpp
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2014-08-27 13:26:06 -0400
committercomex <comexk@gmail.com>2014-09-28 21:23:29 -0400
commitf0131c2e09faba0d65fa5b7360898e514e3636f5 (patch)
tree3715ecd44ad120b0667967115962cf036fcadd47 /Source/Core/VideoCommon/VideoState.cpp
parent90638c6806ac2c92b211e41b2abd257b4266f488 (diff)
Mechanical changes to move most CP state to a struct rather than separate globals.
The next commit will add a separate copy of the struct and the ability for LoadCPReg to work on it.
Diffstat (limited to 'Source/Core/VideoCommon/VideoState.cpp')
-rw-r--r--Source/Core/VideoCommon/VideoState.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/Source/Core/VideoCommon/VideoState.cpp b/Source/Core/VideoCommon/VideoState.cpp
index a8d5ddcf04..72232e2737 100644
--- a/Source/Core/VideoCommon/VideoState.cpp
+++ b/Source/Core/VideoCommon/VideoState.cpp
@@ -22,13 +22,7 @@ static void DoState(PointerWrap &p)
p.DoMarker("BP Memory");
// CP Memory
- p.DoArray(arraybases, 16);
- p.DoArray(arraystrides, 16);
- p.Do(MatrixIndexA);
- p.Do(MatrixIndexB);
- p.Do(g_VtxDesc.Hex);
- p.DoArray(g_VtxAttr, 8);
- p.DoMarker("CP Memory");
+ DoCPState(p);
// XF Memory
p.Do(xfmem);
@@ -73,11 +67,6 @@ void VideoCommon_RunLoop(bool enable)
void VideoCommon_Init()
{
- memset(arraybases, 0, sizeof(arraybases));
- memset(arraystrides, 0, sizeof(arraystrides));
- memset(&MatrixIndexA, 0, sizeof(MatrixIndexA));
- memset(&MatrixIndexB, 0, sizeof(MatrixIndexB));
- memset(&g_VtxDesc, 0, sizeof(g_VtxDesc));
- memset(g_VtxAttr, 0, sizeof(g_VtxAttr));
+ memset(&g_main_cp_state, 0, sizeof(g_main_cp_state));
memset(texMem, 0, TMEM_SIZE);
}