summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/exzisus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/exzisus.c')
-rw-r--r--src/mame/video/exzisus.c47
1 files changed, 23 insertions, 24 deletions
diff --git a/src/mame/video/exzisus.c b/src/mame/video/exzisus.c
index 7404b85c2eb..9fa88507fe5 100644
--- a/src/mame/video/exzisus.c
+++ b/src/mame/video/exzisus.c
@@ -68,9 +68,8 @@ WRITE8_MEMBER(exzisus_state::exzisus_objectram_1_w)
Screen refresh
***************************************************************************/
-SCREEN_UPDATE_IND16( exzisus )
+UINT32 exzisus_state::screen_update_exzisus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- exzisus_state *state = screen.machine().driver_data<exzisus_state>();
int offs;
int sx, sy, xc, yc;
int gfx_num, gfx_attr, gfx_offs;
@@ -80,25 +79,25 @@ SCREEN_UPDATE_IND16( exzisus )
/* ---------- 1st TC0010VCU ---------- */
sx = 0;
- for (offs = 0 ; offs < state->m_objectram0.bytes() ; offs += 4)
+ for (offs = 0 ; offs < m_objectram0.bytes() ; offs += 4)
{
int height;
/* Skip empty sprites. */
- if ( !(*(UINT32 *)(&state->m_objectram0[offs])) )
+ if ( !(*(UINT32 *)(&m_objectram0[offs])) )
{
continue;
}
- gfx_num = state->m_objectram0[offs + 1];
- gfx_attr = state->m_objectram0[offs + 3];
+ gfx_num = m_objectram0[offs + 1];
+ gfx_attr = m_objectram0[offs + 3];
if ((gfx_num & 0x80) == 0) /* 16x16 sprites */
{
gfx_offs = ((gfx_num & 0x7f) << 3);
height = 2;
- sx = state->m_objectram0[offs + 2];
+ sx = m_objectram0[offs + 2];
sx |= (gfx_attr & 0x40) << 2;
}
else /* tilemaps (each sprite is a 16x256 column) */
@@ -112,12 +111,12 @@ SCREEN_UPDATE_IND16( exzisus )
}
else
{
- sx = state->m_objectram0[offs + 2];
+ sx = m_objectram0[offs + 2];
sx |= (gfx_attr & 0x40) << 2;
}
}
- sy = 256 - (height << 3) - (state->m_objectram0[offs]);
+ sy = 256 - (height << 3) - (m_objectram0[offs]);
for (xc = 0 ; xc < 2 ; xc++)
{
@@ -126,12 +125,12 @@ SCREEN_UPDATE_IND16( exzisus )
{
int code, color, x, y;
- code = (state->m_videoram0[goffs + 1] << 8) | state->m_videoram0[goffs];
- color = (state->m_videoram0[goffs + 1] >> 6) | (gfx_attr & 0x0f);
+ code = (m_videoram0[goffs + 1] << 8) | m_videoram0[goffs];
+ color = (m_videoram0[goffs + 1] >> 6) | (gfx_attr & 0x0f);
x = (sx + (xc << 3)) & 0xff;
y = (sy + (yc << 3)) & 0xff;
- if (state->flip_screen())
+ if (flip_screen())
{
x = 248 - x;
y = 248 - y;
@@ -140,7 +139,7 @@ SCREEN_UPDATE_IND16( exzisus )
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[0],
code & 0x3fff,
color,
- state->flip_screen(), state->flip_screen(),
+ flip_screen(), flip_screen(),
x, y, 15);
goffs += 2;
}
@@ -150,25 +149,25 @@ SCREEN_UPDATE_IND16( exzisus )
/* ---------- 2nd TC0010VCU ---------- */
sx = 0;
- for (offs = 0 ; offs < state->m_objectram1.bytes() ; offs += 4)
+ for (offs = 0 ; offs < m_objectram1.bytes() ; offs += 4)
{
int height;
/* Skip empty sprites. */
- if ( !(*(UINT32 *)(&state->m_objectram1[offs])) )
+ if ( !(*(UINT32 *)(&m_objectram1[offs])) )
{
continue;
}
- gfx_num = state->m_objectram1[offs + 1];
- gfx_attr = state->m_objectram1[offs + 3];
+ gfx_num = m_objectram1[offs + 1];
+ gfx_attr = m_objectram1[offs + 3];
if ((gfx_num & 0x80) == 0) /* 16x16 sprites */
{
gfx_offs = ((gfx_num & 0x7f) << 3);
height = 2;
- sx = state->m_objectram1[offs + 2];
+ sx = m_objectram1[offs + 2];
sx |= (gfx_attr & 0x40) << 2;
}
else /* tilemaps (each sprite is a 16x256 column) */
@@ -182,11 +181,11 @@ SCREEN_UPDATE_IND16( exzisus )
}
else
{
- sx = state->m_objectram1[offs + 2];
+ sx = m_objectram1[offs + 2];
sx |= (gfx_attr & 0x40) << 2;
}
}
- sy = 256 - (height << 3) - (state->m_objectram1[offs]);
+ sy = 256 - (height << 3) - (m_objectram1[offs]);
for (xc = 0 ; xc < 2 ; xc++)
{
@@ -195,12 +194,12 @@ SCREEN_UPDATE_IND16( exzisus )
{
int code, color, x, y;
- code = (state->m_videoram1[goffs + 1] << 8) | state->m_videoram1[goffs];
- color = (state->m_videoram1[goffs + 1] >> 6) | (gfx_attr & 0x0f);
+ code = (m_videoram1[goffs + 1] << 8) | m_videoram1[goffs];
+ color = (m_videoram1[goffs + 1] >> 6) | (gfx_attr & 0x0f);
x = (sx + (xc << 3)) & 0xff;
y = (sy + (yc << 3)) & 0xff;
- if (state->flip_screen())
+ if (flip_screen())
{
x = 248 - x;
y = 248 - y;
@@ -209,7 +208,7 @@ SCREEN_UPDATE_IND16( exzisus )
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[1],
code & 0x3fff,
color,
- state->flip_screen(), state->flip_screen(),
+ flip_screen(), flip_screen(),
x, y, 15);
goffs += 2;
}