Previous 15994 Revisions Next

r5444 Sunday 16th August, 2009 at 11:08:50 UTC by Fabio Priuli
[SNES] minor change: converted color clipping to use struct entries
[src/mame/video]snes.c

src/mame/video/snes.c
r5443r5444
290290               c = snes_cgram[pal + colour];
291291
292292            if (screen == MAINSCREEN)   /* Only blend main screens */
293               snes_draw_blend(ii/snes_htmult, &c, snes_ppu.layer[layer].blend, (snes_ram[CGWSEL] & 0x30) >> 4, (snes_ram[CGWSEL] & 0xc0) >> 6);
293               snes_draw_blend(ii/snes_htmult, &c, snes_ppu.layer[layer].blend, snes_ppu.sub_color_mask, snes_ppu.main_color_mask);
294294            if (snes_ppu.layer[layer].mosaic_enabled) // handle horizontal mosaic
295295            {
296296               int x_mos;
r5443r5444
390390         {
391391            c = snes_cgram[pal + colour];
392392            if (blend && screen == MAINSCREEN)   /* Only blend main screens */
393               snes_draw_blend(ii/snes_htmult, &c, snes_ppu.layer[4].blend, (snes_ram[CGWSEL] & 0x30) >> 4, (snes_ram[CGWSEL] & 0xc0) >> 6);
393               snes_draw_blend(ii/snes_htmult, &c, snes_ppu.layer[4].blend, snes_ppu.sub_color_mask, snes_ppu.main_color_mask);
394394
395395            scanlines[screen].buffer[ii] = c;
396396            scanlines[screen].zbuf[ii] = priority;
r5443r5444
720720            clr = snes_cgram[colour];
721721         /* Only blend main screens */
722722         if (screen == MAINSCREEN)
723            snes_draw_blend(xpos, &clr, snes_ppu.layer[layer].blend, (snes_ram[CGWSEL] & 0x30) >> 4, (snes_ram[CGWSEL] & 0xc0) >> 6); /* FIXME: Need to support clip mode */
723            snes_draw_blend(xpos, &clr, snes_ppu.layer[layer].blend, snes_ppu.sub_color_mask, snes_ppu.main_color_mask); /* FIXME: Need to support clip mode */
724724
725725         scanlines[screen].buffer[xpos] = clr;
726726         scanlines[screen].zbuf[xpos] = priority;
r5443r5444
11911191      {
11921192         for(ii = 0; ii < SNES_SCR_WIDTH * snes_htmult; ii++)
11931193         {
1194            snes_draw_blend(ii/snes_htmult, &scanlines[MAINSCREEN].buffer[ii], (snes_ram[CGADSUB] & 0x80) ? SNES_BLEND_SUB : SNES_BLEND_ADD, (snes_ram[CGWSEL] & 0x30) >> 4, (snes_ram[CGWSEL] & 0xc0) >> 6);
1194            snes_draw_blend(ii/snes_htmult, &scanlines[MAINSCREEN].buffer[ii], (snes_ram[CGADSUB] & 0x80) ? SNES_BLEND_SUB : SNES_BLEND_ADD, snes_ppu.sub_color_mask, snes_ppu.main_color_mask);
11951195         }
11961196      }
11971197

Previous 15994 Revisions Next


© 1998-2018 The MESS Team