diff options
Diffstat (limited to 'src/devices/video/scn2674.h')
-rw-r--r-- | src/devices/video/scn2674.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/devices/video/scn2674.h b/src/devices/video/scn2674.h index 4e93b1bae82..b2b7f6dfa55 100644 --- a/src/devices/video/scn2674.h +++ b/src/devices/video/scn2674.h @@ -7,16 +7,16 @@ #define MCFG_SCN2674_INTR_CALLBACK(_intr) \ - devcb = &scn2674_device::set_intr_callback(*device, DEVCB_##_intr); + devcb = &downcast<scn2674_device &>(*device).set_intr_callback(DEVCB_##_intr); #define MCFG_SCN2674_TEXT_CHARACTER_WIDTH(_value) \ - scn2674_device::static_set_character_width(*device, _value); + downcast<scn2674_device &>(*device).set_character_width(_value); #define MCFG_SCN2674_GFX_CHARACTER_WIDTH(_value) \ - scn2674_device::static_set_gfx_character_width(*device, _value); + downcast<scn2674_device &>(*device).set_gfx_character_width(_value); #define MCFG_SCN2674_DRAW_CHARACTER_CALLBACK_OWNER(_class, _method) \ - scn2674_device::static_set_display_callback(*device, scn2674_device::draw_character_delegate(&_class::_method, #_class "::" #_method, this)); + downcast<scn2674_device &>(*device).set_display_callback(scn2674_device::draw_character_delegate(&_class::_method, #_class "::" #_method, this)); #define SCN2674_DRAW_CHARACTER_MEMBER(_name) void _name(bitmap_rgb32 &bitmap, int x, int y, uint8_t linecount, uint8_t charcode, uint16_t address, uint8_t cursor, uint8_t dw, uint8_t lg, uint8_t ul, uint8_t blink) @@ -30,10 +30,10 @@ public: typedef device_delegate<void (bitmap_rgb32 &bitmap, int x, int y, uint8_t linecount, uint8_t charcode, uint16_t address, uint8_t cursor, uint8_t dw, uint8_t lg, uint8_t ul, uint8_t blink)> draw_character_delegate; // static configuration - template <class Object> static devcb_base &set_intr_callback(device_t &device, Object &&cb) { return downcast<scn2674_device &>(device).m_intr_cb.set_callback(std::forward<Object>(cb)); } - static void static_set_character_width(device_t &device, int value) { downcast<scn2674_device &>(device).m_text_hpixels_per_column = value; } - static void static_set_gfx_character_width(device_t &device, int value) { downcast<scn2674_device &>(device).m_gfx_hpixels_per_column = value; } - static void static_set_display_callback(device_t &device, draw_character_delegate &&cb) { downcast<scn2674_device &>(device).m_display_cb = std::move(cb); } + template <class Object> devcb_base &set_intr_callback(Object &&cb) { return m_intr_cb.set_callback(std::forward<Object>(cb)); } + void set_character_width(int value) { m_text_hpixels_per_column = value; } + void set_gfx_character_width(int value) { m_gfx_hpixels_per_column = value; } + template <typename Object> void set_display_callback(Object &&cb) { m_display_cb = std::forward<Object>(cb); } DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); |