summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/drmicro.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/drmicro.c')
-rw-r--r--src/mame/video/drmicro.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/mame/video/drmicro.c b/src/mame/video/drmicro.c
index adbe41b4f0f..9b9f832d965 100644
--- a/src/mame/video/drmicro.c
+++ b/src/mame/video/drmicro.c
@@ -26,34 +26,32 @@ WRITE8_MEMBER(drmicro_state::drmicro_videoram_w)
/****************************************************************************/
-static TILE_GET_INFO( get_bg1_tile_info )
+TILE_GET_INFO_MEMBER(drmicro_state::get_bg1_tile_info)
{
- drmicro_state *state = machine.driver_data<drmicro_state>();
int code, col, flags;
- code = state->m_videoram[tile_index + 0x0800];
- col = state->m_videoram[tile_index + 0x0c00];
+ code = m_videoram[tile_index + 0x0800];
+ col = m_videoram[tile_index + 0x0c00];
code += (col & 0xc0) << 2;
flags = ((col & 0x20) ? TILEMAP_FLIPY : 0) | ((col & 0x10) ? TILEMAP_FLIPX : 0);
col &= 0x0f;
- SET_TILE_INFO( 0, code, col, flags);
+ SET_TILE_INFO_MEMBER( 0, code, col, flags);
}
-static TILE_GET_INFO( get_bg2_tile_info )
+TILE_GET_INFO_MEMBER(drmicro_state::get_bg2_tile_info)
{
- drmicro_state *state = machine.driver_data<drmicro_state>();
int code, col, flags;
- code = state->m_videoram[tile_index + 0x0000];
- col = state->m_videoram[tile_index + 0x0400];
+ code = m_videoram[tile_index + 0x0000];
+ col = m_videoram[tile_index + 0x0400];
code += (col & 0xc0) << 2;
flags = ((col & 0x20) ? TILEMAP_FLIPY : 0) | ((col & 0x10) ? TILEMAP_FLIPX : 0);
col &= 0x0f;
- SET_TILE_INFO( 1, code, col, flags);
+ SET_TILE_INFO_MEMBER( 1, code, col, flags);
}
/****************************************************************************/
@@ -110,8 +108,8 @@ VIDEO_START( drmicro)
state->m_videoram = auto_alloc_array(machine, UINT8, 0x1000);
state->save_pointer(NAME(state->m_videoram), 0x1000);
- state->m_bg1 = tilemap_create(machine, get_bg1_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
- state->m_bg2 = tilemap_create(machine, get_bg2_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
+ state->m_bg1 = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(drmicro_state::get_bg1_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
+ state->m_bg2 = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(drmicro_state::get_bg2_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
state->m_bg2->set_transparent_pen(0);
}