mirror of https://github.com/mgba-emu/mgba.git
GBA Video: Fix more merge regressions
This commit is contained in:
parent
9fd6a5bf7b
commit
c7f85f7b7e
|
@ -21,15 +21,17 @@
|
||||||
palette = &mainPalette[paletteData]; \
|
palette = &mainPalette[paletteData]; \
|
||||||
charBase = (background->charBase + (GBA_TEXT_MAP_TILE(mapData) << 5)) + (localY << 2); \
|
charBase = (background->charBase + (GBA_TEXT_MAP_TILE(mapData) << 5)) + (localY << 2); \
|
||||||
vram = renderer->d.vramBG[charBase >> VRAM_BLOCK_OFFSET]; \
|
vram = renderer->d.vramBG[charBase >> VRAM_BLOCK_OFFSET]; \
|
||||||
LOAD_32(tileData, charBase & VRAM_BLOCK_MASK, vram); \
|
if (LIKELY(vram)) { \
|
||||||
if (!GBA_TEXT_MAP_HFLIP(mapData)) { \
|
LOAD_32(tileData, charBase & VRAM_BLOCK_MASK, vram); \
|
||||||
tileData >>= 4 * mod8; \
|
if (!GBA_TEXT_MAP_HFLIP(mapData)) { \
|
||||||
for (; outX < end; ++outX) { \
|
tileData >>= 4 * mod8; \
|
||||||
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 0); \
|
for (; outX < end; ++outX) { \
|
||||||
} \
|
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 0); \
|
||||||
} else { \
|
} \
|
||||||
for (outX = end - 1; outX >= renderer->start; --outX) { \
|
} else { \
|
||||||
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 0); \
|
for (outX = end - 1; outX >= renderer->start; --outX) { \
|
||||||
|
BACKGROUND_DRAW_PIXEL_16(BLEND, OBJWIN, 0); \
|
||||||
|
} \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,37 +191,39 @@
|
||||||
#define DRAW_BACKGROUND_MODE_0_TILE_SUFFIX_256(BLEND, OBJWIN) \
|
#define DRAW_BACKGROUND_MODE_0_TILE_SUFFIX_256(BLEND, OBJWIN) \
|
||||||
charBase = (background->charBase + (GBA_TEXT_MAP_TILE(mapData) << 6)) + (localY << 3); \
|
charBase = (background->charBase + (GBA_TEXT_MAP_TILE(mapData) << 6)) + (localY << 3); \
|
||||||
vram = renderer->d.vramBG[charBase >> VRAM_BLOCK_OFFSET]; \
|
vram = renderer->d.vramBG[charBase >> VRAM_BLOCK_OFFSET]; \
|
||||||
int end2 = end - 4; \
|
if (LIKELY(vram)) { \
|
||||||
if (!GBA_TEXT_MAP_HFLIP(mapData)) { \
|
int end2 = end - 4; \
|
||||||
int shift = inX & 0x3; \
|
if (!GBA_TEXT_MAP_HFLIP(mapData)) { \
|
||||||
if (end2 > outX) { \
|
int shift = inX & 0x3; \
|
||||||
LOAD_32(tileData, charBase & VRAM_BLOCK_MASK, vram); \
|
if (end2 > outX) { \
|
||||||
|
LOAD_32(tileData, charBase & VRAM_BLOCK_MASK, vram); \
|
||||||
|
tileData >>= 8 * shift; \
|
||||||
|
shift = 0; \
|
||||||
|
for (; outX < end2; ++outX) { \
|
||||||
|
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
LOAD_32(tileData, (charBase + 4) & VRAM_BLOCK_MASK, vram); \
|
||||||
tileData >>= 8 * shift; \
|
tileData >>= 8 * shift; \
|
||||||
shift = 0; \
|
for (; outX < end; ++outX) { \
|
||||||
for (; outX < end2; ++outX) { \
|
|
||||||
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
|
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
|
||||||
} \
|
} \
|
||||||
} \
|
} else { \
|
||||||
\
|
int start = outX; \
|
||||||
LOAD_32(tileData, (charBase + 4) & VRAM_BLOCK_MASK, vram); \
|
outX = end - 1; \
|
||||||
tileData >>= 8 * shift; \
|
if (end2 > start) { \
|
||||||
for (; outX < end; ++outX) { \
|
LOAD_32(tileData, charBase & VRAM_BLOCK_MASK, vram); \
|
||||||
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
|
for (; outX >= end2; --outX) { \
|
||||||
} \
|
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
|
||||||
} else { \
|
} \
|
||||||
int start = outX; \
|
charBase += 4; \
|
||||||
outX = end - 1; \
|
} \
|
||||||
if (end2 > start) { \
|
\
|
||||||
LOAD_32(tileData, charBase & VRAM_BLOCK_MASK, vram); \
|
LOAD_32(tileData, charBase & VRAM_BLOCK_MASK, vram); \
|
||||||
for (; outX >= end2; --outX) { \
|
for (; outX >= renderer->start; --outX) { \
|
||||||
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
|
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
|
||||||
} \
|
} \
|
||||||
charBase += 4; \
|
|
||||||
} \
|
|
||||||
\
|
|
||||||
LOAD_32(tileData, charBase & VRAM_BLOCK_MASK, vram); \
|
|
||||||
for (; outX >= renderer->start; --outX) { \
|
|
||||||
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
|
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -412,39 +416,41 @@
|
||||||
#define DRAW_BACKGROUND_MODE_0_TILE_SUFFIX_256EXT(BLEND, OBJWIN) \
|
#define DRAW_BACKGROUND_MODE_0_TILE_SUFFIX_256EXT(BLEND, OBJWIN) \
|
||||||
charBase = (background->charBase + (GBA_TEXT_MAP_TILE(mapData) << 6)) + (localY << 3); \
|
charBase = (background->charBase + (GBA_TEXT_MAP_TILE(mapData) << 6)) + (localY << 3); \
|
||||||
vram = renderer->d.vramBG[charBase >> VRAM_BLOCK_OFFSET]; \
|
vram = renderer->d.vramBG[charBase >> VRAM_BLOCK_OFFSET]; \
|
||||||
int end2 = end - 4; \
|
if (LIKELY(vram)) { \
|
||||||
paletteData = GBA_TEXT_MAP_PALETTE(mapData) << 8; \
|
int end2 = end - 4; \
|
||||||
palette = &mainPalette[paletteData]; \
|
paletteData = GBA_TEXT_MAP_PALETTE(mapData) << 8; \
|
||||||
if (!GBA_TEXT_MAP_HFLIP(mapData)) { \
|
palette = &mainPalette[paletteData]; \
|
||||||
int shift = inX & 0x3; \
|
if (!GBA_TEXT_MAP_HFLIP(mapData)) { \
|
||||||
if (end2 > outX) { \
|
int shift = inX & 0x3; \
|
||||||
LOAD_32(tileData, charBase & VRAM_BLOCK_MASK, vram); \
|
if (end2 > outX) { \
|
||||||
|
LOAD_32(tileData, charBase & VRAM_BLOCK_MASK, vram); \
|
||||||
|
tileData >>= 8 * shift; \
|
||||||
|
shift = 0; \
|
||||||
|
for (; outX < end2; ++outX) { \
|
||||||
|
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
LOAD_32(tileData, (charBase + 4) & VRAM_BLOCK_MASK, vram); \
|
||||||
tileData >>= 8 * shift; \
|
tileData >>= 8 * shift; \
|
||||||
shift = 0; \
|
for (; outX < end; ++outX) { \
|
||||||
for (; outX < end2; ++outX) { \
|
|
||||||
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
|
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
|
||||||
} \
|
} \
|
||||||
} \
|
} else { \
|
||||||
\
|
int start = outX; \
|
||||||
LOAD_32(tileData, (charBase + 4) & VRAM_BLOCK_MASK, vram); \
|
outX = end - 1; \
|
||||||
tileData >>= 8 * shift; \
|
if (end2 > start) { \
|
||||||
for (; outX < end; ++outX) { \
|
LOAD_32(tileData, charBase & VRAM_BLOCK_MASK, vram); \
|
||||||
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
|
for (; outX >= end2; --outX) { \
|
||||||
} \
|
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
|
||||||
} else { \
|
} \
|
||||||
int start = outX; \
|
charBase += 4; \
|
||||||
outX = end - 1; \
|
} \
|
||||||
if (end2 > start) { \
|
\
|
||||||
LOAD_32(tileData, charBase & VRAM_BLOCK_MASK, vram); \
|
LOAD_32(tileData, charBase & VRAM_BLOCK_MASK, vram); \
|
||||||
for (; outX >= end2; --outX) { \
|
for (; outX >= renderer->start; --outX) { \
|
||||||
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
|
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
|
||||||
} \
|
} \
|
||||||
charBase += 4; \
|
|
||||||
} \
|
|
||||||
\
|
|
||||||
LOAD_32(tileData, charBase & VRAM_BLOCK_MASK, vram); \
|
|
||||||
for (; outX >= renderer->start; --outX) { \
|
|
||||||
BACKGROUND_DRAW_PIXEL_256(BLEND, OBJWIN, 0); \
|
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue