summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/video/orion.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/mess/video/orion.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/mess/video/orion.c')
-rw-r--r--src/mess/video/orion.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/mess/video/orion.c b/src/mess/video/orion.c
index c254232142b..b9ba0e475c9 100644
--- a/src/mess/video/orion.c
+++ b/src/mess/video/orion.c
@@ -86,24 +86,24 @@ UINT32 orion_state::screen_update_orion128(screen_device &screen, bitmap_ind16 &
}
static const rgb_t orion128_palette[18] = {
- MAKE_RGB(0x00, 0x00, 0x00), // 0
- MAKE_RGB(0x00, 0x00, 0xc0), // 1
- MAKE_RGB(0x00, 0xc0, 0x00), // 2
- MAKE_RGB(0x00, 0xc0, 0xc0), // 3
- MAKE_RGB(0xc0, 0x00, 0x00), // 4
- MAKE_RGB(0xc0, 0x00, 0xc0), // 5
- MAKE_RGB(0xc0, 0xc0, 0x00), // 6
- MAKE_RGB(0xc0, 0xc0, 0xc0), // 7
- MAKE_RGB(0x80, 0x80, 0x80), // 8
- MAKE_RGB(0x00, 0x00, 0xff), // 9
- MAKE_RGB(0x00, 0xff, 0x00), // A
- MAKE_RGB(0x00, 0xff, 0xff), // B
- MAKE_RGB(0xff, 0x00, 0x00), // C
- MAKE_RGB(0xff, 0x00, 0xff), // D
- MAKE_RGB(0xff, 0xff, 0x00), // E
- MAKE_RGB(0xff, 0xff, 0xff), // F
- MAKE_RGB(0xc8, 0xb4, 0x28), // 10
- MAKE_RGB(0x32, 0xfa, 0xfa) // 11
+ rgb_t(0x00, 0x00, 0x00), // 0
+ rgb_t(0x00, 0x00, 0xc0), // 1
+ rgb_t(0x00, 0xc0, 0x00), // 2
+ rgb_t(0x00, 0xc0, 0xc0), // 3
+ rgb_t(0xc0, 0x00, 0x00), // 4
+ rgb_t(0xc0, 0x00, 0xc0), // 5
+ rgb_t(0xc0, 0xc0, 0x00), // 6
+ rgb_t(0xc0, 0xc0, 0xc0), // 7
+ rgb_t(0x80, 0x80, 0x80), // 8
+ rgb_t(0x00, 0x00, 0xff), // 9
+ rgb_t(0x00, 0xff, 0x00), // A
+ rgb_t(0x00, 0xff, 0xff), // B
+ rgb_t(0xff, 0x00, 0x00), // C
+ rgb_t(0xff, 0x00, 0xff), // D
+ rgb_t(0xff, 0xff, 0x00), // E
+ rgb_t(0xff, 0xff, 0xff), // F
+ rgb_t(0xc8, 0xb4, 0x28), // 10
+ rgb_t(0x32, 0xfa, 0xfa) // 11
};
PALETTE_INIT_MEMBER(orion_state,orion128 )