summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/bestleag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/bestleag.c')
-rw-r--r--src/mame/drivers/bestleag.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mame/drivers/bestleag.c b/src/mame/drivers/bestleag.c
index eba7bc87932..6a33aa8514a 100644
--- a/src/mame/drivers/bestleag.c
+++ b/src/mame/drivers/bestleag.c
@@ -53,6 +53,7 @@ public:
virtual void video_start();
UINT32 screen_update_bestleag(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_bestleaw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
};
@@ -118,10 +119,9 @@ Note: sprite chip is different than the other Big Striker sets and they
include several similiarities with other Playmark games (including
the sprite end code and the data being offset (i.e. spriteram starting from 0x16/2))
*/
-static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect)
+void bestleag_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- bestleag_state *state = machine.driver_data<bestleag_state>();
- UINT16 *spriteram16 = state->m_spriteram;
+ UINT16 *spriteram16 = m_spriteram;
/*
@@ -131,7 +131,7 @@ static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const r
int offs;
- for (offs = 0x16/2;offs < state->m_spriteram.bytes()/2;offs += 4)
+ for (offs = 0x16/2;offs < m_spriteram.bytes()/2;offs += 4)
{
int code = spriteram16[offs+3] & 0xfff;
int color = (spriteram16[offs+2] & 0xf000) >> 12;
@@ -144,29 +144,29 @@ static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const r
return;
/* it can change sprites color mask like the original set */
- if(state->m_vregs[0x00/2] & 0x1000)
+ if(m_vregs[0x00/2] & 0x1000)
color &= 7;
- drawgfx_transpen(bitmap,cliprect,machine.gfx[2],
+ drawgfx_transpen(bitmap,cliprect,machine().gfx[2],
code,
color,
flipx, 0,
flipx ? (sx+16) : (sx),sy,15);
- drawgfx_transpen(bitmap,cliprect,machine.gfx[2],
+ drawgfx_transpen(bitmap,cliprect,machine().gfx[2],
code+1,
color,
flipx, 0,
flipx ? (sx) : (sx+16),sy,15);
/* wraparound x */
- drawgfx_transpen(bitmap,cliprect,machine.gfx[2],
+ drawgfx_transpen(bitmap,cliprect,machine().gfx[2],
code,
color,
flipx, 0,
flipx ? (sx+16 - 512) : (sx - 512),sy,15);
- drawgfx_transpen(bitmap,cliprect,machine.gfx[2],
+ drawgfx_transpen(bitmap,cliprect,machine().gfx[2],
code+1,
color,
flipx, 0,
@@ -185,7 +185,7 @@ UINT32 bestleag_state::screen_update_bestleag(screen_device &screen, bitmap_ind1
m_bg_tilemap->draw(bitmap, cliprect, 0,0);
m_fg_tilemap->draw(bitmap, cliprect, 0,0);
- draw_sprites(machine(),bitmap,cliprect);
+ draw_sprites(bitmap,cliprect);
m_tx_tilemap->draw(bitmap, cliprect, 0,0);
return 0;
}
@@ -201,7 +201,7 @@ UINT32 bestleag_state::screen_update_bestleaw(screen_device &screen, bitmap_ind1
m_bg_tilemap->draw(bitmap, cliprect, 0,0);
m_fg_tilemap->draw(bitmap, cliprect, 0,0);
- draw_sprites(machine(),bitmap,cliprect);
+ draw_sprites(bitmap,cliprect);
m_tx_tilemap->draw(bitmap, cliprect, 0,0);
return 0;
}