all repos — mgba @ 09f8c4977b168af18020388b0c40b472446a797d

mGBA Game Boy Advance Emulator

GBA Video: Squelch OBJWIN warnings
Jeffrey Pfau jeffrey@endrift.com
Sat, 21 Feb 2015 19:07:40 -0800
commit

09f8c4977b168af18020388b0c40b472446a797d

parent

8a082312e635f22837a83ae5bdc4c3369a9a6821

1 files changed, 5 insertions(+), 3 deletions(-)

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

@@ -859,16 +859,17 @@ if (GBA_TEXT_MAP_VFLIP(mapData)) { \

localY = 7 - localY; \ } +// TODO: Remove UNUSEDs after implementing OBJWIN for modes 3 - 5 #define PREPARE_OBJWIN \ int objwinSlowPath = GBARegisterDISPCNTIsObjwinEnable(renderer->dispcnt); \ int objwinOnly = 0; \ int objwinForceEnable = 0; \ - color_t* objwinPalette; \ + UNUSED(objwinForceEnable); \ + color_t* objwinPalette = renderer->normalPalette; \ + UNUSED(objwinPalette); \ if (objwinSlowPath) { \ if (background->target1 && GBAWindowControlIsBlendEnable(renderer->objwin.packed) && (renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN)) { \ objwinPalette = renderer->variantPalette; \ - } else { \ - objwinPalette = renderer->normalPalette; \ } \ switch (background->index) { \ case 0: \

@@ -1424,6 +1425,7 @@ color_t* palette = renderer->normalPalette; \

if (variant) { \ palette = renderer->variantPalette; \ } \ + UNUSED(palette); \ PREPARE_OBJWIN; #define BACKGROUND_BITMAP_ITERATE(W, H) \