summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/cps1.c
diff options
context:
space:
mode:
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
commit57cfaa163ee656de8f25e079eb721b3cb9720a9a (patch)
tree8b235effed1208b1c9b18d554f27154ce4df741d /src/mame/video/cps1.c
parent5c2b6036df886a416ea727ecb72da2827b43bd93 (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/video/cps1.c')
-rw-r--r--src/mame/video/cps1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mame/video/cps1.c b/src/mame/video/cps1.c
index 642bc5f0716..7bbc07c19d3 100644
--- a/src/mame/video/cps1.c
+++ b/src/mame/video/cps1.c
@@ -2113,7 +2113,7 @@ VIDEO_START_MEMBER(cps_state,cps)
cps1_update_transmasks();
for (i = 0; i < cps1_palette_entries * 16; i++)
- palette_set_color(machine(), i, MAKE_RGB(0,0,0));
+ palette_set_color(machine(), i, rgb_t(0,0,0));
m_buffered_obj = auto_alloc_array_clear(machine(), UINT16, m_obj_size / 2);
@@ -2232,7 +2232,7 @@ void cps_state::cps1_build_palette( const UINT16* const palette_base )
g = ((palette >> 4) & 0x0f) * 0x11 * bright / 0x2d;
b = ((palette >> 0) & 0x0f) * 0x11 * bright / 0x2d;
- palette_set_color (machine(), 0x200 * page + offset, MAKE_RGB(r, g, b));
+ palette_set_color (machine(), 0x200 * page + offset, rgb_t(r, g, b));
}
}
else