diff options
author | 2018-01-05 10:47:21 -0500 | |
---|---|---|
committer | 2018-01-05 10:47:28 -0500 | |
commit | aa45e908bbf1c6ac8141b1990500817699888b59 (patch) | |
tree | 9fc8ca6cd091b585343f89a816f2a73460ae79fb /src/devices/bus/sms_ctrl/lphaser.cpp | |
parent | c25b98226d633149162fbf99ea06919646acb9b6 (diff) |
Privatize m_screen and other variables of device_video_interface (nw)
Diffstat (limited to 'src/devices/bus/sms_ctrl/lphaser.cpp')
-rw-r--r-- | src/devices/bus/sms_ctrl/lphaser.cpp | 14 |
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; } |