summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/kncljoe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/kncljoe.c')
-rw-r--r--src/mame/video/kncljoe.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mame/video/kncljoe.c b/src/mame/video/kncljoe.c
index 851785113c3..d80e5ac269a 100644
--- a/src/mame/video/kncljoe.c
+++ b/src/mame/video/kncljoe.c
@@ -176,18 +176,17 @@ WRITE8_MEMBER(kncljoe_state::kncljoe_scroll_w)
***************************************************************************/
-static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
+void kncljoe_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
{
- kncljoe_state *state = machine.driver_data<kncljoe_state>();
- UINT8 *spriteram = state->m_spriteram;
+ UINT8 *spriteram = m_spriteram;
rectangle clip = cliprect;
- gfx_element *gfx = machine.gfx[1 + state->m_sprite_bank];
+ gfx_element *gfx = machine().gfx[1 + m_sprite_bank];
int i, j;
static const int pribase[4]={0x0180, 0x0080, 0x0100, 0x0000};
- const rectangle &visarea = machine.primary_screen->visible_area();
+ const rectangle &visarea = machine().primary_screen->visible_area();
/* score covers sprites */
- if (state->m_flipscreen)
+ if (m_flipscreen)
{
if (clip.max_y > visarea.max_y - 64)
clip.max_y = visarea.max_y - 64;
@@ -215,7 +214,7 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const
if (attr & 0x20)
code += 256;
- if (state->m_flipscreen)
+ if (m_flipscreen)
{
flipx = !flipx;
flipy = !flipy;
@@ -237,6 +236,6 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const
UINT32 kncljoe_state::screen_update_kncljoe(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_bg_tilemap->draw(bitmap, cliprect, 0, 0);
- draw_sprites(machine(), bitmap, cliprect);
+ draw_sprites(bitmap, cliprect);
return 0;
}