GBA Video: Slight optimizations

This commit is contained in:
Jeffrey Pfau 2016-02-27 02:38:44 -08:00
parent be97f04971
commit 24f0be2862
2 changed files with 11 additions and 3 deletions

View File

@ -41,10 +41,12 @@
x += background->dx; \
y += background->dy; \
\
MOSAIC(COORD) \
\
uint32_t current = *pixel; \
if (pixelData && IS_WRITABLE(current)) { \
if (!IS_WRITABLE(current)) { \
continue; \
} \
MOSAIC(COORD) \
if (pixelData) { \
COMPOSITE_256_ ## OBJWIN (BLEND); \
} \
}

View File

@ -517,6 +517,12 @@ static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* render
backdrop |= softwareRenderer->variantPalette[0];
}
int end = softwareRenderer->windows[w].endX;
for (; x < end - 3; x += 4) {
softwareRenderer->row[x] = backdrop;
softwareRenderer->row[x + 1] = backdrop;
softwareRenderer->row[x + 2] = backdrop;
softwareRenderer->row[x + 3] = backdrop;
}
for (; x < end; ++x) {
softwareRenderer->row[x] = backdrop;
}