summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/pastelg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/pastelg.c')
-rw-r--r--src/mame/video/pastelg.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/mame/video/pastelg.c b/src/mame/video/pastelg.c
index 914bf9090ca..45082caea6b 100644
--- a/src/mame/video/pastelg.c
+++ b/src/mame/video/pastelg.c
@@ -19,13 +19,13 @@ static void pastelg_gfxdraw(running_machine &machine);
******************************************************************************/
-PALETTE_INIT( pastelg )
+void pastelg_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;
int bit0, bit1, bit2, bit3, r, g, b;
- for (i = 0; i < machine.total_colors(); i++)
+ for (i = 0; i < machine().total_colors(); i++)
{
bit0 = (color_prom[0] >> 0) & 0x01;
bit1 = (color_prom[0] >> 1) & 0x01;
@@ -37,13 +37,13 @@ PALETTE_INIT( pastelg )
bit2 = (color_prom[0] >> 6) & 0x01;
bit3 = (color_prom[0] >> 7) & 0x01;
g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * 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;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine,i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,MAKE_RGB(r,g,b));
color_prom++;
}
}
@@ -283,14 +283,13 @@ static void pastelg_gfxdraw(running_machine &machine)
******************************************************************************/
-VIDEO_START( pastelg )
+void pastelg_state::video_start()
{
- pastelg_state *state = machine.driver_data<pastelg_state>();
- int width = machine.primary_screen->width();
- int height = machine.primary_screen->height();
+ int width = machine().primary_screen->width();
+ int height = machine().primary_screen->height();
- state->m_videoram = auto_alloc_array_clear(machine, UINT8, width * height);
- state->m_clut = auto_alloc_array(machine, UINT8, 0x10);
+ m_videoram = auto_alloc_array_clear(machine(), UINT8, width * height);
+ m_clut = auto_alloc_array(machine(), UINT8, 0x10);
}
/******************************************************************************