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:
hrydgard
2008-08-30 19:19:40 +00:00
parent 6b6003c563
commit 85565688d7
34 changed files with 329 additions and 672 deletions

View File

@ -526,13 +526,13 @@ void BPWritten(int addr, int changes, int newval)
CVertexHandler::Flush();
((u32*)&bpmem)[addr] = newval;
static int lastRGBA[2][4] = {
{0xEEEEEEEE,0xEEEEEEEE,0xEEEEEEEE,0xEEEEEEEE},
{0xEEEEEEEE,0xEEEEEEEE,0xEEEEEEEE,0xEEEEEEEE}
{0xEEEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE},
{0xEEEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE}
};
//Terrible hack
//The reason is that there are two sets of registers
//overloaded here...
int num=(addr>>1)&0x3;
int num = (addr >> 1) & 0x3;
int type = bpmem.tevregs[num].high.type;
int colorbase = type ? PS_CONST_KCOLORS : PS_CONST_COLORS;
int r=bpmem.tevregs[num].low.a, a=bpmem.tevregs[num].low.b;
@ -543,9 +543,9 @@ void BPWritten(int addr, int changes, int newval)
CVertexHandler::Flush();
lastRGBA[type][num] = rgba;
float temp[4] = {
r/255.0f,g/255.0f,b/255.0f,a/255.0f
r/255.0f, g/255.0f, b/255.0f, a/255.0f
};
D3D::dev->SetPixelShaderConstantF(colorbase+num,temp,1);
D3D::dev->SetPixelShaderConstantF(colorbase + num, temp, 1);
}
}
}
@ -726,21 +726,6 @@ void BPReload()
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;*/
return 0;
}
void ActivateTextures()
{
for (int i = 0; i < 8; i++)