summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/magic10.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/magic10.c')
-rw-r--r--src/mame/drivers/magic10.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mame/drivers/magic10.c b/src/mame/drivers/magic10.c
index f011df571a5..6484fde69fa 100644
--- a/src/mame/drivers/magic10.c
+++ b/src/mame/drivers/magic10.c
@@ -121,6 +121,7 @@ public:
TILE_GET_INFO_MEMBER(get_layer1_tile_info);
TILE_GET_INFO_MEMBER(get_layer2_tile_info);
virtual void video_start();
+ UINT32 screen_update_magic10(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
};
@@ -197,23 +198,22 @@ void magic10_state::video_start()
m_layer2_tilemap->set_transparent_pen(0);
}
-static SCREEN_UPDATE_IND16( magic10 )
+UINT32 magic10_state::screen_update_magic10(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- magic10_state *state = screen.machine().driver_data<magic10_state>();
/*TODO: understand where this comes from. */
- state->m_layer2_tilemap->set_scrollx(0, state->m_layer2_offset[0]);
- state->m_layer2_tilemap->set_scrolly(0, state->m_layer2_offset[1]);
+ m_layer2_tilemap->set_scrollx(0, m_layer2_offset[0]);
+ m_layer2_tilemap->set_scrolly(0, m_layer2_offset[1]);
/*
4 and 6 are y/x global register writes.
0 and 2 are y/x writes for the scrolling layer.
*/
- state->m_layer1_tilemap->set_scrolly(0, (state->m_vregs[0/2] - state->m_vregs[4/2])+0);
- state->m_layer1_tilemap->set_scrollx(0, (state->m_vregs[2/2] - state->m_vregs[6/2])+4);
+ m_layer1_tilemap->set_scrolly(0, (m_vregs[0/2] - m_vregs[4/2])+0);
+ m_layer1_tilemap->set_scrollx(0, (m_vregs[2/2] - m_vregs[6/2])+4);
- state->m_layer0_tilemap->draw(bitmap, cliprect, 0, 0);
- state->m_layer1_tilemap->draw(bitmap, cliprect, 0, 0);
- state->m_layer2_tilemap->draw(bitmap, cliprect, 0, 0);
+ m_layer0_tilemap->draw(bitmap, cliprect, 0, 0);
+ m_layer1_tilemap->draw(bitmap, cliprect, 0, 0);
+ m_layer2_tilemap->draw(bitmap, cliprect, 0, 0);
return 0;
}
@@ -739,7 +739,7 @@ static MACHINE_CONFIG_START( magic10, magic10_state )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_SIZE(64*8, 64*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 44*8-1, 2*8, 32*8-1)
- MCFG_SCREEN_UPDATE_STATIC(magic10)
+ MCFG_SCREEN_UPDATE_DRIVER(magic10_state, screen_update_magic10)
MCFG_PALETTE_LENGTH(0x100)
MCFG_GFXDECODE(magic10)