From b13abebee0c4002d7efa44f97be37164d201ec43 Mon Sep 17 00:00:00 2001 From: goldnchild <48141308+goldnchild@users.noreply.github.com> Date: Wed, 3 Aug 2022 01:51:02 -0700 Subject: rescue, minefld: make bullets 2x2 pixels instead of a single pixel (#10172) --- src/mame/galaxian/galaxold.h | 1 + src/mame/galaxian/galaxold_v.cpp | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/mame/galaxian/galaxold.h b/src/mame/galaxian/galaxold.h index a3497231d7b..6bf0b11bef7 100644 --- a/src/mame/galaxian/galaxold.h +++ b/src/mame/galaxian/galaxold.h @@ -227,6 +227,7 @@ public: void scrambold_draw_bullets(bitmap_ind16 &bitmap, const rectangle &cliprect, int offs, int x, int y); void darkplnt_draw_bullets(bitmap_ind16 &bitmap, const rectangle &cliprect, int offs, int x, int y); void dambustr_draw_bullets(bitmap_ind16 &bitmap, const rectangle &cliprect, int offs, int x, int y); + void rescue_draw_bullets(bitmap_ind16 &bitmap, const rectangle &cliprect, int offs, int x, int y); void galaxold_draw_background(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void scrambold_draw_background(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void ad2083_draw_background(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/galaxian/galaxold_v.cpp b/src/mame/galaxian/galaxold_v.cpp index fd10e4dacf3..07c83b0f923 100644 --- a/src/mame/galaxian/galaxold_v.cpp +++ b/src/mame/galaxian/galaxold_v.cpp @@ -441,6 +441,8 @@ VIDEO_START_MEMBER(galaxold_state,rescue) { VIDEO_START_CALL_MEMBER(scrambold); + m_draw_bullets = &galaxold_state::rescue_draw_bullets; + m_draw_stars = &galaxold_state::rescue_draw_stars; m_draw_background = &galaxold_state::rescue_draw_background; @@ -450,6 +452,8 @@ VIDEO_START_MEMBER(galaxold_state,minefld) { VIDEO_START_CALL_MEMBER(scrambold); + m_draw_bullets = &galaxold_state::rescue_draw_bullets; + m_draw_stars = &galaxold_state::rescue_draw_stars; m_draw_background = &galaxold_state::minefld_draw_background; @@ -1040,6 +1044,22 @@ void galaxold_state::dambustr_draw_bullets(bitmap_ind16 &bitmap, const rectangle } } +void galaxold_state::rescue_draw_bullets(bitmap_ind16 &bitmap, const rectangle &cliprect, int offs, int x, int y) +{ + if (flip_screen_x()) x++; + + x = x - 6; + + int color = BULLETS_COLOR_BASE; + + /* bullets are 2 pixels square */ + for (int i = 0; i < 2; i++) + for (int j = 0; j < 2; j++) + { + if (cliprect.contains(x+i, y+j)) + bitmap.pix(y+j, x+i) = color; + } +} /* background drawing functions */ -- cgit v1.2.3