diff options
Diffstat (limited to 'src/mame/video/vsystem_spr.h')
-rw-r--r-- | src/mame/video/vsystem_spr.h | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/src/mame/video/vsystem_spr.h b/src/mame/video/vsystem_spr.h index c033b0d6903..073800d3108 100644 --- a/src/mame/video/vsystem_spr.h +++ b/src/mame/video/vsystem_spr.h @@ -9,33 +9,37 @@ typedef device_delegate<uint32_t (uint32_t)> vsystem_tile_indirection_delegate; -#define MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( _class, _method) \ - vsystem_spr_device::set_tile_indirect_cb(*device, vsystem_tile_indirection_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr)); -#define MCFG_VSYSTEM_SPR_SET_GFXREGION( _rgn ) \ - vsystem_spr_device::set_gfx_region(*device, _rgn); -#define MCFG_VSYSTEM_SPR_SET_PALBASE( _palbase ) \ - vsystem_spr_device::CG10103_set_pal_base(*device, _palbase); -#define MCFG_VSYSTEM_SPR_SET_PALMASK( _palmask ) \ - vsystem_spr_device::set_pal_mask(*device, _palmask); -#define MCFG_VSYSTEM_SPR_SET_TRANSPEN( _transpen ) \ - vsystem_spr_device::CG10103_set_transpen(*device, _transpen); +#define MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT(_class, _method) \ + downcast<vsystem_spr_device &>(*device).set_tile_indirect_cb(vsystem_tile_indirection_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr)); +#define MCFG_VSYSTEM_SPR_SET_GFXREGION(_rgn) \ + downcast<vsystem_spr_device &>(*device).set_gfx_region(_rgn); +#define MCFG_VSYSTEM_SPR_SET_PALBASE(_palbase) \ + downcast<vsystem_spr_device &>(*device).CG10103_set_pal_base(_palbase); +#define MCFG_VSYSTEM_SPR_SET_PALMASK(_palmask) \ + downcast<vsystem_spr_device &>(*device).set_pal_mask(_palmask); +#define MCFG_VSYSTEM_SPR_SET_TRANSPEN(_transpen) \ + downcast<vsystem_spr_device &>(*device).CG10103_set_transpen(_transpen); #define MCFG_VSYSTEM_SPR_GFXDECODE(_gfxtag) \ - vsystem_spr_device::static_set_gfxdecode_tag(*device, "^" _gfxtag); + downcast<vsystem_spr_device &>(*device).set_gfxdecode_tag("^" _gfxtag); +#define MCFG_VSYSTEM_SPR_SET_OFFSETS(_xoffs, _yoffs) \ + downcast<vsystem_spr_device &>(*device).set_offsets(_xoffs,_yoffs); +#define MCFG_VSYSTEM_SPR_SET_PDRAW(_pdraw) \ + downcast<vsystem_spr_device &>(*device).set_pdraw(_pdraw); /*** CG10103 **********************************************/ class vsystem_spr_device : public device_t { public: - // static configuration - static void static_set_gfxdecode_tag(device_t &device, const char *tag); - static void set_offsets(device_t &device, int xoffs, int yoffs); - static void set_pdraw(device_t &device, bool pdraw); - static void set_tile_indirect_cb(device_t &device, vsystem_tile_indirection_delegate newtilecb); - static void set_gfx_region(device_t &device, int gfx_region); - static void CG10103_set_pal_base(device_t &device, int pal_base); - static void set_pal_mask(device_t &device, int pal_mask); - static void CG10103_set_transpen(device_t &device, int transpen); + // configuration + void set_gfxdecode_tag(const char *tag); + void set_offsets(int xoffs, int yoffs); + void set_pdraw(bool pdraw); + void set_tile_indirect_cb(vsystem_tile_indirection_delegate newtilecb); + void set_gfx_region(int gfx_region); + void CG10103_set_pal_base(int pal_base); + void set_pal_mask(int pal_mask); + void CG10103_set_transpen(int transpen); vsystem_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); |