summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/thunderj.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/thunderj.c')
-rw-r--r--src/mame/video/thunderj.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/mame/video/thunderj.c b/src/mame/video/thunderj.c
index 6244d736a3b..6557e532f6b 100644
--- a/src/mame/video/thunderj.c
+++ b/src/mame/video/thunderj.c
@@ -17,37 +17,34 @@
*
*************************************/
-static TILE_GET_INFO( get_alpha_tile_info )
+TILE_GET_INFO_MEMBER(thunderj_state::get_alpha_tile_info)
{
- thunderj_state *state = machine.driver_data<thunderj_state>();
- UINT16 data = state->m_alpha[tile_index];
- int code = ((data & 0x200) ? (state->m_alpha_tile_bank * 0x200) : 0) + (data & 0x1ff);
+ UINT16 data = m_alpha[tile_index];
+ int code = ((data & 0x200) ? (m_alpha_tile_bank * 0x200) : 0) + (data & 0x1ff);
int color = ((data >> 10) & 0x0f) | ((data >> 9) & 0x20);
int opaque = data & 0x8000;
- SET_TILE_INFO(2, code, color, opaque ? TILE_FORCE_LAYER0 : 0);
+ SET_TILE_INFO_MEMBER(2, code, color, opaque ? TILE_FORCE_LAYER0 : 0);
}
-static TILE_GET_INFO( get_playfield_tile_info )
+TILE_GET_INFO_MEMBER(thunderj_state::get_playfield_tile_info)
{
- thunderj_state *state = machine.driver_data<thunderj_state>();
- UINT16 data1 = state->m_playfield[tile_index];
- UINT16 data2 = state->m_playfield_upper[tile_index] & 0xff;
+ UINT16 data1 = m_playfield[tile_index];
+ UINT16 data2 = m_playfield_upper[tile_index] & 0xff;
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);
tileinfo.category = (data2 >> 4) & 3;
}
-static TILE_GET_INFO( get_playfield2_tile_info )
+TILE_GET_INFO_MEMBER(thunderj_state::get_playfield2_tile_info)
{
- thunderj_state *state = machine.driver_data<thunderj_state>();
- UINT16 data1 = state->m_playfield2[tile_index];
- UINT16 data2 = state->m_playfield_upper[tile_index] >> 8;
+ UINT16 data1 = m_playfield2[tile_index];
+ UINT16 data2 = m_playfield_upper[tile_index] >> 8;
int code = data1 & 0x7fff;
int color = data2 & 0x0f;
- SET_TILE_INFO(0, code, color, (data1 >> 15) & 1);
+ SET_TILE_INFO_MEMBER(0, code, color, (data1 >> 15) & 1);
tileinfo.category = (data2 >> 4) & 3;
}
@@ -100,17 +97,17 @@ VIDEO_START( thunderj )
thunderj_state *state = machine.driver_data<thunderj_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(thunderj_state::get_playfield_tile_info),state), TILEMAP_SCAN_COLS, 8,8, 64,64);
/* initialize the second playfield */
- state->m_playfield2_tilemap = tilemap_create(machine, get_playfield2_tile_info, TILEMAP_SCAN_COLS, 8,8, 64,64);
+ state->m_playfield2_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(thunderj_state::get_playfield2_tile_info),state), TILEMAP_SCAN_COLS, 8,8, 64,64);
state->m_playfield2_tilemap->set_transparent_pen(0);
/* 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(thunderj_state::get_alpha_tile_info),state), TILEMAP_SCAN_ROWS, 8,8, 64,32);
state->m_alpha_tilemap->set_transparent_pen(0);
}