diff options
Diffstat (limited to 'src/mame/video/vastar.c')
-rw-r--r-- | src/mame/video/vastar.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/mame/video/vastar.c b/src/mame/video/vastar.c index aa6d4521fb3..82f5a18c9f1 100644 --- a/src/mame/video/vastar.c +++ b/src/mame/video/vastar.c @@ -16,45 +16,42 @@ ***************************************************************************/ -static TILE_GET_INFO( get_fg_tile_info ) +TILE_GET_INFO_MEMBER(vastar_state::get_fg_tile_info) { - vastar_state *state = machine.driver_data<vastar_state>(); - UINT8 *videoram = state->m_fgvideoram; + UINT8 *videoram = m_fgvideoram; int code, color; code = videoram[tile_index + 0x800] | (videoram[tile_index + 0x400] << 8); color = videoram[tile_index]; - SET_TILE_INFO( + SET_TILE_INFO_MEMBER( 0, code, color & 0x3f, 0); } -static TILE_GET_INFO( get_bg1_tile_info ) +TILE_GET_INFO_MEMBER(vastar_state::get_bg1_tile_info) { - vastar_state *state = machine.driver_data<vastar_state>(); - UINT8 *videoram = state->m_bg1videoram; + UINT8 *videoram = m_bg1videoram; int code, color; code = videoram[tile_index + 0x800] | (videoram[tile_index] << 8); color = videoram[tile_index + 0xc00]; - SET_TILE_INFO( + SET_TILE_INFO_MEMBER( 4, code, color & 0x3f, 0); } -static TILE_GET_INFO( get_bg2_tile_info ) +TILE_GET_INFO_MEMBER(vastar_state::get_bg2_tile_info) { - vastar_state *state = machine.driver_data<vastar_state>(); - UINT8 *videoram = state->m_bg2videoram; + UINT8 *videoram = m_bg2videoram; int code, color; code = videoram[tile_index + 0x800] | (videoram[tile_index] << 8); color = videoram[tile_index + 0xc00]; - SET_TILE_INFO( + SET_TILE_INFO_MEMBER( 3, code, color & 0x3f, @@ -72,9 +69,9 @@ VIDEO_START( vastar ) { vastar_state *state = machine.driver_data<vastar_state>(); - state->m_fg_tilemap = tilemap_create(machine, get_fg_tile_info, TILEMAP_SCAN_ROWS,8,8,32,32); - state->m_bg1_tilemap = tilemap_create(machine, get_bg1_tile_info,TILEMAP_SCAN_ROWS,8,8,32,32); - state->m_bg2_tilemap = tilemap_create(machine, get_bg2_tile_info,TILEMAP_SCAN_ROWS,8,8,32,32); + state->m_fg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(vastar_state::get_fg_tile_info),state), TILEMAP_SCAN_ROWS,8,8,32,32); + state->m_bg1_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(vastar_state::get_bg1_tile_info),state),TILEMAP_SCAN_ROWS,8,8,32,32); + state->m_bg2_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(vastar_state::get_bg2_tile_info),state),TILEMAP_SCAN_ROWS,8,8,32,32); state->m_fg_tilemap->set_transparent_pen(0); state->m_bg1_tilemap->set_transparent_pen(0); |