summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/fcombat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/fcombat.c')
-rw-r--r--src/mame/video/fcombat.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/mame/video/fcombat.c b/src/mame/video/fcombat.c
index 02838cbb3a9..01583bd3bc6 100644
--- a/src/mame/video/fcombat.c
+++ b/src/mame/video/fcombat.c
@@ -133,26 +133,25 @@ WRITE8_MEMBER(fcombat_state::fcombat_videoreg_w)
-SCREEN_UPDATE_IND16( fcombat )
+UINT32 fcombat_state::screen_update_fcombat(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- fcombat_state *state = screen.machine().driver_data<fcombat_state>();
int sx, sy, offs, i;
/* draw background */
- state->m_bgmap->set_scrolly(0, state->m_fcombat_sh);
- state->m_bgmap->set_scrollx(0, state->m_fcombat_sv - 24);
+ m_bgmap->set_scrolly(0, m_fcombat_sh);
+ m_bgmap->set_scrollx(0, m_fcombat_sv - 24);
- state->m_bgmap->mark_all_dirty();
- state->m_bgmap->draw(bitmap, cliprect, 0, 0);
+ m_bgmap->mark_all_dirty();
+ m_bgmap->draw(bitmap, cliprect, 0, 0);
//draw_background(bitmap, cliprect);
/* draw sprites */
- for (i = 0; i < state->m_spriteram.bytes(); i += 4)
+ for (i = 0; i < m_spriteram.bytes(); i += 4)
{
- int flags = state->m_spriteram[i + 0];
- int y = state->m_spriteram[i + 1] ^ 255;
- int code = state->m_spriteram[i + 2] + ((flags & 0x20) << 3);
- int x = state->m_spriteram[i + 3] * 2 + 72;
+ int flags = m_spriteram[i + 0];
+ int y = m_spriteram[i + 1] ^ 255;
+ int code = m_spriteram[i + 2] + ((flags & 0x20) << 3);
+ int x = m_spriteram[i + 3] * 2 + 72;
int xflip = flags & 0x80;
int yflip = flags & 0x40;
@@ -160,10 +159,10 @@ SCREEN_UPDATE_IND16( fcombat )
int wide = flags & 0x08;
int code2 = code;
- int color = ((flags >> 1) & 0x03) | ((code >> 5) & 0x04) | (code & 0x08) | (state->m_sprite_palette * 16);
+ int color = ((flags >> 1) & 0x03) | ((code >> 5) & 0x04) | (code & 0x08) | (m_sprite_palette * 16);
gfx_element *gfx = screen.machine().gfx[1];
- if (state->m_cocktail_flip)
+ if (m_cocktail_flip)
{
x = 64 * 8 - gfx->width() - x;
y = 32 * 8 - gfx->height() - y;
@@ -199,14 +198,14 @@ SCREEN_UPDATE_IND16( fcombat )
for (sy = VISIBLE_Y_MIN/8; sy < VISIBLE_Y_MAX/8; sy++)
for (sx = VISIBLE_X_MIN/8; sx < VISIBLE_X_MAX/8; sx++)
{
- int x = state->m_cocktail_flip ? (63 * 8 - 8 * sx) : 8 * sx;
- int y = state->m_cocktail_flip ? (31 * 8 - 8 * sy) : 8 * sy;
+ int x = m_cocktail_flip ? (63 * 8 - 8 * sx) : 8 * sx;
+ int y = m_cocktail_flip ? (31 * 8 - 8 * sy) : 8 * sy;
offs = sx + sy * 64;
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[0],
- state->m_videoram[offs] + 256 * state->m_char_bank,
- ((state->m_videoram[offs] & 0xf0) >> 4) + state->m_char_palette * 16,
- state->m_cocktail_flip, state->m_cocktail_flip, x, y, 0);
+ m_videoram[offs] + 256 * m_char_bank,
+ ((m_videoram[offs] & 0xf0) >> 4) + m_char_palette * 16,
+ m_cocktail_flip, m_cocktail_flip, x, y, 0);
}
return 0;
}