Fix mosaic drawing of 256-color mirrored background tiles

This commit is contained in:
Jeffrey Pfau 2014-07-09 22:49:05 -07:00
parent c3136b914e
commit e6863a6cc5
1 changed files with 9 additions and 7 deletions

View File

@ -1066,18 +1066,20 @@ static inline void _compositeNoBlendNoObjwin(struct GBAVideoSoftwareRenderer* re
tileData = carryData; \ tileData = carryData; \
for (x = 0; x < 8; ++x) { \ for (x = 0; x < 8; ++x) { \
if (!mosaicWait) { \ if (!mosaicWait) { \
if (!GBA_TEXT_MAP_HFLIP(mapData)) { \
if (x >= 4) { \ if (x >= 4) { \
tileData = ((uint32_t*)renderer->d.vram)[charBase + 1]; \ tileData = ((uint32_t*)renderer->d.vram)[charBase + 1]; \
if (!GBA_TEXT_MAP_HFLIP(mapData)) { \
tileData >>= (x - 4) * 8; \ tileData >>= (x - 4) * 8; \
} else { \ } else { \
tileData >>= (7 - x) * 8; \ tileData = ((uint32_t*)renderer->d.vram)[charBase]; \
tileData >>= x * 8; \
} \ } \
} else { \ } else { \
if (x >= 4) { \
tileData = ((uint32_t*)renderer->d.vram)[charBase]; \ tileData = ((uint32_t*)renderer->d.vram)[charBase]; \
if (!GBA_TEXT_MAP_HFLIP(mapData)) { \ tileData >>= (7 - x) * 8; \
tileData >>= x * 8; \
} else { \ } else { \
tileData = ((uint32_t*)renderer->d.vram)[charBase + 1]; \
tileData >>= (3 - x) * 8; \ tileData >>= (3 - x) * 8; \
} \ } \
} \ } \