diff options
Diffstat (limited to 'src/mame/video/rollrace.c')
-rw-r--r-- | src/mame/video/rollrace.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mame/video/rollrace.c b/src/mame/video/rollrace.c index 875e83f3e63..161bba25783 100644 --- a/src/mame/video/rollrace.c +++ b/src/mame/video/rollrace.c @@ -20,13 +20,13 @@ bit 0 -- 1 kohm resistor -- RED/GREEN/BLUE ***************************************************************************/ -PALETTE_INIT( rollrace ) +void rollrace_state::palette_init() { - const UINT8 *color_prom = machine.root_device().memregion("proms")->base(); + const UINT8 *color_prom = machine().root_device().memregion("proms")->base(); int i; - for (i = 0;i < machine.total_colors();i++) + for (i = 0;i < machine().total_colors();i++) { int bit0,bit1,bit2,bit3,r,g,b; @@ -36,18 +36,18 @@ PALETTE_INIT( rollrace ) bit2 = (color_prom[0] >> 2) & 0x01; bit3 = (color_prom[0] >> 3) & 0x01; r = 0x0e * bit0 + 0x1f * bit1 + 0x42 * bit2 + 0x90 * bit3; - bit0 = (color_prom[machine.total_colors()] >> 0) & 0x01; - bit1 = (color_prom[machine.total_colors()] >> 1) & 0x01; - bit2 = (color_prom[machine.total_colors()] >> 2) & 0x01; - bit3 = (color_prom[machine.total_colors()] >> 3) & 0x01; + bit0 = (color_prom[machine().total_colors()] >> 0) & 0x01; + bit1 = (color_prom[machine().total_colors()] >> 1) & 0x01; + bit2 = (color_prom[machine().total_colors()] >> 2) & 0x01; + bit3 = (color_prom[machine().total_colors()] >> 3) & 0x01; g = 0x0e * bit0 + 0x1f * bit1 + 0x42 * bit2 + 0x90 * bit3; - bit0 = (color_prom[2*machine.total_colors()] >> 0) & 0x01; - bit1 = (color_prom[2*machine.total_colors()] >> 1) & 0x01; - bit2 = (color_prom[2*machine.total_colors()] >> 2) & 0x01; - bit3 = (color_prom[2*machine.total_colors()] >> 3) & 0x01; + bit0 = (color_prom[2*machine().total_colors()] >> 0) & 0x01; + bit1 = (color_prom[2*machine().total_colors()] >> 1) & 0x01; + bit2 = (color_prom[2*machine().total_colors()] >> 2) & 0x01; + bit3 = (color_prom[2*machine().total_colors()] >> 3) & 0x01; b = 0x0e * bit0 + 0x1f * bit1 + 0x42 * bit2 + 0x90 * bit3; - palette_set_color(machine,i,MAKE_RGB(r,g,b)); + palette_set_color(machine(),i,MAKE_RGB(r,g,b)); color_prom++; } |