diff options
Diffstat (limited to 'src/mame/includes/oneshot.h')
-rw-r--r-- | src/mame/includes/oneshot.h | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/src/mame/includes/oneshot.h b/src/mame/includes/oneshot.h index a23e606c4be..aaa3fd9dcff 100644 --- a/src/mame/includes/oneshot.h +++ b/src/mame/includes/oneshot.h @@ -1,5 +1,9 @@ // license:BSD-3-Clause // copyright-holders:David Haywood, Paul Priest +#ifndef MAME_INCLUDES_ONESHOT_H +#define MAME_INCLUDES_ONESHOT_H + +#pragma once #include "sound/okim6295.h" #include "emupal.h" @@ -7,8 +11,8 @@ class oneshot_state : public driver_device { public: - oneshot_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + oneshot_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), m_sprites(*this, "sprites"), m_bg_videoram(*this, "bg_videoram"), m_mid_videoram(*this, "mid_videoram"), @@ -17,11 +21,17 @@ public: m_maincpu(*this, "maincpu"), m_oki(*this, "oki"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_palette(*this, "palette") + { } void maddonna(machine_config &config); void oneshot(machine_config &config); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + private: /* memory pointers */ required_shared_ptr<uint16_t> m_sprites; @@ -46,6 +56,10 @@ private: /* devices */ required_device<cpu_device> m_maincpu; + required_device<okim6295_device> m_oki; + required_device<gfxdecode_device> m_gfxdecode; + required_device<palette_device> m_palette; + DECLARE_READ16_MEMBER(oneshot_in0_word_r); DECLARE_READ16_MEMBER(oneshot_gun_x_p1_r); DECLARE_READ16_MEMBER(oneshot_gun_y_p1_r); @@ -58,16 +72,12 @@ private: TILE_GET_INFO_MEMBER(get_oneshot_bg_tile_info); TILE_GET_INFO_MEMBER(get_oneshot_mid_tile_info); TILE_GET_INFO_MEMBER(get_oneshot_fg_tile_info); - virtual void machine_start() override; - virtual void machine_reset() override; - virtual void video_start() override; uint32_t screen_update_oneshot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_maddonna(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_crosshairs( bitmap_ind16 &bitmap, const rectangle &cliprect ); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - required_device<okim6295_device> m_oki; - required_device<gfxdecode_device> m_gfxdecode; - required_device<palette_device> m_palette; void oneshot_map(address_map &map); void oneshot_sound_map(address_map &map); }; + +#endif // MAME_INCLUDES_ONESHOT_H |