diff options
Diffstat (limited to 'src/mame/video/starshp1.c')
-rw-r--r-- | src/mame/video/starshp1.c | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/src/mame/video/starshp1.c b/src/mame/video/starshp1.c index e3e21201cf5..fdb35ba1c69 100644 --- a/src/mame/video/starshp1.c +++ b/src/mame/video/starshp1.c @@ -350,67 +350,65 @@ static int circle_collision(starshp1_state *state, const rectangle &rect) } -SCREEN_UPDATE_IND16( starshp1 ) +UINT32 starshp1_state::screen_update_starshp1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - starshp1_state *state = screen.machine().driver_data<starshp1_state>(); - set_pens(state, screen.machine().colortable); + set_pens(this, screen.machine().colortable); bitmap.fill(0, cliprect); - if (state->m_starfield_kill == 0) - draw_starfield(state, bitmap); + if (m_starfield_kill == 0) + draw_starfield(this, bitmap); draw_sprites(screen.machine(), bitmap, cliprect); - if (state->m_circle_kill == 0 && state->m_circle_mod != 0) + if (m_circle_kill == 0 && m_circle_mod != 0) draw_circle(screen.machine(), bitmap); - if (state->m_attract == 0) + if (m_attract == 0) draw_spaceship(screen.machine(), bitmap, cliprect); - if (state->m_circle_kill == 0 && state->m_circle_mod == 0) + if (m_circle_kill == 0 && m_circle_mod == 0) draw_circle(screen.machine(), bitmap); - state->m_bg_tilemap->draw(bitmap, cliprect, 0, 0); + m_bg_tilemap->draw(bitmap, cliprect, 0, 0); - if (state->m_phasor != 0) - draw_phasor(state, bitmap); + if (m_phasor != 0) + draw_phasor(this, bitmap); return 0; } -SCREEN_VBLANK( starshp1 ) +void starshp1_state::screen_eof_starshp1(screen_device &screen, bool state) { // rising edge - if (vblank_on) + if (state) { - starshp1_state *state = screen.machine().driver_data<starshp1_state>(); rectangle rect; const rectangle &visarea = screen.machine().primary_screen->visible_area(); - rect.min_x = get_sprite_hpos(state, 13); - rect.min_y = get_sprite_vpos(state, 13); + rect.min_x = get_sprite_hpos(this, 13); + rect.min_y = get_sprite_vpos(this, 13); rect.max_x = rect.min_x + screen.machine().gfx[1]->width() - 1; rect.max_y = rect.min_y + screen.machine().gfx[1]->height() - 1; - rect &= state->m_helper.cliprect(); + rect &= m_helper.cliprect(); - state->m_helper.fill(0, visarea); + m_helper.fill(0, visarea); - if (state->m_attract == 0) - draw_spaceship(screen.machine(), state->m_helper, visarea); + if (m_attract == 0) + draw_spaceship(screen.machine(), m_helper, visarea); - if (circle_collision(state, visarea)) - state->m_collision_latch |= 1; + if (circle_collision(this, visarea)) + m_collision_latch |= 1; - if (circle_collision(state, rect)) - state->m_collision_latch |= 2; + if (circle_collision(this, rect)) + m_collision_latch |= 2; - if (spaceship_collision(screen.machine(), state->m_helper, rect)) - state->m_collision_latch |= 4; + if (spaceship_collision(screen.machine(), m_helper, rect)) + m_collision_latch |= 4; - if (spaceship_collision(screen.machine(), state->m_helper, visarea)) - state->m_collision_latch |= 8; + if (spaceship_collision(screen.machine(), m_helper, visarea)) + m_collision_latch |= 8; } } |