diff options
Diffstat (limited to 'src/mame/video/toki.c')
-rw-r--r-- | src/mame/video/toki.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/mame/video/toki.c b/src/mame/video/toki.c index fe201519a1f..fdf6edee0bd 100644 --- a/src/mame/video/toki.c +++ b/src/mame/video/toki.c @@ -32,46 +32,43 @@ WRITE16_MEMBER(toki_state::toki_control_w) COMBINE_DATA(&m_scrollram16[offset]); } -static TILE_GET_INFO( get_text_tile_info ) +TILE_GET_INFO_MEMBER(toki_state::get_text_tile_info) { - toki_state *state = machine.driver_data<toki_state>(); - UINT16 *videoram = state->m_videoram; + UINT16 *videoram = m_videoram; int tile = videoram[tile_index]; int color = (tile >> 12) & 0xf; tile &= 0xfff; - SET_TILE_INFO( + SET_TILE_INFO_MEMBER( 0, tile, color, 0); } -static TILE_GET_INFO( get_back_tile_info ) +TILE_GET_INFO_MEMBER(toki_state::get_back_tile_info) { - toki_state *state = machine.driver_data<toki_state>(); - int tile = state->m_background1_videoram16[tile_index]; + int tile = m_background1_videoram16[tile_index]; int color = (tile >> 12) & 0xf; tile &= 0xfff; - SET_TILE_INFO( + SET_TILE_INFO_MEMBER( 2, tile, color, 0); } -static TILE_GET_INFO( get_fore_tile_info ) +TILE_GET_INFO_MEMBER(toki_state::get_fore_tile_info) { - toki_state *state = machine.driver_data<toki_state>(); - int tile = state->m_background2_videoram16[tile_index]; + int tile = m_background2_videoram16[tile_index]; int color = (tile >> 12) & 0xf; tile &= 0xfff; - SET_TILE_INFO( + SET_TILE_INFO_MEMBER( 3, tile, color, @@ -88,9 +85,9 @@ static TILE_GET_INFO( get_fore_tile_info ) VIDEO_START( toki ) { toki_state *state = machine.driver_data<toki_state>(); - state->m_text_layer = tilemap_create(machine, get_text_tile_info,TILEMAP_SCAN_ROWS, 8,8,32,32); - state->m_background_layer = tilemap_create(machine, get_back_tile_info,TILEMAP_SCAN_ROWS,16,16,32,32); - state->m_foreground_layer = tilemap_create(machine, get_fore_tile_info,TILEMAP_SCAN_ROWS,16,16,32,32); + state->m_text_layer = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(toki_state::get_text_tile_info),state),TILEMAP_SCAN_ROWS, 8,8,32,32); + state->m_background_layer = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(toki_state::get_back_tile_info),state),TILEMAP_SCAN_ROWS,16,16,32,32); + state->m_foreground_layer = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(toki_state::get_fore_tile_info),state),TILEMAP_SCAN_ROWS,16,16,32,32); state->m_text_layer->set_transparent_pen(15); state->m_background_layer->set_transparent_pen(15); |