diff options
Diffstat (limited to 'src/mame/video/pgm.c')
-rw-r--r-- | src/mame/video/pgm.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/mame/video/pgm.c b/src/mame/video/pgm.c index e7ccb2a1a34..e4bc40c77a8 100644 --- a/src/mame/video/pgm.c +++ b/src/mame/video/pgm.c @@ -561,7 +561,7 @@ WRITE16_MEMBER(pgm_state::pgm_tx_videoram_w) m_tx_tilemap->mark_tile_dirty(offset / 2); } -static TILE_GET_INFO( get_pgm_tx_tilemap_tile_info ) +TILE_GET_INFO_MEMBER(pgm_state::get_pgm_tx_tilemap_tile_info) { /* 0x904000 - 0x90ffff is the Text Overlay Ram (pgm_tx_videoram) @@ -578,14 +578,13 @@ static TILE_GET_INFO( get_pgm_tx_tilemap_tile_info ) p = palette f = flip */ - pgm_state *state = machine.driver_data<pgm_state>(); int tileno, colour, flipyx; //,game; - tileno = state->m_tx_videoram[tile_index * 2] & 0xffff; - colour = (state->m_tx_videoram[tile_index * 2 + 1] & 0x3e) >> 1; - flipyx = (state->m_tx_videoram[tile_index * 2 + 1] & 0xc0) >> 6; + tileno = m_tx_videoram[tile_index * 2] & 0xffff; + colour = (m_tx_videoram[tile_index * 2 + 1] & 0x3e) >> 1; + flipyx = (m_tx_videoram[tile_index * 2 + 1] & 0xc0) >> 6; - SET_TILE_INFO(0,tileno,colour,TILE_FLIPYX(flipyx)); + SET_TILE_INFO_MEMBER(0,tileno,colour,TILE_FLIPYX(flipyx)); } /* BG Layer */ @@ -596,19 +595,18 @@ WRITE16_MEMBER(pgm_state::pgm_bg_videoram_w) m_bg_tilemap->mark_tile_dirty(offset / 2); } -static TILE_GET_INFO( get_pgm_bg_tilemap_tile_info ) +TILE_GET_INFO_MEMBER(pgm_state::get_pgm_bg_tilemap_tile_info) { /* pretty much the same as tx layer */ - pgm_state *state = machine.driver_data<pgm_state>(); int tileno, colour, flipyx; - tileno = state->m_bg_videoram[tile_index *2] & 0xffff; + tileno = m_bg_videoram[tile_index *2] & 0xffff; - colour = (state->m_bg_videoram[tile_index * 2 + 1] & 0x3e) >> 1; - flipyx = (state->m_bg_videoram[tile_index * 2 + 1] & 0xc0) >> 6; + colour = (m_bg_videoram[tile_index * 2 + 1] & 0x3e) >> 1; + flipyx = (m_bg_videoram[tile_index * 2 + 1] & 0xc0) >> 6; - SET_TILE_INFO(1,tileno,colour,TILE_FLIPYX(flipyx)); + SET_TILE_INFO_MEMBER(1,tileno,colour,TILE_FLIPYX(flipyx)); } @@ -625,10 +623,10 @@ VIDEO_START( pgm ) state->m_aoffset = 0; state->m_boffset = 0; - state->m_tx_tilemap = tilemap_create(machine, get_pgm_tx_tilemap_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); + state->m_tx_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(pgm_state::get_pgm_tx_tilemap_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); state->m_tx_tilemap->set_transparent_pen(15); - state->m_bg_tilemap = tilemap_create(machine, get_pgm_bg_tilemap_tile_info, TILEMAP_SCAN_ROWS, 32, 32, 64, 16); + state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(pgm_state::get_pgm_bg_tilemap_tile_info),state), TILEMAP_SCAN_ROWS, 32, 32, 64, 16); state->m_bg_tilemap->set_transparent_pen(31); state->m_bg_tilemap->set_scroll_rows(16 * 32); |