BPMemory: Use the new BitField class in two selected structures.

This commit is contained in:
Tony Wasserka 2014-03-10 16:15:40 +01:00
parent 948c0a54f1
commit 77a7bab5ae
5 changed files with 47 additions and 48 deletions

View file

@ -148,17 +148,13 @@ void PixelShaderManager::SetConstants()
}
}
// This one is high in profiles (0.5%).
// TODO: Move conversion out, only store the raw color value
// and update it when the shader constant is set, only.
// TODO: Conversion should be checked in the context of tev_fixes..
void PixelShaderManager::SetColorChanged(int type, int num)
{
int4* c = type ? constants.kcolors : constants.colors;
c[num][0] = bpmem.tevregs[num].low.a;
c[num][3] = bpmem.tevregs[num].low.b;
c[num][2] = bpmem.tevregs[num].high.a;
c[num][1] = bpmem.tevregs[num].high.b;
c[num][0] = bpmem.tevregs[num].red;
c[num][3] = bpmem.tevregs[num].alpha;
c[num][2] = bpmem.tevregs[num].blue;
c[num][1] = bpmem.tevregs[num].green;
dirty = true;
PRIM_LOG("pixel %scolor%d: %d %d %d %d\n", type?"k":"", num, c[num][0], c[num][1], c[num][2], c[num][3]);