summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/screen.h
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
committer Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
commit97b67170277437131adf6ed4d60139c172529e4f (patch)
tree7a5cbf608f191075f1612b1af15832c206a3fe2d /src/emu/screen.h
parentb380514764cf857469bae61c11143a19f79a74c5 (diff)
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
Diffstat (limited to 'src/emu/screen.h')
-rw-r--r--src/emu/screen.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/emu/screen.h b/src/emu/screen.h
index acd106f3c4e..32702e26938 100644
--- a/src/emu/screen.h
+++ b/src/emu/screen.h
@@ -177,6 +177,18 @@ public:
{
set_type(type);
}
+ screen_device(const machine_config &mconfig, const char *tag, device_t *owner, screen_type_enum type, rgb_t color)
+ : screen_device(mconfig, tag, owner, u32(0))
+ {
+ set_type(type);
+ set_color(color);
+ }
+ screen_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *region)
+ : screen_device(mconfig, tag, owner, u32(0))
+ {
+ set_type(SCREEN_TYPE_SVG);
+ set_svg_region(region);
+ }
~screen_device();
// configuration readers
@@ -217,6 +229,7 @@ public:
void set_vblank_time(attoseconds_t time) { m_vblank = time; m_oldstyle_vblank_supplied = true; }
void set_size(u16 width, u16 height) { m_width = width; m_height = height; }
void set_visarea(s16 minx, s16 maxx, s16 miny, s16 maxy) { m_visarea.set(minx, maxx, miny, maxy); }
+ void set_visarea_full() { m_visarea.set(0, m_width - 1, 0, m_height - 1); } // call after set_size
void set_default_position(double xscale, double xoffs, double yscale, double yoffs) {
m_xscale = xscale;
m_xoffset = xoffs;
@@ -520,22 +533,12 @@ 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_ADD_MONOCHROME(_tag, _type, _color) \
- MCFG_DEVICE_ADD(_tag, SCREEN, 0) \
- MCFG_SCREEN_TYPE(_type) \
- MCFG_SCREEN_COLOR(_color)
-
#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_SVG_ADD(_tag, _region) \
- MCFG_DEVICE_ADD(_tag, SCREEN, 0) \
- MCFG_SCREEN_TYPE(SVG) \
- downcast<screen_device &>(*device).set_svg_region(_region);
-
#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);
@@ -550,8 +553,6 @@ typedef device_type_iterator<screen_device> screen_device_iterator;
#define MCFG_SCREEN_VISIBLE_AREA(_minx, _maxx, _miny, _maxy) \
downcast<screen_device &>(*device).set_visarea(_minx, _maxx, _miny, _maxy);
-#define MCFG_SCREEN_DEFAULT_POSITION(_xscale, _xoffs, _yscale, _yoffs) \
- downcast<screen_device &>(*device).set_default_position(_xscale, _xoffs, _yscale, _yoffs);
#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) \
@@ -564,7 +565,5 @@ typedef device_type_iterator<screen_device> screen_device_iterator;
downcast<screen_device &>(*device).set_palette(finder_base::DUMMY_TAG);
#define MCFG_SCREEN_VIDEO_ATTRIBUTES(_flags) \
downcast<screen_device &>(*device).set_video_attributes(_flags);
-#define MCFG_SCREEN_COLOR(_color) \
- downcast<screen_device &>(*device).set_color(_color);
#endif // MAME_EMU_SCREEN_H