diff options
Diffstat (limited to 'src/mame/video/renegade.c')
-rw-r--r-- | src/mame/video/renegade.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/mame/video/renegade.c b/src/mame/video/renegade.c index 95b075228a1..4b0fac4ef87 100644 --- a/src/mame/video/renegade.c +++ b/src/mame/video/renegade.c @@ -38,25 +38,23 @@ WRITE8_MEMBER(renegade_state::renegade_scroll1_w) m_scrollx = (m_scrollx & 0xff) | (data << 8); } -static TILE_GET_INFO( get_bg_tilemap_info ) +TILE_GET_INFO_MEMBER(renegade_state::get_bg_tilemap_info) { - renegade_state *state = machine.driver_data<renegade_state>(); - UINT8 *videoram = state->m_videoram; + UINT8 *videoram = m_videoram; const UINT8 *source = &videoram[tile_index]; UINT8 attributes = source[0x400]; /* CCC??BBB */ - SET_TILE_INFO( + SET_TILE_INFO_MEMBER( 1 + (attributes & 0x7), source[0], attributes >> 5, 0); } -static TILE_GET_INFO( get_fg_tilemap_info ) +TILE_GET_INFO_MEMBER(renegade_state::get_fg_tilemap_info) { - renegade_state *state = machine.driver_data<renegade_state>(); - const UINT8 *source = &state->m_videoram2[tile_index]; + const UINT8 *source = &m_videoram2[tile_index]; UINT8 attributes = source[0x400]; - SET_TILE_INFO( + SET_TILE_INFO_MEMBER( 0, (attributes & 3) * 256 + source[0], attributes >> 6, @@ -66,8 +64,8 @@ static TILE_GET_INFO( get_fg_tilemap_info ) VIDEO_START( renegade ) { renegade_state *state = machine.driver_data<renegade_state>(); - state->m_bg_tilemap = tilemap_create(machine, get_bg_tilemap_info, TILEMAP_SCAN_ROWS, 16, 16, 64, 16); - state->m_fg_tilemap = tilemap_create(machine, get_fg_tilemap_info, TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(renegade_state::get_bg_tilemap_info),state), TILEMAP_SCAN_ROWS, 16, 16, 64, 16); + state->m_fg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(renegade_state::get_fg_tilemap_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); state->m_fg_tilemap->set_transparent_pen(0); state->m_bg_tilemap->set_scrolldx(256, 0); |