diff options
Diffstat (limited to 'src/mame/video/labyrunr.c')
-rw-r--r-- | src/mame/video/labyrunr.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/src/mame/video/labyrunr.c b/src/mame/video/labyrunr.c index 0793e74f34b..5de33126696 100644 --- a/src/mame/video/labyrunr.c +++ b/src/mame/video/labyrunr.c @@ -64,15 +64,14 @@ static void set_pens( running_machine &machine ) ***************************************************************************/ -static TILE_GET_INFO( get_tile_info0 ) +TILE_GET_INFO_MEMBER(labyrunr_state::get_tile_info0) { - labyrunr_state *state = machine.driver_data<labyrunr_state>(); - UINT8 ctrl_3 = k007121_ctrlram_r(state->m_k007121, 3); - UINT8 ctrl_4 = k007121_ctrlram_r(state->m_k007121, 4); - UINT8 ctrl_5 = k007121_ctrlram_r(state->m_k007121, 5); - UINT8 ctrl_6 = k007121_ctrlram_r(state->m_k007121, 6); - int attr = state->m_videoram1[tile_index]; - int code = state->m_videoram1[tile_index + 0x400]; + UINT8 ctrl_3 = k007121_ctrlram_r(m_k007121, 3); + UINT8 ctrl_4 = k007121_ctrlram_r(m_k007121, 4); + UINT8 ctrl_5 = k007121_ctrlram_r(m_k007121, 5); + UINT8 ctrl_6 = k007121_ctrlram_r(m_k007121, 6); + int attr = m_videoram1[tile_index]; + int code = m_videoram1[tile_index + 0x400]; int bit0 = (ctrl_5 >> 0) & 0x03; int bit1 = (ctrl_5 >> 2) & 0x03; int bit2 = (ctrl_5 >> 4) & 0x03; @@ -87,22 +86,21 @@ static TILE_GET_INFO( get_tile_info0 ) bank = (bank & ~(mask << 1)) | ((ctrl_4 & mask) << 1); - SET_TILE_INFO( + SET_TILE_INFO_MEMBER( 0, code + bank * 256, ((ctrl_6 & 0x30) * 2 + 16)+(attr & 7), 0); } -static TILE_GET_INFO( get_tile_info1 ) +TILE_GET_INFO_MEMBER(labyrunr_state::get_tile_info1) { - labyrunr_state *state = machine.driver_data<labyrunr_state>(); - UINT8 ctrl_3 = k007121_ctrlram_r(state->m_k007121, 3); - UINT8 ctrl_4 = k007121_ctrlram_r(state->m_k007121, 4); - UINT8 ctrl_5 = k007121_ctrlram_r(state->m_k007121, 5); - UINT8 ctrl_6 = k007121_ctrlram_r(state->m_k007121, 6); - int attr = state->m_videoram2[tile_index]; - int code = state->m_videoram2[tile_index + 0x400]; + UINT8 ctrl_3 = k007121_ctrlram_r(m_k007121, 3); + UINT8 ctrl_4 = k007121_ctrlram_r(m_k007121, 4); + UINT8 ctrl_5 = k007121_ctrlram_r(m_k007121, 5); + UINT8 ctrl_6 = k007121_ctrlram_r(m_k007121, 6); + int attr = m_videoram2[tile_index]; + int code = m_videoram2[tile_index + 0x400]; int bit0 = (ctrl_5 >> 0) & 0x03; int bit1 = (ctrl_5 >> 2) & 0x03; int bit2 = (ctrl_5 >> 4) & 0x03; @@ -117,7 +115,7 @@ static TILE_GET_INFO( get_tile_info1 ) bank = (bank & ~(mask << 1)) | ((ctrl_4 & mask) << 1); - SET_TILE_INFO( + SET_TILE_INFO_MEMBER( 0, code+bank*256, ((ctrl_6 & 0x30) * 2 + 16) + (attr & 7), @@ -135,8 +133,8 @@ VIDEO_START( labyrunr ) { labyrunr_state *state = machine.driver_data<labyrunr_state>(); - state->m_layer0 = tilemap_create(machine, get_tile_info0, TILEMAP_SCAN_ROWS, 8, 8, 32, 32); - state->m_layer1 = tilemap_create(machine, get_tile_info1, TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + state->m_layer0 = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(labyrunr_state::get_tile_info0),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + state->m_layer1 = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(labyrunr_state::get_tile_info1),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); state->m_layer0->set_transparent_pen(0); state->m_layer1->set_transparent_pen(0); |