rescue, minefld: make bullets 2x2 pixels instead of a single pixel (#10172)

This commit is contained in:
goldnchild 2022-08-03 01:51:02 -07:00 committed by GitHub
parent 7a22becec6
commit b13abebee0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

View File

@ -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);

View File

@ -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 */