summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/liberate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/liberate.cpp')
-rw-r--r--src/mame/video/liberate.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mame/video/liberate.cpp b/src/mame/video/liberate.cpp
index 618d0f29f81..35b1fbf6f57 100644
--- a/src/mame/video/liberate.cpp
+++ b/src/mame/video/liberate.cpp
@@ -243,35 +243,35 @@ VIDEO_START_MEMBER(liberate_state,prosport)
/***************************************************************************/
-PALETTE_INIT_MEMBER(liberate_state,liberate)
+void liberate_state::liberate_palette(palette_device &palette) const
{
const uint8_t *color_prom = memregion("proms")->base();
- int i, bit0, bit1, bit2, g, r, b;
-
- for (i = 0;i < 32;i++)
+ for (int i = 0; i < 32; i++)
{
- /* red component */
+ int bit0, bit1, bit2;
+
+ // red component
bit0 = (*color_prom >> 0) & 0x01;
bit1 = (*color_prom >> 1) & 0x01;
bit2 = (*color_prom >> 2) & 0x01;
- r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+ int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- /* green component */
+ // green component
bit0 = (*color_prom >> 3) & 0x01;
bit1 = (*color_prom >> 4) & 0x01;
bit2 = (*color_prom >> 5) & 0x01;
- g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+ int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- /* blue component */
+ // blue component
bit0 = 0;
bit1 = (*color_prom >> 6) & 0x01;
bit2 = (*color_prom >> 7) & 0x01;
- b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+ int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
color_prom++;
- palette.set_pen_color(i,rgb_t(r,g,b));
+ palette.set_pen_color(i, rgb_t(r, g, b));
}
- palette.set_pen_color(32,rgb_t(0,0,0)); /* Allocate black for when no background is displayed */
+ palette.set_pen_color(32, rgb_t::black()); // Allocate black for when no background is displayed
}
/***************************************************************************/