summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/sms_ctrl/lphaser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/sms_ctrl/lphaser.cpp')
-rw-r--r--src/devices/bus/sms_ctrl/lphaser.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/devices/bus/sms_ctrl/lphaser.cpp b/src/devices/bus/sms_ctrl/lphaser.cpp
index 264f74151a1..1782a75a689 100644
--- a/src/devices/bus/sms_ctrl/lphaser.cpp
+++ b/src/devices/bus/sms_ctrl/lphaser.cpp
@@ -93,7 +93,7 @@ sms_light_phaser_device::sms_light_phaser_device(const machine_config &mconfig,
{
// Workaround for failed validation that occurs when running on a driver
// with Sega Scope emulation, which adds 2 screens (left/right lenses).
- m_screen_tag = ":screen";
+ static_set_screen(*this, ":screen");
}
@@ -150,10 +150,10 @@ uint8_t sms_light_phaser_device::peripheral_r()
int sms_light_phaser_device::bright_aim_area( emu_timer *timer, int lgun_x, int lgun_y )
{
const int r_x_r = LGUN_RADIUS * LGUN_RADIUS;
- const rectangle &visarea = m_screen->visible_area();
+ const rectangle &visarea = screen().visible_area();
rectangle aim_area;
- int beam_x = m_screen->hpos();
- int beam_y = m_screen->vpos();
+ int beam_x = screen().hpos();
+ int beam_y = screen().vpos();
int beam_x_orig = beam_x;
int beam_y_orig = beam_y;
int dy, result = 1;
@@ -256,14 +256,14 @@ int sms_light_phaser_device::bright_aim_area( emu_timer *timer, int lgun_x, int
}
}
- timer->adjust(m_screen->time_until_pos(beam_y, beam_x));
+ timer->adjust(screen().time_until_pos(beam_y, beam_x));
return result;
}
uint16_t sms_light_phaser_device::screen_hpos_nonscaled(int scaled_hpos)
{
- const rectangle &visarea = m_screen->visible_area();
+ const rectangle &visarea = screen().visible_area();
int offset_x = (scaled_hpos * (visarea.max_x - visarea.min_x)) / 255;
return visarea.min_x + offset_x;
}
@@ -271,7 +271,7 @@ uint16_t sms_light_phaser_device::screen_hpos_nonscaled(int scaled_hpos)
uint16_t sms_light_phaser_device::screen_vpos_nonscaled(int scaled_vpos)
{
- const rectangle &visarea = m_screen->visible_area();
+ const rectangle &visarea = screen().visible_area();
int offset_y = (scaled_vpos * (visarea.max_y - visarea.min_y)) / 255;
return visarea.min_y + offset_y;
}