GSdx: cleaned up some obsolete code

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1331 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gabest11
2009-06-05 15:15:02 +00:00
parent 3f97423a30
commit 01d1573fdc
13 changed files with 64 additions and 338 deletions
-100
View File
@@ -571,106 +571,6 @@ GSLocalMemory::Offset4* GSLocalMemory::GetOffset4(const GIFRegFRAME& FRAME, cons
return o;
}
bool GSLocalMemory::FillRect(const GSVector4i& r, uint32 c, uint32 psm, uint32 bp, uint32 bw)
{
const psm_t& tbl = m_psm[psm];
writePixel wp = tbl.wp;
pixelAddress bn = tbl.bn;
int w = tbl.bs.x;
int h = tbl.bs.y;
int bpp = tbl.bpp;
switch(bpp)
{
case 32: break;
case 16: c = (c & 0xffff) * 0x00010001; break;
case 8: c = (c & 0xff) * 0x01010101; break;
case 4: c = (c & 0xf) * 0x11111111; break;
}
GSVector4i clip = r.ralign<GSVector4i::Inside>(tbl.bs);
for(int y = r.top; y < clip.top; y++)
{
for(int x = r.left; x < r.right; x++)
{
(this->*wp)(x, y, c, bp, bw);
}
}
for(int y = clip.bottom; y < r.bottom; y++)
{
for(int x = r.left; x < r.right; x++)
{
(this->*wp)(x, y, c, bp, bw);
}
}
if(r.x < clip.left || clip.right < r.z)
{
for(int y = clip.top; y < clip.bottom; y += h)
{
for(int ys = y, ye = y + h; ys < ye; ys++)
{
for(int x = r.left; x < clip.left; x++)
{
(this->*wp)(x, ys, c, bp, bw);
}
for(int x = clip.right; x < r.right; x++)
{
(this->*wp)(x, ys, c, bp, bw);
}
}
}
}
GSVector4i c128(c);
if(psm == PSM_PSMCT24 || psm == PSM_PSMZ24)
{
GSVector4i mask(0x00ffffff);
for(int y = clip.top; y < clip.bottom; y += h)
{
for(int x = clip.left; x < clip.right; x += w)
{
GSVector4i* p = (GSVector4i*)&m_vm8[bn(x, y, bp, bw) << 8];
for(int i = 0; i < 16; i += 4)
{
p[i + 0] = p[i + 0].blend8(c128, mask);
p[i + 1] = p[i + 1].blend8(c128, mask);
p[i + 2] = p[i + 2].blend8(c128, mask);
p[i + 3] = p[i + 3].blend8(c128, mask);
}
}
}
}
else
{
for(int y = clip.top; y < clip.bottom; y += h)
{
for(int x = clip.left; x < clip.right; x += w)
{
GSVector4i* p = (GSVector4i*)&m_vm8[bn(x, y, bp, bw) << 8];
for(int i = 0; i < 16; i += 4)
{
p[i + 0] = c128;
p[i + 1] = c128;
p[i + 2] = c128;
p[i + 3] = c128;
}
}
}
}
return true;
}
////////////////////
template<int psm, int bsx, int bsy, bool aligned>