From f18e5bd4e61283412c061c7c50f50a1992703729 Mon Sep 17 00:00:00 2001 From: mooglyguy Date: Thu, 5 Apr 2018 21:45:33 +0200 Subject: -output: Removed legacy output handlers from stactics, skydiver, starcrus. [Ryan Holtz] --- src/mame/drivers/stactics.cpp | 15 ++-- src/mame/drivers/starcrus.cpp | 4 + src/mame/includes/skydiver.h | 20 ++++- src/mame/includes/stactics.h | 13 ++- src/mame/includes/starcrus.h | 45 ++++++----- src/mame/video/skydiver.cpp | 30 ++++--- src/mame/video/stactics.cpp | 14 ++-- src/mame/video/starcrus.cpp | 179 +++++++++++++++++++----------------------- 8 files changed, 179 insertions(+), 141 deletions(-) diff --git a/src/mame/drivers/stactics.cpp b/src/mame/drivers/stactics.cpp index 3900352adad..eb2aee9809b 100644 --- a/src/mame/drivers/stactics.cpp +++ b/src/mame/drivers/stactics.cpp @@ -65,8 +65,7 @@ WRITE_LINE_MEMBER(stactics_state::motor_w) CUSTOM_INPUT_MEMBER(stactics_state::get_motor_not_ready) { // if the motor is self-centering, but not centered yet - return (!m_motor_on && - (m_horiz_pos != 0 || m_vert_pos != 0)); + return (!m_motor_on && (m_horiz_pos != 0 || m_vert_pos != 0)); } @@ -87,23 +86,23 @@ void stactics_state::move_motor() // monitor motor under joystick control if (m_motor_on) { - int ip3 = ioport("IN3")->read(); - int ip4 = ioport("FAKE")->read(); + const int in3 = m_in3->read(); + const int in4 = m_fake->read(); /* up */ - if (((ip4 & 0x01) == 0) && (m_vert_pos > -128)) + if (!(in4 & 0x01) && m_vert_pos > -128) m_vert_pos--; /* down */ - if (((ip4 & 0x02) == 0) && (m_vert_pos < 127)) + if (!(in4 & 0x02) && m_vert_pos < 127) m_vert_pos++; /* left */ - if (((ip3 & 0x20) == 0) && (m_horiz_pos < 127)) + if (!(in3 & 0x20) && m_horiz_pos < 127) m_horiz_pos++; /* right */ - if (((ip3 & 0x40) == 0) && (m_horiz_pos > -128)) + if (!(in3 & 0x40) && m_horiz_pos > -128) m_horiz_pos--; } diff --git a/src/mame/drivers/starcrus.cpp b/src/mame/drivers/starcrus.cpp index b61ac8c6972..57250aecef0 100644 --- a/src/mame/drivers/starcrus.cpp +++ b/src/mame/drivers/starcrus.cpp @@ -19,6 +19,10 @@ palazzol@home.com #include "screen.h" #include "speaker.h" +void starcrus_state::machine_start() +{ + m_led.resolve(); +} void starcrus_state::starcrus_map(address_map &map) { diff --git a/src/mame/includes/skydiver.h b/src/mame/includes/skydiver.h index fa04ad4f9f2..9c88d887b69 100644 --- a/src/mame/includes/skydiver.h +++ b/src/mame/includes/skydiver.h @@ -38,7 +38,16 @@ public: m_discrete(*this, "discrete"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), - m_videoram(*this, "videoram") + m_videoram(*this, "videoram"), + m_leds(*this, "led%u", 0U), + m_lamp_s(*this, "lamps"), + m_lamp_k(*this, "lampk"), + m_lamp_y(*this, "lampy"), + m_lamp_d(*this, "lampd"), + m_lamp_i(*this, "lampi"), + m_lamp_v(*this, "lampv"), + m_lamp_e(*this, "lampe"), + m_lamp_r(*this, "lampr") { } void skydiver(machine_config &config); @@ -84,6 +93,15 @@ private: required_shared_ptr m_videoram; + output_finder<2> m_leds; + output_finder<> m_lamp_s; + output_finder<> m_lamp_k; + output_finder<> m_lamp_y; + output_finder<> m_lamp_d; + output_finder<> m_lamp_i; + output_finder<> m_lamp_v; + output_finder<> m_lamp_e; + output_finder<> m_lamp_r; int m_nmion; tilemap_t *m_bg_tilemap; int m_width; diff --git a/src/mame/includes/stactics.h b/src/mame/includes/stactics.h index 6d1c55eaeb6..82481cb6282 100644 --- a/src/mame/includes/stactics.h +++ b/src/mame/includes/stactics.h @@ -29,7 +29,12 @@ public: m_score_digits(*this, "digit%u", 0U), m_credit_leds(*this, "credit_led%u", 0U), m_barrier_leds(*this, "barrier_led%u", 0U), - m_round_leds(*this, "round_led%u", 0U) + m_round_leds(*this, "round_led%u", 0U), + m_barrier_lamp(*this, "barrier_lamp"), + m_start_lamp(*this, "start_lamp"), + m_sight_led(*this, "sight_led"), + m_in3(*this, "IN3"), + m_fake(*this, "FAKE") { } DECLARE_CUSTOM_INPUT_MEMBER(get_frame_count_d3); @@ -94,6 +99,12 @@ private: output_finder<8> m_credit_leds; output_finder<12> m_barrier_leds; output_finder<16> m_round_leds; + output_finder<> m_barrier_lamp; + output_finder<> m_start_lamp; + output_finder<> m_sight_led; + + required_ioport m_in3; + required_ioport m_fake; /* machine state */ int m_vert_pos; diff --git a/src/mame/includes/starcrus.h b/src/mame/includes/starcrus.h index 725b6d4355f..219a143aa15 100644 --- a/src/mame/includes/starcrus.h +++ b/src/mame/includes/starcrus.h @@ -9,13 +9,38 @@ public: m_maincpu(*this, "maincpu"), m_samples(*this, "samples"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_palette(*this, "palette"), + m_led(*this, "led2") + { } + void starcrus(machine_config &config); + + DECLARE_WRITE8_MEMBER(s1_x_w); + DECLARE_WRITE8_MEMBER(s1_y_w); + DECLARE_WRITE8_MEMBER(s2_x_w); + DECLARE_WRITE8_MEMBER(s2_y_w); + DECLARE_WRITE8_MEMBER(p1_x_w); + DECLARE_WRITE8_MEMBER(p1_y_w); + DECLARE_WRITE8_MEMBER(p2_x_w); + DECLARE_WRITE8_MEMBER(p2_y_w); + DECLARE_WRITE8_MEMBER(ship_parm_1_w); + DECLARE_WRITE8_MEMBER(ship_parm_2_w); + DECLARE_WRITE8_MEMBER(proj_parm_1_w); + DECLARE_WRITE8_MEMBER(proj_parm_2_w); + DECLARE_READ8_MEMBER(coll_det_r); + +protected: + virtual void machine_start() override; + virtual void video_start() override; + +private: required_device m_maincpu; required_device m_samples; required_device m_gfxdecode; required_device m_palette; + output_finder<> m_led; + std::unique_ptr m_ship1_vid; std::unique_ptr m_ship2_vid; std::unique_ptr m_proj1_vid; @@ -49,28 +74,12 @@ public: int m_launch1_sound_playing; int m_launch2_sound_playing; - DECLARE_WRITE8_MEMBER(s1_x_w); - DECLARE_WRITE8_MEMBER(s1_y_w); - DECLARE_WRITE8_MEMBER(s2_x_w); - DECLARE_WRITE8_MEMBER(s2_y_w); - DECLARE_WRITE8_MEMBER(p1_x_w); - DECLARE_WRITE8_MEMBER(p1_y_w); - DECLARE_WRITE8_MEMBER(p2_x_w); - DECLARE_WRITE8_MEMBER(p2_y_w); - DECLARE_WRITE8_MEMBER(ship_parm_1_w); - DECLARE_WRITE8_MEMBER(ship_parm_2_w); - DECLARE_WRITE8_MEMBER(proj_parm_1_w); - DECLARE_WRITE8_MEMBER(proj_parm_2_w); - DECLARE_READ8_MEMBER(coll_det_r); - - virtual void video_start() override; - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); int collision_check_s1s2(); int collision_check_p1p2(); int collision_check_s1p1p2(); int collision_check_s2p1p2(); - void starcrus(machine_config &config); + void starcrus_io_map(address_map &map); void starcrus_map(address_map &map); }; diff --git a/src/mame/video/skydiver.cpp b/src/mame/video/skydiver.cpp index 6b5c1dcd49b..25da384a8de 100644 --- a/src/mame/video/skydiver.cpp +++ b/src/mame/video/skydiver.cpp @@ -42,6 +42,16 @@ void skydiver_state::video_start() save_item(NAME(m_nmion)); save_item(NAME(m_width)); + + m_leds.resolve(); + m_lamp_s.resolve(); + m_lamp_k.resolve(); + m_lamp_y.resolve(); + m_lamp_d.resolve(); + m_lamp_i.resolve(); + m_lamp_v.resolve(); + m_lamp_e.resolve(); + m_lamp_r.resolve(); } @@ -83,53 +93,53 @@ WRITE_LINE_MEMBER(skydiver_state::coin_lockout_w) WRITE_LINE_MEMBER(skydiver_state::start_lamp_1_w) { - output().set_led_value(0, state); + m_leds[0] = state; } WRITE_LINE_MEMBER(skydiver_state::start_lamp_2_w) { - output().set_led_value(1, state); + m_leds[1] = state; } WRITE_LINE_MEMBER(skydiver_state::lamp_s_w) { - output().set_value("lamps", state); + m_lamp_s = state; } WRITE_LINE_MEMBER(skydiver_state::lamp_k_w) { - output().set_value("lampk", state); + m_lamp_k = state; } WRITE_LINE_MEMBER(skydiver_state::lamp_y_w) { - output().set_value("lampy", state); + m_lamp_y = state; } WRITE_LINE_MEMBER(skydiver_state::lamp_d_w) { - output().set_value("lampd", state); + m_lamp_d = state; } WRITE_LINE_MEMBER(skydiver_state::lamp_i_w) { - output().set_value("lampi", state); + m_lamp_i = state; } WRITE_LINE_MEMBER(skydiver_state::lamp_v_w) { - output().set_value("lampv", state); + m_lamp_v = state; } WRITE_LINE_MEMBER(skydiver_state::lamp_e_w) { - output().set_value("lampe", state); + m_lamp_e = state; } WRITE_LINE_MEMBER(skydiver_state::lamp_r_w) { - output().set_value("lampr", state); + m_lamp_r = state; } WRITE8_MEMBER(skydiver_state::latch3_watchdog_w) diff --git a/src/mame/video/stactics.cpp b/src/mame/video/stactics.cpp index e0e9a0953fd..d9a25bc472c 100644 --- a/src/mame/video/stactics.cpp +++ b/src/mame/video/stactics.cpp @@ -307,23 +307,22 @@ template void stactics_state::set_indicator_leds(unsigned offset, o WRITE_LINE_MEMBER(stactics_state::barrier_lamp_w) { // this needs to flash on/off, not implemented - machine().output().set_value("barrier_lamp", state); + m_barrier_lamp = state; } WRITE_LINE_MEMBER(stactics_state::start_lamp_w) { - machine().output().set_value("start_lamp", state); + m_start_lamp = state; } void stactics_state::update_artwork() { - int i; uint8_t *beam_region = memregion("user1")->base(); /* laser beam - loop for each LED */ - for (i = 0; i < 0x40; i++) + for (int i = 0; i < 0x40; i++) { offs_t const beam_data_offs = ((i & 0x08) << 7) | ((i & 0x30) << 4) | m_beam_state; uint8_t const beam_data = beam_region[beam_data_offs]; @@ -334,10 +333,10 @@ void stactics_state::update_artwork() } /* sight LED */ - output().set_value("sight_led", m_motor_on); + m_sight_led = m_motor_on; /* score display */ - for (i = 0x01; i < 0x07; i++) + for (int i = 0x01; i < 0x07; i++) m_score_digits[i - 1] = to_7seg[~m_display_buffer[i] & 0x0f]; /* credits indicator */ @@ -373,6 +372,9 @@ void stactics_state::video_start() m_credit_leds.resolve(); m_barrier_leds.resolve(); m_round_leds.resolve(); + m_barrier_lamp.resolve(); + m_start_lamp.resolve(); + m_sight_led.resolve(); m_y_scroll_d = 0; m_y_scroll_e = 0; diff --git a/src/mame/video/starcrus.cpp b/src/mame/video/starcrus.cpp index 8bd2ce947b4..9a3c647371f 100644 --- a/src/mame/video/starcrus.cpp +++ b/src/mame/video/starcrus.cpp @@ -78,10 +78,10 @@ WRITE8_MEMBER(starcrus_state::ship_parm_1_w) WRITE8_MEMBER(starcrus_state::ship_parm_2_w) { - m_s2_sprite = data&0x1f; - output().set_led_value(2,~data & 0x80); /* game over lamp */ - machine().bookkeeping().coin_counter_w(0, ((data&0x40)>>6)^0x01); /* coin counter */ - m_engine2_on = ((data&0x20)>>5)^0x01; + m_s2_sprite = data & 0x1f; + m_led = !BIT(data, 7); /* game over lamp */ + machine().bookkeeping().coin_counter_w(0, ((data & 0x40) >> 6) ^ 0x01); /* coin counter */ + m_engine2_on = ((data & 0x20) >> 5) ^ 0x01; if (m_engine1_on || m_engine2_on) { @@ -104,16 +104,16 @@ WRITE8_MEMBER(starcrus_state::ship_parm_2_w) WRITE8_MEMBER(starcrus_state::proj_parm_1_w) { - m_p1_sprite = data&0x0f; - m_launch1_on = ((data&0x20)>>5)^0x01; - m_explode1_on = ((data&0x10)>>4)^0x01; + m_p1_sprite = data & 0x0f; + m_launch1_on = ((data & 0x20) >> 5) ^ 0x01; + m_explode1_on = ((data & 0x10) >> 4) ^ 0x01; if (m_explode1_on || m_explode2_on) { if (m_explode_sound_playing == 0) { m_explode_sound_playing = 1; - m_samples->start(1,1, true); /* explosion initial sample */ + m_samples->start(1, 1, true); /* explosion initial sample */ } } else @@ -141,16 +141,16 @@ WRITE8_MEMBER(starcrus_state::proj_parm_1_w) WRITE8_MEMBER(starcrus_state::proj_parm_2_w) { - m_p2_sprite = data&0x0f; - m_launch2_on = ((data&0x20)>>5)^0x01; - m_explode2_on = ((data&0x10)>>4)^0x01; + m_p2_sprite = data & 0x0f; + m_launch2_on = ((data & 0x20) >> 5) ^ 0x01; + m_explode2_on = ((data & 0x10) >> 4) ^ 0x01; if (m_explode1_on || m_explode2_on) { if (m_explode_sound_playing == 0) { m_explode_sound_playing = 1; - m_samples->start(1,1, true); /* explosion initial sample */ + m_samples->start(1, 1, true); /* explosion initial sample */ } } else @@ -178,8 +178,6 @@ WRITE8_MEMBER(starcrus_state::proj_parm_2_w) int starcrus_state::collision_check_s1s2() { - int org_x, org_y; - int sx, sy; rectangle clip(0, 15, 0, 15); m_ship1_vid->fill(0, clip); @@ -187,30 +185,30 @@ int starcrus_state::collision_check_s1s2() /* origin is with respect to ship1 */ - org_x = m_s1_x; - org_y = m_s1_y; + int org_x = m_s1_x; + int org_y = m_s1_y; /* Draw ship 1 */ - m_gfxdecode->gfx(8+((m_s1_sprite&0x04)>>2))->opaque(*m_ship1_vid, + m_gfxdecode->gfx(8 + ((m_s1_sprite & 0x04) >> 2))->opaque(*m_ship1_vid, clip, - (m_s1_sprite&0x03)^0x03, + (m_s1_sprite & 0x03) ^ 0x03, 0, - (m_s1_sprite&0x08)>>3, (m_s1_sprite&0x10)>>4, - m_s1_x-org_x, m_s1_y-org_y); + (m_s1_sprite & 0x08) >> 3, (m_s1_sprite & 0x10) >> 4, + m_s1_x - org_x, m_s1_y - org_y); /* Draw ship 2 */ - m_gfxdecode->gfx(10+((m_s2_sprite&0x04)>>2))->opaque(*m_ship2_vid, + m_gfxdecode->gfx(10 + ((m_s2_sprite & 0x04) >> 2))->opaque(*m_ship2_vid, clip, - (m_s2_sprite&0x03)^0x03, + (m_s2_sprite & 0x03) ^ 0x03, 0, - (m_s2_sprite&0x08)>>3, (m_s2_sprite&0x10)>>4, - m_s2_x-org_x, m_s2_y-org_y); + (m_s2_sprite & 0x08) >> 3, (m_s2_sprite & 0x10) >> 4, + m_s2_x - org_x, m_s2_y - org_y); /* Now check for collisions */ - for (sy=0;sy<16;sy++) - for (sx=0;sx<16;sx++) + for (int sy = 0; sy < 16; sy++) + for (int sx = 0; sx < 16; sx++) /* Condition 1 - ship 1 = ship 2 */ if ((m_ship1_vid->pix16(sy, sx) == 1) && (m_ship2_vid->pix16(sy, sx) == 1)) return 1; @@ -220,8 +218,6 @@ int starcrus_state::collision_check_s1s2() int starcrus_state::collision_check_p1p2() { - int org_x, org_y; - int sx, sy; rectangle clip(0, 15, 0, 15); /* if both are scores, return */ @@ -236,36 +232,36 @@ int starcrus_state::collision_check_p1p2() /* origin is with respect to proj1 */ - org_x = m_p1_x; - org_y = m_p1_y; + int org_x = m_p1_x; + int org_y = m_p1_y; if (m_p1_sprite & 0x08) /* if p1 is a projectile */ { /* Draw score/projectile 1 */ - m_gfxdecode->gfx((m_p1_sprite&0x0c)>>2)->opaque(*m_proj1_vid, + m_gfxdecode->gfx((m_p1_sprite & 0x0c) >> 2)->opaque(*m_proj1_vid, clip, - (m_p1_sprite&0x03)^0x03, + (m_p1_sprite & 0x03) ^ 0x03, 0, - 0,0, - m_p1_x-org_x, m_p1_y-org_y); + 0, 0, + m_p1_x - org_x, m_p1_y - org_y); } if (m_p2_sprite & 0x08) /* if p2 is a projectile */ { /* Draw score/projectile 2 */ - m_gfxdecode->gfx(4+((m_p2_sprite&0x0c)>>2))->opaque(*m_proj2_vid, + m_gfxdecode->gfx(4 + ((m_p2_sprite & 0x0c) >> 2))->opaque(*m_proj2_vid, clip, - (m_p2_sprite&0x03)^0x03, + (m_p2_sprite & 0x03) ^ 0x03, 0, - 0,0, - m_p2_x-org_x, m_p2_y-org_y); + 0, 0, + m_p2_x - org_x, m_p2_y - org_y); } /* Now check for collisions */ - for (sy=0;sy<16;sy++) - for (sx=0;sx<16;sx++) + for (int sy = 0; sy < 16; sy++) + for (int sx = 0; sx < 16; sx++) /* Condition 1 - proj 1 = proj 2 */ if ((m_proj1_vid->pix16(sy, sx) == 1) && (m_proj2_vid->pix16(sy, sx) == 1)) return 1; @@ -275,13 +271,10 @@ int starcrus_state::collision_check_p1p2() int starcrus_state::collision_check_s1p1p2() { - int org_x, org_y; - int sx, sy; rectangle clip(0, 15, 0, 15); /* if both are scores, return */ - if ( ((m_p1_sprite & 0x08) == 0) && - ((m_p2_sprite & 0x08) == 0) ) + if ((m_p1_sprite & 0x08) == 0 && (m_p2_sprite & 0x08) == 0) { return 0; } @@ -292,45 +285,45 @@ int starcrus_state::collision_check_s1p1p2() /* origin is with respect to ship1 */ - org_x = m_s1_x; - org_y = m_s1_y; + int org_x = m_s1_x; + int org_y = m_s1_y; /* Draw ship 1 */ - m_gfxdecode->gfx(8+((m_s1_sprite&0x04)>>2))->opaque(*m_ship1_vid, + m_gfxdecode->gfx(8 + ((m_s1_sprite & 0x04) >> 2))->opaque(*m_ship1_vid, clip, - (m_s1_sprite&0x03)^0x03, + (m_s1_sprite & 0x03) ^ 0x03, 0, - (m_s1_sprite&0x08)>>3, (m_s1_sprite&0x10)>>4, - m_s1_x-org_x, m_s1_y-org_y); + (m_s1_sprite & 0x08) >> 3, (m_s1_sprite & 0x10) >> 4, + m_s1_x - org_x, m_s1_y - org_y); if (m_p1_sprite & 0x08) /* if p1 is a projectile */ { /* Draw projectile 1 */ - m_gfxdecode->gfx((m_p1_sprite&0x0c)>>2)->opaque(*m_proj1_vid, + m_gfxdecode->gfx((m_p1_sprite & 0x0c) >> 2)->opaque(*m_proj1_vid, clip, - (m_p1_sprite&0x03)^0x03, + (m_p1_sprite & 0x03) ^ 0x03, 0, - 0,0, - m_p1_x-org_x, m_p1_y-org_y); + 0, 0, + m_p1_x - org_x, m_p1_y - org_y); } if (m_p2_sprite & 0x08) /* if p2 is a projectile */ { /* Draw projectile 2 */ - m_gfxdecode->gfx(4+((m_p2_sprite&0x0c)>>2))->opaque(*m_proj2_vid, + m_gfxdecode->gfx(4 + ((m_p2_sprite & 0x0c) >> 2))->opaque(*m_proj2_vid, clip, - (m_p2_sprite&0x03)^0x03, + (m_p2_sprite & 0x03) ^ 0x03, 0, - 0,0, - m_p2_x-org_x, m_p2_y-org_y); + 0, 0, + m_p2_x - org_x, m_p2_y - org_y); } /* Now check for collisions */ - for (sy=0;sy<16;sy++) - for (sx=0;sx<16;sx++) + for (int sy = 0; sy < 16; sy++) + for (int sx = 0; sx < 16; sx++) if (m_ship1_vid->pix16(sy, sx) == 1) { /* Condition 1 - ship 1 = proj 1 */ @@ -346,13 +339,10 @@ int starcrus_state::collision_check_s1p1p2() int starcrus_state::collision_check_s2p1p2() { - int org_x, org_y; - int sx, sy; rectangle clip(0, 15, 0, 15); /* if both are scores, return */ - if ( ((m_p1_sprite & 0x08) == 0) && - ((m_p2_sprite & 0x08) == 0) ) + if ((m_p1_sprite & 0x08) == 0 && (m_p2_sprite & 0x08) == 0) { return 0; } @@ -363,45 +353,44 @@ int starcrus_state::collision_check_s2p1p2() /* origin is with respect to ship2 */ - org_x = m_s2_x; - org_y = m_s2_y; + int org_x = m_s2_x; + int org_y = m_s2_y; /* Draw ship 2 */ - m_gfxdecode->gfx(10+((m_s2_sprite&0x04)>>2))->opaque(*m_ship2_vid, + m_gfxdecode->gfx(10 + ((m_s2_sprite & 0x04) >> 2))->opaque(*m_ship2_vid, clip, - (m_s2_sprite&0x03)^0x03, + (m_s2_sprite & 0x03) ^ 0x03, 0, - (m_s2_sprite&0x08)>>3, (m_s2_sprite&0x10)>>4, - m_s2_x-org_x, m_s2_y-org_y); + (m_s2_sprite & 0x08) >> 3, (m_s2_sprite & 0x10) >> 4, + m_s2_x - org_x, m_s2_y - org_y); if (m_p1_sprite & 0x08) /* if p1 is a projectile */ { /* Draw projectile 1 */ - m_gfxdecode->gfx((m_p1_sprite&0x0c)>>2)->opaque(*m_proj1_vid, + m_gfxdecode->gfx((m_p1_sprite & 0x0c) >> 2)->opaque(*m_proj1_vid, clip, - (m_p1_sprite&0x03)^0x03, + (m_p1_sprite & 0x03) ^ 0x03, 0, - 0,0, - m_p1_x-org_x, m_p1_y-org_y); + 0, 0, + m_p1_x - org_x, m_p1_y - org_y); } if (m_p2_sprite & 0x08) /* if p2 is a projectile */ { /* Draw projectile 2 */ - - m_gfxdecode->gfx(4+((m_p2_sprite&0x0c)>>2))->opaque(*m_proj2_vid, + m_gfxdecode->gfx(4 + ((m_p2_sprite & 0x0c) >> 2))->opaque(*m_proj2_vid, clip, - (m_p2_sprite&0x03)^0x03, + (m_p2_sprite & 0x03) ^ 0x03, 0, - 0,0, - m_p2_x-org_x, m_p2_y-org_y); + 0, 0, + m_p2_x - org_x, m_p2_y - org_y); } /* Now check for collisions */ - for (sy=0;sy<16;sy++) - for (sx=0;sx<16;sx++) + for (int sy = 0; sy < 16; sy++) + for (int sx = 0; sx < 16; sx++) if (m_ship2_vid->pix16(sy, sx) == 1) { /* Condition 1 - ship 2 = proj 1 */ @@ -420,42 +409,38 @@ uint32_t starcrus_state::screen_update(screen_device &screen, bitmap_ind16 &bitm bitmap.fill(0, cliprect); /* Draw ship 1 */ - - m_gfxdecode->gfx(8+((m_s1_sprite&0x04)>>2))->transpen(bitmap, + m_gfxdecode->gfx(8 + ((m_s1_sprite & 0x04) >> 2))->transpen(bitmap, cliprect, - (m_s1_sprite&0x03)^0x03, + (m_s1_sprite & 0x03) ^ 0x03, 0, - (m_s1_sprite&0x08)>>3, (m_s1_sprite&0x10)>>4, + (m_s1_sprite & 0x08) >> 3, (m_s1_sprite & 0x10) >> 4, m_s1_x, m_s1_y, 0); /* Draw ship 2 */ - - m_gfxdecode->gfx(10+((m_s2_sprite&0x04)>>2))->transpen(bitmap, + m_gfxdecode->gfx(10 + ((m_s2_sprite & 0x04) >> 2))->transpen(bitmap, cliprect, - (m_s2_sprite&0x03)^0x03, + (m_s2_sprite & 0x03) ^ 0x03, 0, - (m_s2_sprite&0x08)>>3, (m_s2_sprite&0x10)>>4, + (m_s2_sprite & 0x08) >> 3, (m_s2_sprite & 0x10) >> 4, m_s2_x, m_s2_y, 0); /* Draw score/projectile 1 */ - - m_gfxdecode->gfx((m_p1_sprite&0x0c)>>2)->transpen(bitmap, + m_gfxdecode->gfx((m_p1_sprite & 0x0c) >> 2)->transpen(bitmap, cliprect, - (m_p1_sprite&0x03)^0x03, + (m_p1_sprite & 0x03) ^ 0x03, 0, - 0,0, + 0, 0, m_p1_x, m_p1_y, 0); /* Draw score/projectile 2 */ - - m_gfxdecode->gfx(4+((m_p2_sprite&0x0c)>>2))->transpen(bitmap, + m_gfxdecode->gfx(4 + ((m_p2_sprite & 0x0c) >> 2))->transpen(bitmap, cliprect, - (m_p2_sprite&0x03)^0x03, + (m_p2_sprite & 0x03) ^ 0x03, 0, - 0,0, + 0, 0, m_p2_x, m_p2_y, 0); -- cgit v1.2.3