diff options
Diffstat (limited to 'src/emu')
-rw-r--r-- | src/emu/devcpu.h | 10 | ||||
-rw-r--r-- | src/emu/device.h | 6 | ||||
-rw-r--r-- | src/emu/diexec.h | 26 | ||||
-rw-r--r-- | src/emu/diimage.h | 3 | ||||
-rw-r--r-- | src/emu/dimemory.h | 24 | ||||
-rw-r--r-- | src/emu/dirom.h | 3 | ||||
-rw-r--r-- | src/emu/dislot.h | 35 | ||||
-rw-r--r-- | src/emu/disound.h | 14 | ||||
-rw-r--r-- | src/emu/mconfig.h | 37 | ||||
-rw-r--r-- | src/emu/screen.h | 67 | ||||
-rw-r--r-- | src/emu/tilemap.h | 76 |
11 files changed, 26 insertions, 275 deletions
diff --git a/src/emu/devcpu.h b/src/emu/devcpu.h index 3e4dd89f8ce..4cce31b5e38 100644 --- a/src/emu/devcpu.h +++ b/src/emu/devcpu.h @@ -17,16 +17,6 @@ //************************************************************************** -// CPU DEVICE CONFIGURATION MACROS -//************************************************************************** - -// recompilation parameters -#define MCFG_CPU_FORCE_NO_DRC() \ - dynamic_cast<cpu_device &>(*device).set_force_no_drc(true); - - - -//************************************************************************** // TYPE DEFINITIONS //************************************************************************** diff --git a/src/emu/device.h b/src/emu/device.h index efd7a590e09..fc8da68f65c 100644 --- a/src/emu/device.h +++ b/src/emu/device.h @@ -41,12 +41,6 @@ //************************************************************************** // configure devices -#define MCFG_DEVICE_CLOCK(_clock) \ - device->set_clock(_clock); -#define MCFG_DEVICE_INPUT_DEFAULTS(_config) \ - device->set_input_default(DEVICE_INPUT_DEFAULTS_NAME(_config)); -#define MCFG_DEVICE_BIOS(...) \ - device->set_default_bios_tag(__VA_ARGS__); #define DECLARE_READ_LINE_MEMBER(name) int name() #define READ_LINE_MEMBER(name) int name() diff --git a/src/emu/diexec.h b/src/emu/diexec.h index 524e0feeb06..663cc6ddb1c 100644 --- a/src/emu/diexec.h +++ b/src/emu/diexec.h @@ -76,32 +76,6 @@ enum //************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_DEVICE_DISABLE() \ - dynamic_cast<device_execute_interface &>(*device).set_disable(); -#define MCFG_DEVICE_VBLANK_INT_DRIVER(_tag, _class, _func) \ - dynamic_cast<device_execute_interface &>(*device).set_vblank_int(device_interrupt_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)nullptr), _tag); -#define MCFG_DEVICE_VBLANK_INT_DEVICE(_tag, _devtag, _class, _func) \ - dynamic_cast<device_execute_interface &>(*device).set_vblank_int(device_interrupt_delegate(&_class::_func, #_class "::" #_func, _devtag, (_class *)nullptr), _tag); -#define MCFG_DEVICE_VBLANK_INT_REMOVE() \ - dynamic_cast<device_execute_interface &>(*device).set_vblank_int(device_interrupt_delegate(), nullptr); -#define MCFG_DEVICE_PERIODIC_INT_DRIVER(_class, _func, _rate) \ - dynamic_cast<device_execute_interface &>(*device).set_periodic_int(device_interrupt_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)nullptr), attotime::from_hz(_rate)); -#define MCFG_DEVICE_PERIODIC_INT_DEVICE(_devtag, _class, _func, _rate) \ - dynamic_cast<device_execute_interface &>(*device).set_periodic_int(device_interrupt_delegate(&_class::_func, #_class "::" #_func, _devtag, (_class *)nullptr), attotime::from_hz(_rate)); -#define MCFG_DEVICE_PERIODIC_INT_REMOVE() \ - dynamic_cast<device_execute_interface &>(*device).set_periodic_int(device_interrupt_delegate(), attotime()); -#define MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(_class, _func) \ - dynamic_cast<device_execute_interface &>(*device).set_irq_acknowledge_callback(device_irq_acknowledge_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF, (_class *)nullptr)); -#define MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE(_devtag, _class, _func) \ - dynamic_cast<device_execute_interface &>(*device).set_irq_acknowledge_callback(device_irq_acknowledge_delegate(&_class::_func, #_class "::" #_func, _devtag, (_class *)nullptr)); -#define MCFG_DEVICE_IRQ_ACKNOWLEDGE_REMOVE() \ - dynamic_cast<device_execute_interface &>(*device).set_irq_acknowledge_callback(device_irq_acknowledge_delegate()); - - -//************************************************************************** // TYPE DEFINITIONS //************************************************************************** diff --git a/src/emu/diimage.h b/src/emu/diimage.h index d96aae352be..9ab7d94bf83 100644 --- a/src/emu/diimage.h +++ b/src/emu/diimage.h @@ -104,9 +104,6 @@ enum class image_verify_result { PASS, FAIL }; #define DEVICE_IMAGE_UNLOAD_MEMBER(_name) void _name(device_image_interface &image) #define DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER(_name) DEVICE_IMAGE_UNLOAD_MEMBER(_name) -#define MCFG_SET_IMAGE_LOADABLE(_usrload) \ - dynamic_cast<device_image_interface &>(*device).set_user_loadable(_usrload); - // ======================> device_image_interface diff --git a/src/emu/dimemory.h b/src/emu/dimemory.h index 612ff15ae28..3d43c6a6a4d 100644 --- a/src/emu/dimemory.h +++ b/src/emu/dimemory.h @@ -42,30 +42,6 @@ constexpr int TRANSLATE_FETCH_DEBUG = (TRANSLATE_FETCH | TRANSLATE_DEBUG_MAS //************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_DEVICE_ADDRESS_MAP(_space, _map) \ - dynamic_cast<device_memory_interface *>(device)->set_addrmap(_space, address_map_constructor(&std::remove_pointer_t<decltype(this)>::_map, tag(), this)); - -#define MCFG_DEVICE_REMOVE_ADDRESS_MAP(_space) \ - dynamic_cast<device_memory_interface *>(device)->set_addrmap(_space, address_map_constructor()); - -#define MCFG_DEVICE_PROGRAM_MAP(_map) \ - MCFG_DEVICE_ADDRESS_MAP(AS_PROGRAM, _map) - -#define MCFG_DEVICE_DATA_MAP(_map) \ - MCFG_DEVICE_ADDRESS_MAP(AS_DATA, _map) - -#define MCFG_DEVICE_IO_MAP(_map) \ - MCFG_DEVICE_ADDRESS_MAP(AS_IO, _map) - -#define MCFG_DEVICE_OPCODES_MAP(_map) \ - MCFG_DEVICE_ADDRESS_MAP(AS_OPCODES, _map) - - - -//************************************************************************** // TYPE DEFINITIONS //************************************************************************** diff --git a/src/emu/dirom.h b/src/emu/dirom.h index 1e854c3a3c7..761e1d357ec 100644 --- a/src/emu/dirom.h +++ b/src/emu/dirom.h @@ -17,9 +17,6 @@ #ifndef MAME_EMU_DIROM_H #define MAME_EMU_DIROM_H -#define MCFG_DEVICE_ROM(_rom_tag) \ - dynamic_cast<device_rom_interface &>(*device).set_device_rom_tag(_rom_tag); - class device_rom_interface : public device_memory_interface { public: diff --git a/src/emu/dislot.h b/src/emu/dislot.h index 3154a056f35..da6a1b0aa3d 100644 --- a/src/emu/dislot.h +++ b/src/emu/dislot.h @@ -9,41 +9,6 @@ #ifndef MAME_EMU_DISLOT_H #define MAME_EMU_DISLOT_H -//************************************************************************** -// LEGACY MACROS -//************************************************************************** - -#define MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_option, _fixed) MCFG_SLOT_OPTION_RESET _slot_intf(dynamic_cast<device_slot_interface &>(*device)); MCFG_SLOT_DEFAULT_OPTION(_def_option) MCFG_SLOT_FIXED(_fixed) - - -//************************************************************************** -// MACROS -//************************************************************************** - -#define MCFG_SLOT_FIXED(_fixed) \ - dynamic_cast<device_slot_interface &>(*device).set_fixed(_fixed); - -#define MCFG_SLOT_DEFAULT_OPTION(_option) \ - dynamic_cast<device_slot_interface &>(*device).set_default_option(_option); - -#define MCFG_SLOT_OPTION_RESET \ - dynamic_cast<device_slot_interface &>(*device).option_reset(); - -#define MCFG_SLOT_OPTION_ADD(_option, _devtype) \ - dynamic_cast<device_slot_interface &>(*device).option_add(_option, _devtype); - -#define MCFG_SLOT_OPTION_DEFAULT_BIOS(_option, _default_bios) \ - dynamic_cast<device_slot_interface &>(*device).set_option_default_bios(_option, _default_bios); - -#define MCFG_SLOT_OPTION_MACHINE_CONFIG(_option, _machine_config_name) \ - dynamic_cast<device_slot_interface &>(*device).set_option_machine_config(_option, _machine_config_name); - -#define MCFG_SLOT_OPTION_DEVICE_INPUT_DEFAULTS(_option, _dev_inp_def) \ - dynamic_cast<device_slot_interface &>(*device).set_option_device_input_defaults(_option, DEVICE_INPUT_DEFAULTS_NAME(_dev_inp_def)); - -#define MCFG_SLOT_OPTION_CLOCK(_option, _clock) \ - dynamic_cast<device_slot_interface &>(*device).set_option_clock(_option, _clock); - //************************************************************************** // TYPE DEFINITIONS diff --git a/src/emu/disound.h b/src/emu/disound.h index 1a13c7613fa..37a7df462be 100644 --- a/src/emu/disound.h +++ b/src/emu/disound.h @@ -31,20 +31,6 @@ constexpr int AUTO_ALLOC_INPUT = 65535; //************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_SOUND_ROUTE(_output, _target, ...) \ - dynamic_cast<device_sound_interface &>(*device).add_route(_output, _target, __VA_ARGS__); - -#define MCFG_SOUND_ROUTES_RESET() \ - dynamic_cast<device_sound_interface &>(*device).reset_routes(); - -#define MCFG_MIXER_ROUTE(_output, _target, _gain, _mixoutput) \ - dynamic_cast<device_sound_interface &>(*device).add_route(_output, _target, _gain, AUTO_ALLOC_INPUT, _mixoutput); - - -//************************************************************************** // TYPE DEFINITIONS //************************************************************************** diff --git a/src/emu/mconfig.h b/src/emu/mconfig.h index 16f431a9eb8..cf683c8b1c8 100644 --- a/src/emu/mconfig.h +++ b/src/emu/mconfig.h @@ -216,42 +216,5 @@ inline std::enable_if_t<emu::detail::is_device_interface<typename std::remove_re } } // namespace emu::detail - -//*************************************************************************/ -/** @name Machine config start/end macros */ -//*************************************************************************/ - -/** - @def MACHINE_CONFIG_START(_name) - Begins a device machine configuration member - @param _name name of this config - @hideinitializer -*/ -#define MACHINE_CONFIG_START(_name) \ -ATTR_COLD void _name(machine_config &config) \ -{ \ - device_t *device = nullptr; \ - (void)device; \ - -/** -@def MACHINE_CONFIG_END -Ends a machine_config. -@hideinitializer -*/ -#define MACHINE_CONFIG_END \ -} - -//*************************************************************************/ -/** @name Core machine config options */ -//*************************************************************************/ - -// add/remove devices -#define MCFG_DEVICE_ADD(_tag, ...) \ - device = emu::detail::device_add_impl(config, _tag, __VA_ARGS__); -#define MCFG_DEVICE_REPLACE(_tag, ...) \ - device = emu::detail::device_replace_impl(config, _tag, __VA_ARGS__); -#define MCFG_DEVICE_MODIFY(_tag) \ - device = config.device_find(this, _tag); - #endif /* MAME_EMU_MCONFIG_H */ /** @} */ diff --git a/src/emu/screen.h b/src/emu/screen.h index c530dc75502..a2b0b5eb0a4 100644 --- a/src/emu/screen.h +++ b/src/emu/screen.h @@ -354,7 +354,7 @@ private: screen_type_enum m_type; // type of screen int m_orientation; // orientation flags combined with system flags std::pair<unsigned, unsigned> m_phys_aspect; // physical aspect ratio - bool m_oldstyle_vblank_supplied; // MCFG_SCREEN_VBLANK_TIME macro used + bool m_oldstyle_vblank_supplied; // set_vblank_time call used attoseconds_t m_refresh; // default refresh period attoseconds_t m_vblank; // duration of a VBLANK float m_xoffset, m_yoffset; // default X/Y offsets @@ -440,24 +440,15 @@ DECLARE_DEVICE_TYPE(SCREEN, screen_device) typedef device_type_iterator<screen_device> screen_device_iterator; /*! - @defgroup Screen device configuration macros + @defgroup Screen device configuration functions @{ - @def MCFG_SCREEN_ADD - Add a new legacy screen color device - - @def MCFG_SCREEN_ADD_MONOCHROME - Add a new legacy monochrome screen device - - @def MCFG_SCREEN_MODIFY - Modify a legacy screen device - - @def MCFG_SCREEN_TYPE + @def set_type Modify the screen device type @see screen_type_enum - @def MCFG_SCREEN_RAW_PARAMS + @def set_raw Configures screen parameters for the given screen. - @remark It's better than using @see MCFG_SCREEN_REFRESH_RATE and @see MCFG_SCREEN_VBLANK_TIME but still not enough. + @remark It's better than using @see set_refresh_hz and @see set_vblank_time but still not enough. @param _pixclock Pixel Clock frequency value @@ -480,23 +471,23 @@ typedef device_type_iterator<screen_device> screen_device_iterator; @param _vbstart Vertical pixel position for VBlank start event, also last pixel where screen rectangle is visible. - @def MCFG_SCREEN_REFRESH_RATE + @def set_refresh_hz Sets the number of Frames Per Second for this screen - @remarks Please use @see MCFG_SCREEN_RAW_PARAMS instead. Gives imprecise timings. + @remarks Please use @see set_raw instead. Gives imprecise timings. @param _rate FPS number - @def MCFG_SCREEN_VBLANK_TIME + @def set_vblank_time Sets the vblank time of the given screen @remarks Please use @see MCFG_SCREEN_RAW_PARAMS instead. Gives imprecise timings. @param _time Time parameter, in attotime value - @def MCFG_SCREEN_SIZE + @def set_size Sets total screen size, including H/V-Blanks - @remarks Please use @see MCFG_SCREEN_RAW_PARAMS instead. Gives imprecise timings. + @remarks Please use @see set_raw instead. Gives imprecise timings. @param _width Screen horizontal size @@ -504,9 +495,9 @@ typedef device_type_iterator<screen_device> screen_device_iterator; @param _height Screen vertical size - @def MCFG_SCREEN_VISIBLE_AREA + @def set_visarea Sets screen visible area - @remarks Please use MCFG_SCREEN_RAW_PARAMS instead. Gives imprecise timings. + @remarks Please use @see set_raw instead. Gives imprecise timings. @param _minx Screen left border @@ -523,38 +514,4 @@ typedef device_type_iterator<screen_device> screen_device_iterator; @} */ -#define MCFG_SCREEN_ADD(_tag, _type) \ - MCFG_DEVICE_ADD(_tag, SCREEN, SCREEN_TYPE_##_type) - -#define MCFG_SCREEN_MODIFY(_tag) \ - MCFG_DEVICE_MODIFY(_tag) - -#define MCFG_SCREEN_TYPE(_type) \ - downcast<screen_device &>(*device).set_type(SCREEN_TYPE_##_type); - -#define MCFG_SCREEN_RAW_PARAMS(_pixclock, _htotal, _hbend, _hbstart, _vtotal, _vbend, _vbstart) \ - downcast<screen_device &>(*device).set_raw(_pixclock, _htotal, _hbend, _hbstart, _vtotal, _vbend, _vbstart); - -#define MCFG_SCREEN_REFRESH_RATE(_rate) \ - downcast<screen_device &>(*device).set_refresh(HZ_TO_ATTOSECONDS(_rate)); - -#define MCFG_SCREEN_VBLANK_TIME(_time) \ - downcast<screen_device &>(*device).set_vblank_time(_time); - -#define MCFG_SCREEN_SIZE(_width, _height) \ - downcast<screen_device &>(*device).set_size(_width, _height); - -#define MCFG_SCREEN_VISIBLE_AREA(_minx, _maxx, _miny, _maxy) \ - downcast<screen_device &>(*device).set_visarea(_minx, _maxx, _miny, _maxy); -#define MCFG_SCREEN_UPDATE_DRIVER(_class, _method) \ - downcast<screen_device &>(*device).set_screen_update(&_class::_method, #_class "::" #_method); -#define MCFG_SCREEN_UPDATE_DEVICE(_device, _class, _method) \ - downcast<screen_device &>(*device).set_screen_update(_device, &_class::_method, #_class "::" #_method); -#define MCFG_SCREEN_PALETTE(_palette_tag) \ - downcast<screen_device &>(*device).set_palette(_palette_tag); -#define MCFG_SCREEN_NO_PALETTE \ - downcast<screen_device &>(*device).set_palette(finder_base::DUMMY_TAG); -#define MCFG_SCREEN_VIDEO_ATTRIBUTES(_flags) \ - downcast<screen_device &>(*device).set_video_attributes(_flags); - #endif // MAME_EMU_SCREEN_H diff --git a/src/emu/tilemap.h b/src/emu/tilemap.h index 23b75362f0e..15794247a4f 100644 --- a/src/emu/tilemap.h +++ b/src/emu/tilemap.h @@ -360,68 +360,6 @@ enum tilemap_standard_mapper TILEMAP_STANDARD_COUNT }; - - -//************************************************************************** -// DEVICE CONFIGURATION MACROS -//************************************************************************** - -// primitives -#define MCFG_TILEMAP_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, TILEMAP) -#define MCFG_TILEMAP_GFXDECODE(_gfxtag) \ - downcast<tilemap_device &>(*device).set_gfxdecode(_gfxtag); -#define MCFG_TILEMAP_BYTES_PER_ENTRY(_bpe) \ - downcast<tilemap_device &>(*device).set_bytes_per_entry(_bpe); -#define MCFG_TILEMAP_INFO_CB_DRIVER(_class, _method) \ - downcast<tilemap_device &>(*device).set_info_callback(tilemap_get_info_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr)); -#define MCFG_TILEMAP_INFO_CB_DEVICE(_device, _class, _method) \ - downcast<tilemap_device &>(*device).set_info_callback(tilemap_get_info_delegate(&_class::_method, #_class "::" #_method, _device, (_class *)nullptr)); -#define MCFG_TILEMAP_LAYOUT_STANDARD(_standard, _columns, _rows) \ - downcast<tilemap_device &>(*device).set_layout(TILEMAP_##_standard, _columns, _rows); -#define MCFG_TILEMAP_LAYOUT_CB_DRIVER(_class, _method, _columns, _rows) \ - downcast<tilemap_device &>(*device).set_layout(tilemap_mapper_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr), _columns, _rows); -#define MCFG_TILEMAP_LAYOUT_CB_DEVICE(_device, _class, _method, _columns, _rows) \ - downcast<tilemap_device &>(*device).set_layout(tilemap_mapper_delegate(&_class::_method, #_class "::" #_method, _device, (_class *)nullptr), _columns, _rows); -#define MCFG_TILEMAP_TILE_SIZE(_width, _height) \ - downcast<tilemap_device &>(*device).set_tile_size(_width, _height); -#define MCFG_TILEMAP_TRANSPARENT_PEN(_pen) \ - downcast<tilemap_device &>(*device).set_configured_transparent_pen(_pen); - -// common cases -#define MCFG_TILEMAP_ADD_STANDARD(_tag, _gfxtag, _bytes_per_entry, _class, _method, _tilewidth, _tileheight, _mapper, _columns, _rows) \ - MCFG_TILEMAP_ADD(_tag) \ - MCFG_TILEMAP_GFXDECODE(_gfxtag) \ - MCFG_TILEMAP_BYTES_PER_ENTRY(_bytes_per_entry) \ - MCFG_TILEMAP_INFO_CB_DRIVER(_class, _method) \ - MCFG_TILEMAP_LAYOUT_STANDARD(_mapper, _columns, _rows) \ - MCFG_TILEMAP_TILE_SIZE(_tilewidth, _tileheight) -#define MCFG_TILEMAP_ADD_CUSTOM(_tag, _gfxtag, _bytes_per_entry, _class, _method, _tilewidth, _tileheight, _mapper, _columns, _rows) \ - MCFG_TILEMAP_ADD(_tag) \ - MCFG_TILEMAP_GFXDECODE(_gfxtag) \ - MCFG_TILEMAP_BYTES_PER_ENTRY(_bytes_per_entry) \ - MCFG_TILEMAP_INFO_CB_DRIVER(_class, _method) \ - MCFG_TILEMAP_LAYOUT_CB_DRIVER(_class, _mapper, _columns, _rows) \ - MCFG_TILEMAP_TILE_SIZE(_tilewidth, _tileheight) -#define MCFG_TILEMAP_ADD_STANDARD_TRANSPEN(_tag, _gfxtag, _bytes_per_entry, _class, _method, _tilewidth, _tileheight, _mapper, _columns, _rows, _transpen) \ - MCFG_TILEMAP_ADD(_tag) \ - MCFG_TILEMAP_GFXDECODE(_gfxtag) \ - MCFG_TILEMAP_BYTES_PER_ENTRY(_bytes_per_entry) \ - MCFG_TILEMAP_INFO_CB_DRIVER(_class, _method) \ - MCFG_TILEMAP_LAYOUT_STANDARD(_mapper, _columns, _rows) \ - MCFG_TILEMAP_TILE_SIZE(_tilewidth, _tileheight) \ - MCFG_TILEMAP_TRANSPARENT_PEN(_transpen) -#define MCFG_TILEMAP_ADD_CUSTOM_TRANSPEN(_tag, _gfxtag, _bytes_per_entry, _class, _method, _tilewidth, _tileheight, _mapper, _columns, _rows, _transpen) \ - MCFG_TILEMAP_ADD(_tag) \ - MCFG_TILEMAP_GFXDECODE(_gfxtag) \ - MCFG_TILEMAP_BYTES_PER_ENTRY(_bytes_per_entry) \ - MCFG_TILEMAP_INFO_CB_DRIVER(_class, _method) \ - MCFG_TILEMAP_LAYOUT_CB_DRIVER(_columns, _mapper, _rows, _class) \ - MCFG_TILEMAP_TILE_SIZE(_tilewidth, _tileheight) \ - MCFG_TILEMAP_TRANSPARENT_PEN(_transpen) - - - //************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -741,6 +679,15 @@ public: set_tile_size(tilewidth, tileheight); } + template <typename T> + tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&gfxtag, int entrybytes, u16 tilewidth, u16 tileheight) + : tilemap_device(mconfig, tag, owner, (u32)0) + { + set_gfxdecode(std::forward<T>(gfxtag)); + set_bytes_per_entry(entrybytes); + set_tile_size(tilewidth, tileheight); + } + tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); template <typename T> void set_gfxdecode(T &&tag) { m_gfxdecode.set_tag(std::forward<T>(tag)); } @@ -756,6 +703,11 @@ public: set_info_callback(tilemap_get_info_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr))); } + template <class FunctionClass> void set_layout(tilemap_memory_index (FunctionClass::*callback)(u32, u32, u32, u32), const char *name, u32 columns, u32 rows) + { + set_layout(tilemap_mapper_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)), columns, rows); + } + void set_layout(tilemap_standard_mapper mapper, u32 columns, u32 rows) { m_standard_mapper = mapper; m_num_columns = columns; |