GBA Video: Optimize mode 0 16-color tiles a bit more

This commit is contained in:
Vicki Pfau 2022-10-15 23:01:36 -07:00
parent 74358521ab
commit 506b9c69be
1 changed files with 14 additions and 20 deletions

View File

@ -160,27 +160,21 @@
pixel += 8; \
continue; \
} \
LOAD_32(tileData, charBase, vram); \
if (!GBA_TEXT_MAP_HFLIP(mapData)) { \
LOAD_32(tileData, charBase, vram); \
} else { \
LOAD_32BE(tileData, charBase, vram); \
tileData = ((tileData & 0xF0F0F0F0) >> 4) | ((tileData & 0x0F0F0F0F) << 4); \
} \
if (tileData) { \
if (!GBA_TEXT_MAP_HFLIP(mapData)) { \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 0); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 1); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 2); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 3); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 4); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 5); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 6); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 7); \
} else { \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 7); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 6); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 5); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 4); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 3); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 2); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 1); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 0); \
} \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 0); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 1); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 2); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 3); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 4); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 5); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 6); \
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 7); \
} \
pixel += 8; \
}