summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/lvcards.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/lvcards.c')
-rw-r--r--src/mame/video/lvcards.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/mame/video/lvcards.c b/src/mame/video/lvcards.c
index 4c072dff31c..362d1ad2ccc 100644
--- a/src/mame/video/lvcards.c
+++ b/src/mame/video/lvcards.c
@@ -15,7 +15,7 @@ PALETTE_INIT_MEMBER(lvcards_state,ponttehk)
const UINT8 *color_prom = memregion("proms")->base();
int i;
- for ( i = 0; i < machine().total_colors(); i++ )
+ for ( i = 0; i < palette.entries(); i++ )
{
int bit0,bit1,bit2,bit3,r,g,b;
@@ -27,31 +27,31 @@ PALETTE_INIT_MEMBER(lvcards_state,ponttehk)
r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
/* green component */
- 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[palette.entries()] >> 0) & 0x01;
+ bit1 = (color_prom[palette.entries()] >> 1) & 0x01;
+ bit2 = (color_prom[palette.entries()] >> 2) & 0x01;
+ bit3 = (color_prom[palette.entries()] >> 3) & 0x01;
g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
/* blue component */
- 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*palette.entries()] >> 0) & 0x01;
+ bit1 = (color_prom[2*palette.entries()] >> 1) & 0x01;
+ bit2 = (color_prom[2*palette.entries()] >> 2) & 0x01;
+ bit3 = (color_prom[2*palette.entries()] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine(),i,rgb_t(r,g,b));
+ palette.set_pen_color(i,rgb_t(r,g,b));
color_prom++;
}
}
-void lvcards_state::palette_init()//Ever so slightly different, but different enough.
+PALETTE_INIT_MEMBER(lvcards_state, lvcards)//Ever so slightly different, but different enough.
{
const UINT8 *color_prom = memregion("proms")->base();
int i;
- for ( i = 0; i < machine().total_colors(); i++ )
+ for ( i = 0; i < palette.entries(); i++ )
{
int bit0,bit1,bit2,bit3,r,g,b;
@@ -63,20 +63,20 @@ void lvcards_state::palette_init()//Ever so slightly different, but different en
r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
/* green component */
- bit0 = (color_prom[machine().total_colors()] >> 0) & 0x11;
- bit1 = (color_prom[machine().total_colors()] >> 1) & 0x11;
- bit2 = (color_prom[machine().total_colors()] >> 2) & 0x11;
- bit3 = (color_prom[machine().total_colors()] >> 3) & 0x11;
+ bit0 = (color_prom[palette.entries()] >> 0) & 0x11;
+ bit1 = (color_prom[palette.entries()] >> 1) & 0x11;
+ bit2 = (color_prom[palette.entries()] >> 2) & 0x11;
+ bit3 = (color_prom[palette.entries()] >> 3) & 0x11;
g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
/* blue component */
- bit0 = (color_prom[2*machine().total_colors()] >> 0) & 0x11;
- bit1 = (color_prom[2*machine().total_colors()] >> 1) & 0x11;
- bit2 = (color_prom[2*machine().total_colors()] >> 2) & 0x11;
- bit3 = (color_prom[2*machine().total_colors()] >> 3) & 0x11;
+ bit0 = (color_prom[2*palette.entries()] >> 0) & 0x11;
+ bit1 = (color_prom[2*palette.entries()] >> 1) & 0x11;
+ bit2 = (color_prom[2*palette.entries()] >> 2) & 0x11;
+ bit3 = (color_prom[2*palette.entries()] >> 3) & 0x11;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine(),i,rgb_t(r,g,b));
+ palette.set_pen_color(i,rgb_t(r,g,b));
color_prom++;
}