diff options
Diffstat (limited to 'src/mame/video/k054338.h')
-rw-r--r-- | src/mame/video/k054338.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/mame/video/k054338.h b/src/mame/video/k054338.h index a8b9bcb2b8d..0b56bf8e650 100644 --- a/src/mame/video/k054338.h +++ b/src/mame/video/k054338.h @@ -26,10 +26,15 @@ class k054338_device : public device_t, public device_video_interface { public: + template <typename T> k054338_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&mixer_tag) + : k054338_device(mconfig, tag, owner, clock) + { + m_k055555.set_tag(std::forward<T>(mixer_tag)); + } + k054338_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration - void set_mixer_tag(const char *tag) { m_k055555_tag = tag; } void set_alpha_invert(int alpha_inv) { m_alpha_inv = alpha_inv; } DECLARE_WRITE16_MEMBER( word_w ); // "CLCT" registers @@ -55,20 +60,13 @@ private: uint16_t m_regs[32]; int m_shd_rgb[9]; int m_alpha_inv; - const char *m_k055555_tag; - k055555_device *m_k055555; /* used to fill BG color */ + optional_device<k055555_device> m_k055555; /* used to fill BG color */ }; DECLARE_DEVICE_TYPE(K054338, k054338_device) - -#define MCFG_K054338_MIXER(_tag) \ - downcast<k054338_device &>(*device).set_mixer_tag(_tag); - #define MCFG_K054338_ALPHAINV(_alphainv) \ downcast<k054338_device &>(*device).set_alpha_invert(_alphainv); -#define MCFG_K054338_SET_SCREEN MCFG_VIDEO_SET_SCREEN - #endif // MAME_VIDEO_K054338_H |