diff options
author | 2014-02-19 06:07:32 +0000 | |
---|---|---|
committer | 2014-02-19 06:07:32 +0000 | |
commit | 57cfaa163ee656de8f25e079eb721b3cb9720a9a (patch) | |
tree | 8b235effed1208b1c9b18d554f27154ce4df741d /src/mess/drivers/gp2x.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/mess/drivers/gp2x.c')
-rw-r--r-- | src/mess/drivers/gp2x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mess/drivers/gp2x.c b/src/mess/drivers/gp2x.c index bf2e03cfddc..c4357f3b237 100644 --- a/src/mess/drivers/gp2x.c +++ b/src/mess/drivers/gp2x.c @@ -168,7 +168,7 @@ UINT32 gp2x_state::screen_update_gp2x(screen_device &screen, bitmap_rgb32 &bitma { UINT16 pixel = vram[(320*y)+x]; - *scanline++ = MAKE_ARGB(0xff, (pixel>>11)<<3, ((pixel>>5)&0x3f)<<2, (pixel&0x1f)<<3); + *scanline++ = rgb_t(0xff, (pixel>>11)<<3, ((pixel>>5)&0x3f)<<2, (pixel&0x1f)<<3); } } } |