all repos — mgba @ 03361f20a2c8bb4ba5924bbcfbb79edce28fc20a

mGBA Game Boy Advance Emulator

Start drawing backdrop
Jeffrey Pfau jeffrey@endrift.com
Wed, 01 May 2013 02:32:56 -0700
commit

03361f20a2c8bb4ba5924bbcfbb79edce28fc20a

parent

2e9a64a26ee99cc1105bc8967b67f66e896756c8

1 files changed, 10 insertions(+), 1 deletions(-)

jump to
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -204,11 +204,20 @@ for (int x = 0; x < VIDEO_HORIZONTAL_PIXELS; ++x) {

row[x] = GBA_COLOR_WHITE; } return; + } else { + uint32_t backdrop; + if (!softwareRenderer->target1Bd || softwareRenderer->blendEffect == BLEND_NONE || softwareRenderer->blendEffect == BLEND_ALPHA) { + backdrop = softwareRenderer->normalPalette[0]; + } else { + backdrop = softwareRenderer->variantPalette[0]; + } + for (int x = 0; x < VIDEO_HORIZONTAL_PIXELS; ++x) { + row[x] = backdrop; + } } memset(softwareRenderer->flags, 0, sizeof(softwareRenderer->flags)); memset(softwareRenderer->spriteLayer, 0, sizeof(softwareRenderer->spriteLayer)); - memset(row, 0, sizeof(*row) * VIDEO_HORIZONTAL_PIXELS); softwareRenderer->row = row; softwareRenderer->start = 0;