From 100afe3a0316559329412b182e9fda67b886febe Mon Sep 17 00:00:00 2001 From: Fabio Priuli Date: Sun, 16 Aug 2009 11:41:53 +0000 Subject: [PATCH] [SNES] minor change: converted color clipping to use struct entries --- src/mame/video/snes.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mame/video/snes.c b/src/mame/video/snes.c index f28d1e59bad..6178470b5c6 100644 --- a/src/mame/video/snes.c +++ b/src/mame/video/snes.c @@ -290,7 +290,7 @@ INLINE void snes_draw_tile(UINT8 screen, UINT8 planes, UINT8 layer, UINT16 tilea c = snes_cgram[pal + colour]; if (screen == MAINSCREEN) /* Only blend main screens */ - snes_draw_blend(ii/snes_htmult, &c, snes_ppu.layer[layer].blend, (snes_ram[CGWSEL] & 0x30) >> 4, (snes_ram[CGWSEL] & 0xc0) >> 6); + snes_draw_blend(ii/snes_htmult, &c, snes_ppu.layer[layer].blend, snes_ppu.sub_color_mask, snes_ppu.main_color_mask); if (snes_ppu.layer[layer].mosaic_enabled) // handle horizontal mosaic { int x_mos; @@ -390,7 +390,7 @@ INLINE void snes_draw_tile_object(UINT8 screen, UINT16 tileaddr, INT16 x, UINT8 { c = snes_cgram[pal + colour]; if (blend && screen == MAINSCREEN) /* Only blend main screens */ - snes_draw_blend(ii/snes_htmult, &c, snes_ppu.layer[4].blend, (snes_ram[CGWSEL] & 0x30) >> 4, (snes_ram[CGWSEL] & 0xc0) >> 6); + snes_draw_blend(ii/snes_htmult, &c, snes_ppu.layer[4].blend, snes_ppu.sub_color_mask, snes_ppu.main_color_mask); scanlines[screen].buffer[ii] = c; scanlines[screen].zbuf[ii] = priority; @@ -720,7 +720,7 @@ static void snes_update_line_mode7(UINT8 screen, UINT8 priority_a, UINT8 priorit clr = snes_cgram[colour]; /* Only blend main screens */ if (screen == MAINSCREEN) - 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 */ + snes_draw_blend(xpos, &clr, snes_ppu.layer[layer].blend, snes_ppu.sub_color_mask, snes_ppu.main_color_mask); scanlines[screen].buffer[xpos] = clr; scanlines[screen].zbuf[xpos] = priority; @@ -1191,7 +1191,7 @@ static void snes_refresh_scanline( running_machine *machine, bitmap_t *bitmap, U { for(ii = 0; ii < SNES_SCR_WIDTH * snes_htmult; ii++) { - 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); + 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); } }