From 9a1143a3e7e4b1ec4baa00841e87b50fbfe60c26 Mon Sep 17 00:00:00 2001 From: shashclp Date: Thu, 11 Jan 2007 05:08:45 +0000 Subject: [PATCH] - Fixed the bug that resulted in missing backgrounds in Megaman ZX and AoE (probably others too) --- desmume/src/GPU.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/desmume/src/GPU.c b/desmume/src/GPU.c index 20e6a961c..d9a8ecda0 100644 --- a/desmume/src/GPU.c +++ b/desmume/src/GPU.c @@ -377,7 +377,17 @@ void GPU_setBGProp(GPU * gpu, u16 num, u16 p) gpu->BG_bmp_ram[num] += (cnt->ScreenBase_Block * ADDRESS_STEP_16KB); gpu->BG_map_ram[num] += (cnt->ScreenBase_Block * ADDRESS_STEP_2KB); - gpu->BGExtPalSlot[num] = cnt->PaletteSet_Wrap * 2 + num ; + switch(num) + { + case 0: + case 1: + gpu->BGExtPalSlot[num] = cnt->PaletteSet_Wrap * 2 + num ; + break; + + default: + gpu->BGExtPalSlot[num] = (u8)num; + break; + } /*if(!(prop&(3<<16))) {