diff options
Diffstat (limited to 'src/mame/video/eprom.c')
-rw-r--r-- | src/mame/video/eprom.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/src/mame/video/eprom.c b/src/mame/video/eprom.c index e14621a3b42..ce4eb69aa70 100644 --- a/src/mame/video/eprom.c +++ b/src/mame/video/eprom.c @@ -51,36 +51,33 @@ static void update_palette(running_machine &machine) * *************************************/ -static TILE_GET_INFO( get_alpha_tile_info ) +TILE_GET_INFO_MEMBER(eprom_state::get_alpha_tile_info) { - eprom_state *state = machine.driver_data<eprom_state>(); - UINT16 data = state->m_alpha[tile_index]; + UINT16 data = m_alpha[tile_index]; int code = data & 0x3ff; int color = ((data >> 10) & 0x0f) | ((data >> 9) & 0x20); int opaque = data & 0x8000; - SET_TILE_INFO(1, code, color, opaque ? TILE_FORCE_LAYER0 : 0); + SET_TILE_INFO_MEMBER(1, code, color, opaque ? TILE_FORCE_LAYER0 : 0); } -static TILE_GET_INFO( get_playfield_tile_info ) +TILE_GET_INFO_MEMBER(eprom_state::get_playfield_tile_info) { - eprom_state *state = machine.driver_data<eprom_state>(); - UINT16 data1 = state->m_playfield[tile_index]; - UINT16 data2 = state->m_playfield_upper[tile_index] >> 8; + UINT16 data1 = m_playfield[tile_index]; + UINT16 data2 = m_playfield_upper[tile_index] >> 8; int code = data1 & 0x7fff; int color = 0x10 + (data2 & 0x0f); - SET_TILE_INFO(0, code, color, (data1 >> 15) & 1); + SET_TILE_INFO_MEMBER(0, code, color, (data1 >> 15) & 1); } -static TILE_GET_INFO( guts_get_playfield_tile_info ) +TILE_GET_INFO_MEMBER(eprom_state::guts_get_playfield_tile_info) { - eprom_state *state = machine.driver_data<eprom_state>(); - UINT16 data1 = state->m_playfield[tile_index]; - UINT16 data2 = state->m_playfield_upper[tile_index] >> 8; + UINT16 data1 = m_playfield[tile_index]; + UINT16 data2 = m_playfield_upper[tile_index] >> 8; int code = data1 & 0x7fff; int color = 0x10 + (data2 & 0x0f); - SET_TILE_INFO(2, code, color, (data1 >> 15) & 1); + SET_TILE_INFO_MEMBER(2, code, color, (data1 >> 15) & 1); } @@ -132,13 +129,13 @@ VIDEO_START( eprom ) eprom_state *state = machine.driver_data<eprom_state>(); /* initialize the playfield */ - state->m_playfield_tilemap = tilemap_create(machine, get_playfield_tile_info, TILEMAP_SCAN_COLS, 8,8, 64,64); + state->m_playfield_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(eprom_state::get_playfield_tile_info),state), TILEMAP_SCAN_COLS, 8,8, 64,64); /* initialize the motion objects */ atarimo_init(machine, 0, &modesc); /* initialize the alphanumerics */ - state->m_alpha_tilemap = tilemap_create(machine, get_alpha_tile_info, TILEMAP_SCAN_ROWS, 8,8, 64,32); + state->m_alpha_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(eprom_state::get_alpha_tile_info),state), TILEMAP_SCAN_ROWS, 8,8, 64,32); state->m_alpha_tilemap->set_transparent_pen(0); /* save states */ @@ -188,13 +185,13 @@ VIDEO_START( guts ) eprom_state *state = machine.driver_data<eprom_state>(); /* initialize the playfield */ - state->m_playfield_tilemap = tilemap_create(machine, guts_get_playfield_tile_info, TILEMAP_SCAN_COLS, 8,8, 64,64); + state->m_playfield_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(eprom_state::guts_get_playfield_tile_info),state), TILEMAP_SCAN_COLS, 8,8, 64,64); /* initialize the motion objects */ atarimo_init(machine, 0, &modesc); /* initialize the alphanumerics */ - state->m_alpha_tilemap = tilemap_create(machine, get_alpha_tile_info, TILEMAP_SCAN_ROWS, 8,8, 64,32); + state->m_alpha_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(eprom_state::get_alpha_tile_info),state), TILEMAP_SCAN_ROWS, 8,8, 64,32); state->m_alpha_tilemap->set_transparent_pen(0); /* save states */ |