summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/wangpc
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2016-10-23 00:22:00 +0200
committer AJR <ajrhacker@users.noreply.github.com>2016-10-22 18:45:04 -0400
commit7d41a1f619f0e03eeaf7acc2edde6c2671779e03 (patch)
tree4b8e1df6b0bd371b296c55f55f17ef7159543284 /src/devices/bus/wangpc
parentf1dcd36b73aa0a8afd9a0053c97c668acc3e0319 (diff)
Improvements to rgb_t (nw)
- Make most class methods constexpr - Make color constants (white, black, etc.) into constexpr factory methods, in order to fix a static initialization problem discussed on the MAMEWorld forums. (Note that while C++14 allows constexpr member variables to be initialized outside classes, current compilers' support for C++14 constexpr rules has proven to be lamentably deficient.) - Create bitmap_rgb32::erase to simplify syntax in update handlers
Diffstat (limited to 'src/devices/bus/wangpc')
-rw-r--r--src/devices/bus/wangpc/lvc.cpp4
-rw-r--r--src/devices/bus/wangpc/mvc.cpp4
-rw-r--r--src/devices/bus/wangpc/tig.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/bus/wangpc/lvc.cpp b/src/devices/bus/wangpc/lvc.cpp
index 7fff3142240..b1bc1cb1427 100644
--- a/src/devices/bus/wangpc/lvc.cpp
+++ b/src/devices/bus/wangpc/lvc.cpp
@@ -69,7 +69,7 @@ MC6845_UPDATE_ROW( wangpc_lvc_device::crtc_update_row )
if (column == cursor_x) color = 0x03;
- bitmap.pix32(vbp + y, hbp + x) = de ? m_palette[color] : rgb_t::black;
+ bitmap.pix32(vbp + y, hbp + x) = de ? m_palette[color] : rgb_t::black();
data <<= 1;
}
@@ -91,7 +91,7 @@ MC6845_UPDATE_ROW( wangpc_lvc_device::crtc_update_row )
if (column == cursor_x) color = 0x03;
- bitmap.pix32(vbp + y, hbp + x) = de ? m_palette[color] : rgb_t::black;
+ bitmap.pix32(vbp + y, hbp + x) = de ? m_palette[color] : rgb_t::black();
data <<= 1;
}
diff --git a/src/devices/bus/wangpc/mvc.cpp b/src/devices/bus/wangpc/mvc.cpp
index 41643c21b87..1ee859939e9 100644
--- a/src/devices/bus/wangpc/mvc.cpp
+++ b/src/devices/bus/wangpc/mvc.cpp
@@ -48,7 +48,7 @@
static const rgb_t PALETTE_MVC[] =
{
- rgb_t::black,
+ rgb_t::black(),
rgb_t(0x00, 0x80, 0x00),
rgb_t(0x00, 0xff, 0x00)
};
@@ -114,7 +114,7 @@ MC6845_UPDATE_ROW( wangpc_mvc_device::crtc_update_row )
int color = ((BIT(data, 9) & ~ATTR_BLANK) ^ ATTR_REVERSE);
if ((color | bitmap.pix32(vbp + y, hbp + x)) & ATTR_BOLD) color = 2;
- if (color) bitmap.pix32(vbp + y, hbp + x) = de ? PALETTE_MVC[color] : rgb_t::black;
+ if (color) bitmap.pix32(vbp + y, hbp + x) = de ? PALETTE_MVC[color] : rgb_t::black();
data <<= 1;
}
diff --git a/src/devices/bus/wangpc/tig.cpp b/src/devices/bus/wangpc/tig.cpp
index cc51120f379..9c9fa45487a 100644
--- a/src/devices/bus/wangpc/tig.cpp
+++ b/src/devices/bus/wangpc/tig.cpp
@@ -110,7 +110,7 @@ UPD7220_DISPLAY_PIXELS_MEMBER( wangpc_tig_device::hgdc_display_pixels )
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( wangpc_tig )
- MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green)
+ MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green())
MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, wangpc_tig_device, screen_update)
MCFG_SCREEN_SIZE(80*10, 25*12)
MCFG_SCREEN_VISIBLE_AREA(0, 80*10-1, 0, 25*12-1)