diff options
author | Aaron Giles <aaron@aarongiles.com> | 2014-02-19 06:07:32 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2014-02-19 06:07:32 +0000 |
commit | 57cfaa163ee656de8f25e079eb721b3cb9720a9a (patch) | |
tree | 8b235effed1208b1c9b18d554f27154ce4df741d /src/mame/drivers/m10.c | |
parent | 5c2b6036df886a416ea727ecb72da2827b43bd93 (diff) |
Switched rgb_t to a class, replacing macros with methods. Mappings are
as follows:
MAKE_RGB(r,g,b) == rgb_t(r,g,b)
MAKE_ARGB(a,r,g,b) == rgb_t(a,r,g,b)
RGB_ALPHA(data) == data.a()
RGB_RED(data) == data.r()
RGB_GREEN(data) == data.g()
RGB_BLUE(data) == data.b()
RGB_BLACK == rgb_t::black
RGB_WHITE == rgb_t::white
Implicit conversions to/from UINT32 are built in as well as simple
addition, subtraction, and scaling (with clamping).
As a result of being a class, some stricter typing was needed in
a few places but overall not too much.
Diffstat (limited to 'src/mame/drivers/m10.c')
-rw-r--r-- | src/mame/drivers/m10.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mame/drivers/m10.c b/src/mame/drivers/m10.c index 863aa5350db..03161d81144 100644 --- a/src/mame/drivers/m10.c +++ b/src/mame/drivers/m10.c @@ -181,9 +181,9 @@ PALETTE_INIT_MEMBER(m10_state,m10) rgb_t color; if (i & 0x01) - color = MAKE_RGB(pal1bit(~i >> 3), pal1bit(~i >> 2), pal1bit(~i >> 1)); + color = rgb_t(pal1bit(~i >> 3), pal1bit(~i >> 2), pal1bit(~i >> 1)); else - color = RGB_BLACK; + color = rgb_t::black; palette_set_color(machine(), i, color); } |