From 627feac44812f2bee94aa78443e9d1c2abce335c Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Thu, 16 Dec 2010 18:29:54 +0000 Subject: [PATCH] Fixed a title screen color bug in World PK Soccer [Angelo Salese] --- src/mame/video/m107.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/mame/video/m107.c b/src/mame/video/m107.c index a5413ee0137..5c00eb2c1d3 100644 --- a/src/mame/video/m107.c +++ b/src/mame/video/m107.c @@ -290,7 +290,7 @@ static void m107_update_scroll_positions(void) /*****************************************************************************/ -static void m107_tilemap_draw(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int laynum, int category) +static void m107_tilemap_draw(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int laynum, int category,int opaque) { int line; rectangle clip; @@ -311,11 +311,11 @@ static void m107_tilemap_draw(running_machine *machine, bitmap_t *bitmap, const tilemap_set_scrollx(pf_layer[laynum].tmap,0, m107_control[1 + 2 * laynum]); tilemap_set_scrolly(pf_layer[laynum].tmap,0, (m107_control[0 + 2 * laynum] + scrolldata[line])); - tilemap_draw(bitmap, &clip, pf_layer[laynum].tmap, category, 0); + tilemap_draw(bitmap, &clip, pf_layer[laynum].tmap, category | opaque, 0); } } else - tilemap_draw(bitmap, cliprect, pf_layer[laynum].tmap, category, 0); + tilemap_draw(bitmap, cliprect, pf_layer[laynum].tmap, category | opaque, 0); } @@ -323,21 +323,22 @@ static void m107_screenrefresh(running_machine *machine, bitmap_t *bitmap, const { if ((~m107_control[0x0b] >> 7) & 1) { - m107_tilemap_draw(machine, bitmap, cliprect, 3, 0); - m107_tilemap_draw(machine, bitmap, cliprect, 3, 1); + m107_tilemap_draw(machine, bitmap, cliprect, 3, 0,0); + m107_tilemap_draw(machine, bitmap, cliprect, 3, 1,0); } else bitmap_fill(bitmap, cliprect, 0); - m107_tilemap_draw(machine, bitmap, cliprect, 2, 0); - m107_tilemap_draw(machine, bitmap, cliprect, 1, 0); - m107_tilemap_draw(machine, bitmap, cliprect, 0, 0); + /* note: the opaque flag is used if layer 3 is disabled, noticeable in World PK Soccer title and gameplay screens*/ + m107_tilemap_draw(machine, bitmap, cliprect, 2, 0,(((m107_control[0x0b] >> 7) & 1) ? TILEMAP_DRAW_OPAQUE : 0)); + m107_tilemap_draw(machine, bitmap, cliprect, 1, 0,0); + m107_tilemap_draw(machine, bitmap, cliprect, 0, 0,0); draw_sprites(machine, bitmap, cliprect, 0); - m107_tilemap_draw(machine, bitmap, cliprect, 2, 1); - m107_tilemap_draw(machine, bitmap, cliprect, 1, 1); - m107_tilemap_draw(machine, bitmap, cliprect, 0, 1); + m107_tilemap_draw(machine, bitmap, cliprect, 2, 1,0); + m107_tilemap_draw(machine, bitmap, cliprect, 1, 1,0); + m107_tilemap_draw(machine, bitmap, cliprect, 0, 1,0); draw_sprites(machine, bitmap, cliprect, 1);