hflip in fast path
Jeffrey Pfau jeffrey@endrift.com
Mon, 29 Apr 2013 22:05:32 -0700
1 files changed,
36 insertions(+),
16 deletions(-)
M
src/gba/renderers/video-software.c
→
src/gba/renderers/video-software.c
@@ -424,22 +424,42 @@ BACKGROUND_TEXT_SELECT_CHARACTER;
charBase = ((background->charBase + (mapData.tile << 5)) >> 2) + localY; uint32_t tileData = ((uint32_t*)renderer->d.vram)[charBase]; if (tileData) { - BACKGROUND_DRAW_PIXEL_16; - ++outX; - BACKGROUND_DRAW_PIXEL_16; - ++outX; - BACKGROUND_DRAW_PIXEL_16; - ++outX; - BACKGROUND_DRAW_PIXEL_16; - ++outX; - BACKGROUND_DRAW_PIXEL_16; - ++outX; - BACKGROUND_DRAW_PIXEL_16; - ++outX; - BACKGROUND_DRAW_PIXEL_16; - ++outX; - BACKGROUND_DRAW_PIXEL_16; - ++outX; + if (!mapData.hflip) { + BACKGROUND_DRAW_PIXEL_16; + ++outX; + BACKGROUND_DRAW_PIXEL_16; + ++outX; + BACKGROUND_DRAW_PIXEL_16; + ++outX; + BACKGROUND_DRAW_PIXEL_16; + ++outX; + BACKGROUND_DRAW_PIXEL_16; + ++outX; + BACKGROUND_DRAW_PIXEL_16; + ++outX; + BACKGROUND_DRAW_PIXEL_16; + ++outX; + BACKGROUND_DRAW_PIXEL_16; + ++outX; + } else { + outX += 7; + BACKGROUND_DRAW_PIXEL_16; + --outX; + BACKGROUND_DRAW_PIXEL_16; + --outX; + BACKGROUND_DRAW_PIXEL_16; + --outX; + BACKGROUND_DRAW_PIXEL_16; + --outX; + BACKGROUND_DRAW_PIXEL_16; + --outX; + BACKGROUND_DRAW_PIXEL_16; + --outX; + BACKGROUND_DRAW_PIXEL_16; + --outX; + BACKGROUND_DRAW_PIXEL_16; + outX += 8; + } } else { outX += 8; }