summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/kc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/kc.cpp')
-rw-r--r--src/mame/video/kc.cpp57
1 files changed, 28 insertions, 29 deletions
diff --git a/src/mame/video/kc.cpp b/src/mame/video/kc.cpp
index 7371c8513af..52b37fbbe3b 100644
--- a/src/mame/video/kc.cpp
+++ b/src/mame/video/kc.cpp
@@ -15,45 +15,44 @@
// 3 bit colour value. bit 2->green, bit 1->red, bit 0->blue
-static const uint8_t kc85_palette[KC85_PALETTE_SIZE * 3] =
+static constexpr rgb_t kc85_pens[KC85_PALETTE_SIZE] =
{
// foreground colours, "full" of each component
- 0x00, 0x00, 0x00, // black
- 0x00, 0x00, 0xd0, // blue
- 0xd0, 0x00, 0x00, // red
- 0xd0, 0x00, 0xd0, // magenta
- 0x00, 0xd0, 0x00, // green
- 0x00, 0xd0, 0xd0, // cyan
- 0xd0, 0xd0, 0x00, // yellow
- 0xd0, 0xd0, 0xd0, // white
+ { 0x00, 0x00, 0x00 }, // black
+ { 0x00, 0x00, 0xd0 }, // blue
+ { 0xd0, 0x00, 0x00 }, // red
+ { 0xd0, 0x00, 0xd0 }, // magenta
+ { 0x00, 0xd0, 0x00 }, // green
+ { 0x00, 0xd0, 0xd0 }, // cyan
+ { 0xd0, 0xd0, 0x00 }, // yellow
+ { 0xd0, 0xd0, 0xd0 }, // white
// full of each component + half of another component
- 0x00, 0x00, 0x00, // black
- 0x60, 0x00, 0xa0, // violet
- 0xa0, 0x60, 0x00, // brown
- 0xa0, 0x00, 0x60, // red/purple
- 0x00, 0xa0, 0x60, // pastel green
- 0x00, 0x60, 0xa0, // sky blue
- 0xa0, 0xa0, 0x60, // yellow/green
- 0xd0, 0xd0, 0xd0, // white
+ { 0x00, 0x00, 0x00 }, // black
+ { 0x60, 0x00, 0xa0 }, // violet
+ { 0xa0, 0x60, 0x00 }, // brown
+ { 0xa0, 0x00, 0x60 }, // red/purple
+ { 0x00, 0xa0, 0x60 }, // pastel green
+ { 0x00, 0x60, 0xa0 }, // sky blue
+ { 0xa0, 0xa0, 0x60 }, // yellow/green
+ { 0xd0, 0xd0, 0xd0 }, // white
// background colours are slightly darker than foreground colours
- 0x00, 0x00, 0x00, // black
- 0x00, 0x00, 0xa0, // dark blue
- 0xa0, 0x00, 0x00, // dark red
- 0xa0, 0x00, 0xa0, // dark magenta
- 0x00, 0xa0, 0x00, // dark green
- 0x00, 0xa0, 0xa0, // dark cyan
- 0xa0, 0xa0, 0x00, // dark yellow
- 0xa0, 0xa0, 0xa0 // dark white (grey)
+ { 0x00, 0x00, 0x00 }, // black
+ { 0x00, 0x00, 0xa0 }, // dark blue
+ { 0xa0, 0x00, 0x00 }, // dark red
+ { 0xa0, 0x00, 0xa0 }, // dark magenta
+ { 0x00, 0xa0, 0x00 }, // dark green
+ { 0x00, 0xa0, 0xa0 }, // dark cyan
+ { 0xa0, 0xa0, 0x00 }, // dark yellow
+ { 0xa0, 0xa0, 0xa0 } // dark white (grey)
};
-/* Initialise the palette */
-PALETTE_INIT_MEMBER(kc_state,kc85)
+// Initialise the palette
+void kc_state::kc85_palette(palette_device &palette) const
{
- for (int i = 0; i < sizeof(kc85_palette) / 3; i++ )
- palette.set_pen_color(i, kc85_palette[i*3], kc85_palette[i*3+1], kc85_palette[i*3+2]);
+ palette.set_pen_colors(0, kc85_pens);
}
/* set new blink state */