summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/gberet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/gberet.c')
-rw-r--r--src/mame/video/gberet.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/src/mame/video/gberet.c b/src/mame/video/gberet.c
index d593b155e3e..b517529c43f 100644
--- a/src/mame/video/gberet.c
+++ b/src/mame/video/gberet.c
@@ -125,16 +125,15 @@ VIDEO_START_MEMBER(gberet_state,gberet)
m_bg_tilemap->set_scroll_rows(32);
}
-static void gberet_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
+void gberet_state::gberet_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
{
- gberet_state *state = machine.driver_data<gberet_state>();
int offs;
UINT8 *sr;
- if (state->m_spritebank & 0x08)
- sr = state->m_spriteram2;
+ if (m_spritebank & 0x08)
+ sr = m_spriteram2;
else
- sr = state->m_spriteram;
+ sr = m_spriteram;
for (offs = 0; offs < 0xc0; offs += 4)
{
@@ -148,7 +147,7 @@ static void gberet_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap,
int flipx = attr & 0x10;
int flipy = attr & 0x20;
- if (state->flip_screen())
+ if (flip_screen())
{
sx = 240 - sx;
sy = 240 - sy;
@@ -156,8 +155,8 @@ static void gberet_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap,
flipy = !flipy;
}
- drawgfx_transmask(bitmap, cliprect, machine.gfx[1], code, color, flipx, flipy, sx, sy,
- colortable_get_transpen_mask(machine.colortable, machine.gfx[1], color, 0));
+ drawgfx_transmask(bitmap, cliprect, machine().gfx[1], code, color, flipx, flipy, sx, sy,
+ colortable_get_transpen_mask(machine().colortable, machine().gfx[1], color, 0));
}
}
}
@@ -165,7 +164,7 @@ static void gberet_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap,
UINT32 gberet_state::screen_update_gberet(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES, 0);
- gberet_draw_sprites(machine(), bitmap, cliprect);
+ gberet_draw_sprites(bitmap, cliprect);
m_bg_tilemap->draw(bitmap, cliprect, 0, 0);
return 0;
}
@@ -183,13 +182,12 @@ WRITE8_MEMBER(gberet_state::gberetb_scroll_w)
m_bg_tilemap->set_scrollx(offset, scroll + 64 - 8);
}
-static void gberetb_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
+void gberet_state::gberetb_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
{
- gberet_state *state = machine.driver_data<gberet_state>();
- UINT8 *spriteram = state->m_spriteram;
+ UINT8 *spriteram = m_spriteram;
int offs;
- for (offs = state->m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
+ for (offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
{
if (spriteram[offs + 1])
{
@@ -201,7 +199,7 @@ static void gberetb_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap
int flipx = attr & 0x10;
int flipy = attr & 0x20;
- if (state->flip_screen())
+ if (flip_screen())
{
sx = 240 - sx;
sy = 240 - sy;
@@ -209,8 +207,8 @@ static void gberetb_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap
flipy = !flipy;
}
- drawgfx_transmask(bitmap, cliprect, machine.gfx[1], code, color, flipx, flipy, sx, sy,
- colortable_get_transpen_mask(machine.colortable, machine.gfx[1], color, 0));
+ drawgfx_transmask(bitmap, cliprect, machine().gfx[1], code, color, flipx, flipy, sx, sy,
+ colortable_get_transpen_mask(machine().colortable, machine().gfx[1], color, 0));
}
}
}
@@ -218,7 +216,7 @@ static void gberetb_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap
UINT32 gberet_state::screen_update_gberetb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES, 0);
- gberetb_draw_sprites(machine(), bitmap, cliprect);
+ gberetb_draw_sprites(bitmap, cliprect);
m_bg_tilemap->draw(bitmap, cliprect, 0, 0);
return 0;
}