Fix drawing wide backgrounds

This commit is contained in:
Jeffrey Pfau 2013-04-22 02:07:19 -07:00
parent b48b868cfb
commit e1d5f3f457
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ static void _drawBackgroundMode0(struct GBAVideoSoftwareRenderer* renderer, stru
for (int outX = start; outX < end; ++outX) { for (int outX = start; outX < end; ++outX) {
xBase = (outX + inX) & 0xF8; xBase = (outX + inX) & 0xF8;
if (background->size & 1) { if (background->size & 1) {
xBase += ((outX + inX) & 0x100) << 3; xBase += ((outX + inX) & 0x100) << 5;
} }
screenBase = (background->screenBase >> 1) + (xBase >> 3) + (yBase << 2); screenBase = (background->screenBase >> 1) + (xBase >> 3) + (yBase << 2);
mapData.packed = renderer->d.vram[screenBase]; mapData.packed = renderer->d.vram[screenBase];