diff options
| author | comex <comexk@gmail.com> | 2014-08-27 13:26:06 -0400 |
|---|---|---|
| committer | comex <comexk@gmail.com> | 2014-09-28 21:23:29 -0400 |
| commit | f0131c2e09faba0d65fa5b7360898e514e3636f5 (patch) | |
| tree | 3715ecd44ad120b0667967115962cf036fcadd47 /Source/Core/VideoCommon/CPMemory.cpp | |
| parent | 90638c6806ac2c92b211e41b2abd257b4266f488 (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/CPMemory.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/CPMemory.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/Source/Core/VideoCommon/CPMemory.cpp b/Source/Core/VideoCommon/CPMemory.cpp index 752063065b..22bc95c57d 100644 --- a/Source/Core/VideoCommon/CPMemory.cpp +++ b/Source/Core/VideoCommon/CPMemory.cpp @@ -2,17 +2,22 @@ // Licensed under GPLv2 // Refer to the license.txt file included. +#include "Common/ChunkFile.h" #include "Common/CommonTypes.h" #include "VideoCommon/CPMemory.h" // CP state u8 *cached_arraybases[16]; -// STATE_TO_SAVE -u32 arraybases[16]; -u32 arraystrides[16]; -TMatrixIndexA MatrixIndexA; -TMatrixIndexB MatrixIndexB; -TVtxDesc g_VtxDesc; -// Most games only use the first VtxAttr and simply reconfigure it all the time as needed. -VAT g_VtxAttr[8]; +CPState g_main_cp_state; + +void DoCPState(PointerWrap& p) +{ + p.DoArray(g_main_cp_state.array_bases, 16); + p.DoArray(g_main_cp_state.array_strides, 16); + p.Do(g_main_cp_state.matrix_index_a); + p.Do(g_main_cp_state.matrix_index_b); + p.Do(g_main_cp_state.vtx_desc.Hex); + p.DoArray(g_main_cp_state.vtx_attr, 8); + p.DoMarker("CP Memory"); +} |
