diff options
author | angelosa <salese_corp_ltd@email.it> | 2017-09-21 01:50:23 +0200 |
---|---|---|
committer | angelosa <salese_corp_ltd@email.it> | 2017-09-21 02:39:28 +0200 |
commit | 6a61136c455abf30cd1273f533aca2d6d69d108e (patch) | |
tree | e06621ec993c56eea254bc4e137328685e8d9dfa | |
parent | 4597cfea68d059e5c64da3e861c435ccd7b477b6 (diff) |
buggychl.cpp: fixed background pen and clipping enable (fixes title screen and stage 3 graphics) [Angelo Salese]
-rw-r--r-- | src/mame/includes/buggychl.h | 2 | ||||
-rw-r--r-- | src/mame/video/buggychl.cpp | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/src/mame/includes/buggychl.h b/src/mame/includes/buggychl.h index 2b517543e80..859878049e0 100644 --- a/src/mame/includes/buggychl.h +++ b/src/mame/includes/buggychl.h @@ -43,7 +43,7 @@ public: bitmap_ind16 m_tmp_bitmap2; tilemap_t *m_bg_tilemap; int m_sl_bank; - int m_bg_on; + int m_bg_clip_on; int m_sky_on; int m_sprite_color_base; int m_bg_scrollx; diff --git a/src/mame/video/buggychl.cpp b/src/mame/video/buggychl.cpp index 5c1e2588aaa..c483d803d0a 100644 --- a/src/mame/video/buggychl.cpp +++ b/src/mame/video/buggychl.cpp @@ -58,7 +58,7 @@ WRITE8_MEMBER(buggychl_state::buggychl_ctrl_w) flip_screen_y_set(data & 0x01); flip_screen_x_set(data & 0x02); - m_bg_on = data & 0x04; + m_bg_clip_on = data & 0x04; m_sky_on = data & 0x08; m_sprite_color_base = (data & 0x10) ? 1 * 16 : 3 * 16; @@ -88,8 +88,12 @@ void buggychl_state::draw_bg( bitmap_ind16 &bitmap, const rectangle &cliprect ) /* prevent wraparound */ rectangle clip = cliprect; - if (flip_screen_x()) clip.min_x += 8*8; - else clip.max_x -= 8*8; + // enable clipping if on (title screen disable this to cover all of the area) + if(m_bg_clip_on) + { + if (flip_screen_x()) clip.min_x += 8*8; + else clip.max_x -= 8*8; + } for (offs = 0; offs < 0x400; offs++) { @@ -228,10 +232,9 @@ uint32_t buggychl_state::screen_update_buggychl(screen_device &screen, bitmap_in if (m_sky_on) draw_sky(bitmap, cliprect); else - bitmap.fill(0, cliprect); + bitmap.fill(0x20, cliprect); // stage 3 disables sky, wants background pen to be blue - if (m_bg_on) - draw_bg(bitmap, cliprect); + draw_bg(bitmap, cliprect); draw_sprites(bitmap, cliprect); |