diff options
Diffstat (limited to 'src/mame/video/k007420.h')
-rw-r--r-- | src/mame/video/k007420.h | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/mame/video/k007420.h b/src/mame/video/k007420.h index 8c43767933b..5a53a3b4bee 100644 --- a/src/mame/video/k007420.h +++ b/src/mame/video/k007420.h @@ -15,9 +15,9 @@ class k007420_device : public device_t public: k007420_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - void set_palette_tag(const char *tag) { m_palette.set_tag(tag); } + template <typename T> void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward<T>(tag)); } void set_bank_limit(int limit) { m_banklimit = limit; } - void set_callback(k007420_delegate callback) { m_callback = callback; } + template <typename... T> void set_sprite_callback(T &&... args) { m_callback = k007420_delegate(std::forward<T>(args)...); } DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); @@ -40,18 +40,6 @@ private: DECLARE_DEVICE_TYPE(K007420, k007420_device) -#define MCFG_K007420_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, K007420, 0) - -#define MCFG_K007420_PALETTE(_palette_tag) \ - downcast<k007420_device &>(*device).set_palette_tag(_palette_tag); - -#define MCFG_K007420_BANK_LIMIT(_limit) \ - downcast<k007420_device &>(*device).set_bank_limit(_limit); - -#define MCFG_K007420_CALLBACK_OWNER(_class, _method) \ - downcast<k007420_device &>(*device).set_callback(k007420_delegate(&_class::_method, #_class "::" #_method, this)); - // function definition for a callback #define K007420_CALLBACK_MEMBER(_name) void _name(int *code, int *color) |