mirror of https://github.com/PCSX2/pcsx2.git
GSDx: Found the likely actual cause for the FFXII hack problems, probably introduced with index buffers. Also made the hack a little more crash proof and maybe fixed an off by one pixel error.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5135 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
e8b96f51cb
commit
e017ccaa5d
|
@ -424,17 +424,17 @@ bool GSRendererHW::OI_FFXII(GSTexture* rt, GSTexture* ds, GSTextureCache::Source
|
|||
|
||||
if(!video) video = new uint32[512 * 512];
|
||||
|
||||
int ox = m_context->XYOFFSET.OFX;
|
||||
int oy = m_context->XYOFFSET.OFY;
|
||||
int ox = m_context->XYOFFSET.OFX - 8;
|
||||
int oy = m_context->XYOFFSET.OFY - 8;
|
||||
|
||||
const GSVertex* RESTRICT v = m_vertex.buff;
|
||||
|
||||
for(int i = (int)m_vertex.next; i >= 0; i--, v++)
|
||||
for(int i = (int)m_vertex.next; i > 0; i--, v++)
|
||||
{
|
||||
int x = (v->XYZ.X - ox) >> 4;
|
||||
int y = (v->XYZ.Y - oy) >> 4;
|
||||
|
||||
if (x >= 448 || y >= (int)lines) return false; // sigh
|
||||
if (x < 0 || x >= 448 || y < 0 || y >= (int)lines) return false; // le sigh
|
||||
|
||||
video[(y << 8) + (y << 7) + (y << 6) + x] = v->RGBAQ.u32[0];
|
||||
}
|
||||
|
@ -506,7 +506,7 @@ bool GSRendererHW::OI_MetalSlug6(GSTexture* rt, GSTexture* ds, GSTextureCache::S
|
|||
|
||||
GSVertex* RESTRICT v = m_vertex.buff;
|
||||
|
||||
for(int i = (int)m_vertex.next; i >= 0; i--, v++)
|
||||
for(int i = (int)m_vertex.next; i > 0; i--, v++)
|
||||
{
|
||||
uint32 c = v->RGBAQ.u32[0];
|
||||
|
||||
|
|
Loading…
Reference in New Issue