From b9698df878da5dc57c6af82371ea37f7d6d6407c Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Wed, 6 Feb 2013 18:25:23 +0000 Subject: [PATCH] Part 2 of Last Bronx gfx fixing: that shadow logic looks quite illogic to me ... --- src/mame/video/stvvdp2.c | 74 +++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/src/mame/video/stvvdp2.c b/src/mame/video/stvvdp2.c index 87dfb9e99a1..8741894310f 100644 --- a/src/mame/video/stvvdp2.c +++ b/src/mame/video/stvvdp2.c @@ -6554,15 +6554,6 @@ static void draw_sprites(running_machine &machine, bitmap_rgb32 &bitmap, const r continue; }; - if ( pix & sprite_shadow ) - { - if ( pix & ~sprite_shadow ) - { - UINT32 p = bitmap_line[x]; - bitmap_line[x] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1); - } - } - else { pix &= sprite_colormask; if ( pix == (sprite_colormask - 1) ) @@ -6583,6 +6574,16 @@ static void draw_sprites(running_machine &machine, bitmap_rgb32 &bitmap, const r bitmap_line[x] = machine.pens[ pix ]; } } + + /* TODO: I don't think this one makes much logic ... (1) */ + if ( pix & sprite_shadow ) + { + if ( pix & ~sprite_shadow ) + { + UINT32 p = bitmap_line[x]; + bitmap_line[x] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1); + } + } } } } @@ -6646,15 +6647,7 @@ static void draw_sprites(running_machine &machine, bitmap_rgb32 &bitmap, const r } } - if ( pix & sprite_shadow ) - { - if ( pix & ~sprite_shadow ) - { - UINT32 p = bitmap_line[x]; - bitmap_line[x] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1); - } - } - else + { pix &= sprite_colormask; if ( pix == (sprite_colormask - 1) ) @@ -6686,6 +6679,16 @@ static void draw_sprites(running_machine &machine, bitmap_rgb32 &bitmap, const r bitmap_line[x] = machine.pens[pix]; } } + + /* TODO: (1) */ + if ( pix & sprite_shadow ) + { + if ( pix & ~sprite_shadow ) + { + UINT32 p = bitmap_line[x]; + bitmap_line[x] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1); + } + } } } } @@ -6801,23 +6804,6 @@ static void draw_sprites(running_machine &machine, bitmap_rgb32 &bitmap, const r } } - if ( pix & sprite_shadow ) - { - if ( pix & ~sprite_shadow ) - { - UINT32 p; //= bitmap_line[x]; - if(double_x) - { - p = bitmap_line[x*2]; - bitmap_line[x*2] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1); - p = bitmap_line[x*2+1]; - bitmap_line[x*2+1] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1); - } - else - bitmap_line[x] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1); - } - } - else { pix &= sprite_colormask; if ( pix == (sprite_colormask - 1) ) @@ -6892,6 +6878,24 @@ static void draw_sprites(running_machine &machine, bitmap_rgb32 &bitmap, const r } } } + + /* TODO: (1) */ + if ( pix & sprite_shadow ) + { + if ( pix & ~sprite_shadow ) + { + UINT32 p; //= bitmap_line[x]; + if(double_x) + { + p = bitmap_line[x*2]; + bitmap_line[x*2] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1); + p = bitmap_line[x*2+1]; + bitmap_line[x*2+1] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1); + } + else + bitmap_line[x] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1); + } + } } } }