mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
New SaveState folder for states. Removed some outdated code. Removed an unnecessary level of indirection for plugin calls. Assorted cleanup.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@389 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -719,16 +719,3 @@ void BPReload()
|
||||
for (int i=0; i<254; i++)
|
||||
BPWritten(i, 0xFFFFFF, ((u32*)&bpmem)[i]);
|
||||
}
|
||||
|
||||
|
||||
size_t BPSaveLoadState(char *ptr, BOOL save)
|
||||
{
|
||||
BEGINSAVELOAD;
|
||||
SAVELOAD(&bpmem,sizeof(BPMemory));
|
||||
if (!save)
|
||||
BPReload();
|
||||
//char temp[256];
|
||||
//sprintf(temp,"MOJS %08x",(bpmem.clearcolorAR<<16)|(bpmem.clearcolorGB));
|
||||
//g_VideoInitialize.pLog(temp, FALSE);
|
||||
ENDSAVELOAD;
|
||||
}
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "BPMemory.h"
|
||||
|
||||
void BPInit();
|
||||
size_t BPSaveLoadState(char *ptr, BOOL save);
|
||||
//bool BPWritten(int addr, int changes);
|
||||
void LoadBPReg(u32 value0);
|
||||
|
||||
|
@ -111,10 +111,6 @@ extern float MValueX, MValueY;
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
#endif
|
||||
|
||||
#define BEGINSAVELOAD char *optr=ptr;
|
||||
#define SAVELOAD(what,size) memcpy((void*)((save)?(void*)(ptr):(void*)(what)),(void*)((save)?(void*)(what):(void*)(ptr)),(size)); ptr+=(size);
|
||||
#define ENDSAVELOAD return ptr-optr;
|
||||
|
||||
extern int frameCount;
|
||||
|
||||
#define CONF_LOG 1
|
||||
|
@ -60,10 +60,10 @@ void ExecuteDisplayList(u32 address, u32 size)
|
||||
g_pDataReader = &memoryReader;
|
||||
|
||||
// temporarily swap dl and non-dl(small "hack" for the stats)
|
||||
Xchg(stats.thisFrame.numDLPrims,stats.thisFrame.numPrims);
|
||||
Xchg(stats.thisFrame.numXFLoadsInDL,stats.thisFrame.numXFLoads);
|
||||
Xchg(stats.thisFrame.numCPLoadsInDL,stats.thisFrame.numCPLoads);
|
||||
Xchg(stats.thisFrame.numBPLoadsInDL,stats.thisFrame.numBPLoads);
|
||||
Xchg(stats.thisFrame.numDLPrims, stats.thisFrame.numPrims);
|
||||
Xchg(stats.thisFrame.numXFLoadsInDL, stats.thisFrame.numXFLoads);
|
||||
Xchg(stats.thisFrame.numCPLoadsInDL, stats.thisFrame.numCPLoads);
|
||||
Xchg(stats.thisFrame.numBPLoadsInDL, stats.thisFrame.numBPLoads);
|
||||
|
||||
while((memoryReader.GetReadAddress() - address) < size)
|
||||
{
|
||||
@ -73,10 +73,10 @@ void ExecuteDisplayList(u32 address, u32 size)
|
||||
INCSTAT(stats.thisFrame.numDListsCalled);
|
||||
|
||||
// un-swap
|
||||
Xchg(stats.thisFrame.numDLPrims,stats.thisFrame.numPrims);
|
||||
Xchg(stats.thisFrame.numXFLoadsInDL,stats.thisFrame.numXFLoads);
|
||||
Xchg(stats.thisFrame.numCPLoadsInDL,stats.thisFrame.numCPLoads);
|
||||
Xchg(stats.thisFrame.numBPLoadsInDL,stats.thisFrame.numBPLoads);
|
||||
Xchg(stats.thisFrame.numDLPrims, stats.thisFrame.numPrims);
|
||||
Xchg(stats.thisFrame.numXFLoadsInDL, stats.thisFrame.numXFLoads);
|
||||
Xchg(stats.thisFrame.numCPLoadsInDL, stats.thisFrame.numCPLoads);
|
||||
Xchg(stats.thisFrame.numBPLoadsInDL, stats.thisFrame.numBPLoads);
|
||||
|
||||
// reset to the old reader
|
||||
g_pDataReader = pOldReader;
|
||||
|
@ -1151,12 +1151,3 @@ void VertexManager::LoadCPReg(u32 SubCmd, u32 Value)
|
||||
case 0xB0: arraystrides[SubCmd & 0xF] = Value & 0xFF; break;
|
||||
}
|
||||
}
|
||||
|
||||
size_t VertexManager::SaveLoadState(char *ptr, BOOL save)
|
||||
{
|
||||
BEGINSAVELOAD;
|
||||
SAVELOAD(arraybases,16*sizeof(u32));
|
||||
SAVELOAD(arraystrides,16*sizeof(u32));
|
||||
ENDSAVELOAD;
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,6 @@ public:
|
||||
static TVtxDesc &GetVtxDesc() {return s_GlobalVtxDesc; }
|
||||
|
||||
static void LoadCPReg(u32 SubCmd, u32 Value);
|
||||
static size_t SaveLoadState(char *ptr, BOOL save);
|
||||
|
||||
static u8* s_pCurBufferPointer;
|
||||
static float shiftLookup[32];
|
||||
|
@ -496,25 +496,6 @@ void VertexShaderMngr::SetProjection(float* _pProjection, int constantIndex)
|
||||
bProjectionChanged = true;
|
||||
}
|
||||
|
||||
size_t VertexShaderMngr::SaveLoadState(char *ptr, BOOL save)
|
||||
{
|
||||
BEGINSAVELOAD;
|
||||
|
||||
SAVELOAD(&xfregs,sizeof(xfregs));
|
||||
SAVELOAD(xfmem,XFMEM_SIZE*sizeof(u32));
|
||||
SAVELOAD(rawViewport,sizeof(rawViewport));
|
||||
SAVELOAD(rawProjection,sizeof(rawProjection));
|
||||
SAVELOAD(&MatrixIndexA,sizeof(TMatrixIndexA));
|
||||
SAVELOAD(&MatrixIndexB,sizeof(TMatrixIndexB));
|
||||
|
||||
if (!save) {
|
||||
// invalidate all
|
||||
InvalidateXFRange(0,0x1000);
|
||||
}
|
||||
|
||||
ENDSAVELOAD;
|
||||
}
|
||||
|
||||
// LoadXFReg 0x10
|
||||
void VertexShaderMngr::LoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData)
|
||||
{
|
||||
|
@ -119,7 +119,6 @@ public:
|
||||
static void SetTexMatrixChangedA(u32 Value);
|
||||
static void SetTexMatrixChangedB(u32 Value);
|
||||
|
||||
static size_t SaveLoadState(char *ptr, BOOL save);
|
||||
static void LoadXFReg(u32 transferSize, u32 address, u32 *pData);
|
||||
static void LoadIndexedXF(u32 val, int array);
|
||||
|
||||
|
Reference in New Issue
Block a user