diff options
Diffstat (limited to 'src/mame/video/tc0100scn.h')
-rw-r--r-- | src/mame/video/tc0100scn.h | 53 |
1 files changed, 25 insertions, 28 deletions
diff --git a/src/mame/video/tc0100scn.h b/src/mame/video/tc0100scn.h index 0b98a5b1b1d..a0399a2a031 100644 --- a/src/mame/video/tc0100scn.h +++ b/src/mame/video/tc0100scn.h @@ -10,30 +10,27 @@ class tc0100scn_device : public device_t public: tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // static configuration - static void static_set_gfxdecode_tag(device_t &device, const char *tag); - static void static_set_palette_tag(device_t &device, const char *tag); - static void set_gfx_region(device_t &device, int gfxregion) { downcast<tc0100scn_device &>(device).m_gfxnum = gfxregion; } - static void set_tx_region(device_t &device, int txregion) { downcast<tc0100scn_device &>(device).m_txnum = txregion; } - static void set_multiscr_xoffs(device_t &device, int xoffs) { downcast<tc0100scn_device &>(device).m_multiscrn_xoffs = xoffs; } - static void set_multiscr_hack(device_t &device, int hack) { downcast<tc0100scn_device &>(device).m_multiscrn_hack = hack; } - static void set_offsets(device_t &device, int x_offset, int y_offset) + // configuration + void set_gfxdecode_tag(const char *tag); + void set_palette_tag(const char *tag); + void set_gfx_region(int gfxregion) { m_gfxnum = gfxregion; } + void set_tx_region(int txregion) { m_txnum = txregion; } + void set_multiscr_xoffs(int xoffs) { m_multiscrn_xoffs = xoffs; } + void set_multiscr_hack(int hack) { m_multiscrn_hack = hack; } + void set_offsets(int x_offset, int y_offset) { - tc0100scn_device &dev = downcast<tc0100scn_device &>(device); - dev.m_x_offset = x_offset; - dev.m_y_offset = y_offset; + m_x_offset = x_offset; + m_y_offset = y_offset; } - static void set_offsets_flip(device_t &device, int x_offset, int y_offset) + void set_offsets_flip(int x_offset, int y_offset) { - tc0100scn_device &dev = downcast<tc0100scn_device &>(device); - dev.m_flip_xoffs = x_offset; - dev.m_flip_yoffs = y_offset; + m_flip_xoffs = x_offset; + m_flip_yoffs = y_offset; } - static void set_offsets_fliptx(device_t &device, int x_offset, int y_offset) + void set_offsets_fliptx(int x_offset, int y_offset) { - tc0100scn_device &dev = downcast<tc0100scn_device &>(device); - dev.m_flip_text_xoffs = x_offset; - dev.m_flip_text_yoffs = y_offset; + m_flip_text_xoffs = x_offset; + m_flip_text_yoffs = y_offset; } static constexpr unsigned SINGLE_VDU = 1024; // for set_multiscr_xoffs @@ -123,30 +120,30 @@ DECLARE_DEVICE_TYPE(TC0100SCN, tc0100scn_device) #define MCFG_TC0100SCN_GFX_REGION(_region) \ - tc0100scn_device::set_gfx_region(*device, _region); + downcast<tc0100scn_device &>(*device).set_gfx_region(_region); #define MCFG_TC0100SCN_TX_REGION(_region) \ - tc0100scn_device::set_tx_region(*device, _region); + downcast<tc0100scn_device &>(*device).set_tx_region(_region); #define MCFG_TC0100SCN_OFFSETS(_xoffs, _yoffs) \ - tc0100scn_device::set_offsets(*device, _xoffs, _yoffs); + downcast<tc0100scn_device &>(*device).set_offsets(_xoffs, _yoffs); #define MCFG_TC0100SCN_OFFSETS_FLIP(_xoffs, _yoffs) \ - tc0100scn_device::set_offsets_flip(*device, _xoffs, _yoffs); + downcast<tc0100scn_device &>(*device).set_offsets_flip(_xoffs, _yoffs); #define MCFG_TC0100SCN_OFFSETS_FLIPTX(_xoffs, _yoffs) \ - tc0100scn_device::set_offsets_fliptx(*device, _xoffs, _yoffs); + downcast<tc0100scn_device &>(*device).set_offsets_fliptx(_xoffs, _yoffs); #define MCFG_TC0100SCN_MULTISCR_XOFFS(_xoffs) \ - tc0100scn_device::set_multiscr_xoffs(*device, _xoffs); + downcast<tc0100scn_device &>(*device).set_multiscr_xoffs(_xoffs); #define MCFG_TC0100SCN_MULTISCR_HACK(_hack) \ - tc0100scn_device::set_multiscr_hack(*device, _hack); + downcast<tc0100scn_device &>(*device).set_multiscr_hack(_hack); #define MCFG_TC0100SCN_GFXDECODE(_gfxtag) \ - tc0100scn_device::static_set_gfxdecode_tag(*device, "^" _gfxtag); + downcast<tc0100scn_device &>(*device).set_gfxdecode_tag("^" _gfxtag); #define MCFG_TC0100SCN_PALETTE(_palette_tag) \ - tc0100scn_device::static_set_palette_tag(*device, "^" _palette_tag); + downcast<tc0100scn_device &>(*device).set_palette_tag("^" _palette_tag); #endif // MAME_VIDEO_TC0100SCN_H |