gba: fix H-mosaic in text mode BGs

This commit is contained in:
goyuken 2012-11-24 18:33:15 +00:00
parent fcb0be70f7
commit b9fac0643a
2 changed files with 21 additions and 22 deletions

View File

@ -132,12 +132,11 @@ namespace AMeteor
*ptr = m_pPalette[*tpChar] | 0x8000;
else
*ptr = 0x0;
if (flipH)
--tpChar;
else
++tpChar;
}
if (flipH)
--tpChar;
else
++tpChar;
++ptr;
++tileX;
@ -186,27 +185,27 @@ namespace AMeteor
// we draw until the end of the tile or the line
while (tileX < 8)
{
if (flipH)
if (tileX % 2)
{
colorInd = *tpChar & 0xF;
--tpChar;
}
else
colorInd = *tpChar >> 4;
else
if (tileX % 2)
{
colorInd = *tpChar >> 4;
++tpChar;
}
else
colorInd = *tpChar & 0xF;
if (mosH && i % mosH)
*ptr = ptr[-1];
else
{
if (flipH)
if (tileX % 2)
{
colorInd = *tpChar & 0xF;
--tpChar;
}
else
colorInd = *tpChar >> 4;
else
if (tileX % 2)
{
colorInd = *tpChar >> 4;
++tpChar;
}
else
colorInd = *tpChar & 0xF;
if (colorInd)
*ptr = pPalette[colorInd] | 0x8000;
else