summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/fastfred.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/fastfred.c')
-rw-r--r--src/mame/video/fastfred.c37
1 files changed, 17 insertions, 20 deletions
diff --git a/src/mame/video/fastfred.c b/src/mame/video/fastfred.c
index 79e5dd24338..b48da054aae 100644
--- a/src/mame/video/fastfred.c
+++ b/src/mame/video/fastfred.c
@@ -80,15 +80,14 @@ PALETTE_INIT( fastfred )
***************************************************************************/
-static TILE_GET_INFO( get_tile_info )
+TILE_GET_INFO_MEMBER(fastfred_state::get_tile_info)
{
- fastfred_state *state = machine.driver_data<fastfred_state>();
UINT8 x = tile_index & 0x1f;
- UINT16 code = state->m_charbank | state->m_videoram[tile_index];
- UINT8 color = state->m_colorbank | (state->m_attributesram[2 * x + 1] & 0x07);
+ UINT16 code = m_charbank | m_videoram[tile_index];
+ UINT8 color = m_colorbank | (m_attributesram[2 * x + 1] & 0x07);
- SET_TILE_INFO(0, code, color, 0);
+ SET_TILE_INFO_MEMBER(0, code, color, 0);
}
@@ -102,7 +101,7 @@ static TILE_GET_INFO( get_tile_info )
VIDEO_START( fastfred )
{
fastfred_state *state = machine.driver_data<fastfred_state>();
- state->m_bg_tilemap = tilemap_create(machine, get_tile_info,TILEMAP_SCAN_ROWS,8,8,32,32);
+ state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(fastfred_state::get_tile_info),state),TILEMAP_SCAN_ROWS,8,8,32,32);
state->m_bg_tilemap->set_transparent_pen(0);
state->m_bg_tilemap->set_scroll_cols(32);
@@ -308,27 +307,25 @@ SCREEN_UPDATE_IND16( fastfred )
}
-static TILE_GET_INFO( imago_get_tile_info_bg )
+TILE_GET_INFO_MEMBER(fastfred_state::imago_get_tile_info_bg)
{
- fastfred_state *state = machine.driver_data<fastfred_state>();
UINT8 x = tile_index & 0x1f;
- UINT16 code = state->m_charbank * 0x100 + state->m_videoram[tile_index];
- UINT8 color = state->m_colorbank | (state->m_attributesram[2 * x + 1] & 0x07);
+ UINT16 code = m_charbank * 0x100 + m_videoram[tile_index];
+ UINT8 color = m_colorbank | (m_attributesram[2 * x + 1] & 0x07);
- SET_TILE_INFO(0, code, color, 0);
+ SET_TILE_INFO_MEMBER(0, code, color, 0);
}
-static TILE_GET_INFO( imago_get_tile_info_fg )
+TILE_GET_INFO_MEMBER(fastfred_state::imago_get_tile_info_fg)
{
- fastfred_state *state = machine.driver_data<fastfred_state>();
- int code = state->m_imago_fg_videoram[tile_index];
- SET_TILE_INFO(2, code, 2, 0);
+ int code = m_imago_fg_videoram[tile_index];
+ SET_TILE_INFO_MEMBER(2, code, 2, 0);
}
-static TILE_GET_INFO( imago_get_tile_info_web )
+TILE_GET_INFO_MEMBER(fastfred_state::imago_get_tile_info_web)
{
- SET_TILE_INFO(3, tile_index & 0x1ff, 0, 0);
+ SET_TILE_INFO_MEMBER(3, tile_index & 0x1ff, 0, 0);
}
WRITE8_HANDLER( imago_fg_videoram_w )
@@ -351,9 +348,9 @@ WRITE8_HANDLER( imago_charbank_w )
VIDEO_START( imago )
{
fastfred_state *state = machine.driver_data<fastfred_state>();
- state->m_web_tilemap = tilemap_create(machine, imago_get_tile_info_web,TILEMAP_SCAN_ROWS, 8,8,32,32);
- state->m_bg_tilemap = tilemap_create(machine, imago_get_tile_info_bg, TILEMAP_SCAN_ROWS,8,8,32,32);
- state->m_fg_tilemap = tilemap_create(machine, imago_get_tile_info_fg, TILEMAP_SCAN_ROWS,8,8,32,32);
+ state->m_web_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(fastfred_state::imago_get_tile_info_web),state),TILEMAP_SCAN_ROWS, 8,8,32,32);
+ state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(fastfred_state::imago_get_tile_info_bg),state), TILEMAP_SCAN_ROWS,8,8,32,32);
+ state->m_fg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(fastfred_state::imago_get_tile_info_fg),state), TILEMAP_SCAN_ROWS,8,8,32,32);
state->m_bg_tilemap->set_transparent_pen(0);
state->m_fg_tilemap->set_transparent_pen(0);