summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/mermaid.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/mermaid.c')
-rw-r--r--src/mame/video/mermaid.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/mame/video/mermaid.c b/src/mame/video/mermaid.c
index bdabe16d927..d800216ccbc 100644
--- a/src/mame/video/mermaid.c
+++ b/src/mame/video/mermaid.c
@@ -143,38 +143,36 @@ READ8_MEMBER(mermaid_state::mermaid_collision_r)
return collision;
}
-static TILE_GET_INFO( get_bg_tile_info )
+TILE_GET_INFO_MEMBER(mermaid_state::get_bg_tile_info)
{
- mermaid_state *state = machine.driver_data<mermaid_state>();
- int code = state->m_videoram2[tile_index];
+ int code = m_videoram2[tile_index];
int sx = tile_index % 32;
int color = (sx >= 26) ? 0 : 1;
- SET_TILE_INFO(2, code, color, 0);
+ SET_TILE_INFO_MEMBER(2, code, color, 0);
}
-static TILE_GET_INFO( get_fg_tile_info )
+TILE_GET_INFO_MEMBER(mermaid_state::get_fg_tile_info)
{
- mermaid_state *state = machine.driver_data<mermaid_state>();
- int attr = state->m_colorram[tile_index];
- int code = state->m_videoram[tile_index] + ((attr & 0x30) << 4);
+ int attr = m_colorram[tile_index];
+ int code = m_videoram[tile_index] + ((attr & 0x30) << 4);
int color = attr & 0x0f;
int flags = TILE_FLIPYX((attr & 0xc0) >> 6);
- code |= state->m_rougien_gfxbank1 * 0x2800;
- code |= state->m_rougien_gfxbank2 * 0x2400;
+ code |= m_rougien_gfxbank1 * 0x2800;
+ code |= m_rougien_gfxbank2 * 0x2400;
- SET_TILE_INFO(0, code, color, flags);
+ SET_TILE_INFO_MEMBER(0, code, color, flags);
}
VIDEO_START( mermaid )
{
mermaid_state *state = machine.driver_data<mermaid_state>();
- state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
+ state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(mermaid_state::get_bg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
state->m_bg_tilemap->set_scroll_cols(32);
- state->m_fg_tilemap = tilemap_create(machine, get_fg_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
+ state->m_fg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(mermaid_state::get_fg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
state->m_fg_tilemap->set_scroll_cols(32);
state->m_fg_tilemap->set_transparent_pen(0);