diff options
Diffstat (limited to 'src/mame/video/polepos.c')
-rw-r--r-- | src/mame/video/polepos.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/src/mame/video/polepos.c b/src/mame/video/polepos.c index 28be78ff160..43323bbd409 100644 --- a/src/mame/video/polepos.c +++ b/src/mame/video/polepos.c @@ -25,14 +25,13 @@ ***************************************************************************/ -PALETTE_INIT( polepos ) +PALETTE_INIT_MEMBER(polepos_state,polepos) { - const UINT8 *color_prom = machine.root_device().memregion("proms")->base(); - polepos_state *state = machine.driver_data<polepos_state>(); + const UINT8 *color_prom = machine().root_device().memregion("proms")->base(); int i, j; /* allocate the colortable */ - machine.colortable = colortable_alloc(machine, 128); + machine().colortable = colortable_alloc(machine(), 128); /******************************************************* * Color PROMs @@ -78,7 +77,7 @@ PALETTE_INIT( polepos ) bit3 = (color_prom[0x200 + i] >> 3) & 1; b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; - colortable_palette_set_color(machine.colortable,i,MAKE_RGB(r,g,b)); + colortable_palette_set_color(machine().colortable,i,MAKE_RGB(r,g,b)); } /******************************************************* @@ -89,8 +88,8 @@ PALETTE_INIT( polepos ) for (i = 0; i < 64*4; i++) { int color = color_prom[0x300 + i]; - colortable_entry_set_value(machine.colortable, 0x0000 + i, (color != 15) ? (0x020 + color) : 0x2f); - colortable_entry_set_value(machine.colortable, 0x0100 + i, (color != 15) ? (0x060 + color) : 0x2f); + colortable_entry_set_value(machine().colortable, 0x0000 + i, (color != 15) ? (0x020 + color) : 0x2f); + colortable_entry_set_value(machine().colortable, 0x0100 + i, (color != 15) ? (0x060 + color) : 0x2f); } /******************************************************* @@ -102,7 +101,7 @@ PALETTE_INIT( polepos ) for (i = 0; i < 64*4; i++) { int color = color_prom[0x400 + i]; - colortable_entry_set_value(machine.colortable, 0x0200 + i, 0x000 + color); + colortable_entry_set_value(machine().colortable, 0x0200 + i, 0x000 + color); } /******************************************************* @@ -113,8 +112,8 @@ PALETTE_INIT( polepos ) for (i = 0; i < 64*16; i++) { int color = color_prom[0xc00 + i]; - colortable_entry_set_value(machine.colortable, 0x0300 + i, (color != 15) ? (0x010 + color) : 0x1f); - colortable_entry_set_value(machine.colortable, 0x0700 + i, (color != 15) ? (0x050 + color) : 0x1f); + colortable_entry_set_value(machine().colortable, 0x0300 + i, (color != 15) ? (0x010 + color) : 0x1f); + colortable_entry_set_value(machine().colortable, 0x0700 + i, (color != 15) ? (0x050 + color) : 0x1f); } /******************************************************* @@ -126,14 +125,14 @@ PALETTE_INIT( polepos ) for (i = 0; i < 64*16; i++) { int color = color_prom[0x800 + i]; - colortable_entry_set_value(machine.colortable, 0x0b00 + i, 0x040 + color); + colortable_entry_set_value(machine().colortable, 0x0b00 + i, 0x040 + color); } /* 136014-142, 136014-143, 136014-144 Vertical position modifiers */ for (i = 0; i < 256; i++) { j = color_prom[0x500 + i] + (color_prom[0x600 + i] << 4) + (color_prom[0x700 + i] << 8); - state->m_vertical_position_modifier[i] = j; + m_vertical_position_modifier[i] = j; } } @@ -191,13 +190,12 @@ TILE_GET_INFO_MEMBER(polepos_state::tx_get_tile_info) ***************************************************************************/ -VIDEO_START( polepos ) +VIDEO_START_MEMBER(polepos_state,polepos) { - polepos_state *state = machine.driver_data<polepos_state>(); - state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(polepos_state::bg_get_tile_info),state),TILEMAP_SCAN_COLS,8,8,64,16); - state->m_tx_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(polepos_state::tx_get_tile_info),state),TILEMAP_SCAN_ROWS,8,8,32,32); + m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(polepos_state::bg_get_tile_info),this),TILEMAP_SCAN_COLS,8,8,64,16); + m_tx_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(polepos_state::tx_get_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32); - colortable_configure_tilemap_groups(machine.colortable, state->m_tx_tilemap, machine.gfx[0], 0x2f); + colortable_configure_tilemap_groups(machine().colortable, m_tx_tilemap, machine().gfx[0], 0x2f); } |