get rid of flipscreen handling (i will redo it)

This commit is contained in:
Michaël Banaan Ananas 2014-04-01 16:48:09 +00:00
parent 98fcb2739d
commit 8d0c2c825b

View File

@ -124,22 +124,13 @@ void slapfght_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
if ((src[offs + 2] & 0x80) == priority_to_display)
{
if (m_flipscreen)
{
sx = 265 - src[offs + 1];
sy = 239 - src[offs + 3];
sy &= 0xff;
}
else
{
sx = src[offs + 1] + 3;
sy = src[offs + 3] - 1;
}
sx = src[offs + 1] + 3;
sy = src[offs + 3] - 1;
m_gfxdecode->gfx(1)->transpen(bitmap, cliprect,
src[offs],
((src[offs + 2] >> 1) & 3) | ((src[offs + 2] << 2) & 4) | (m_palette_bank << 3),
m_flipscreen, m_flipscreen,
0, 0,
sx, sy, 0
);
}
@ -149,12 +140,7 @@ void slapfght_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
UINT32 slapfght_state::screen_update_perfrman(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_pf1_tilemap->set_flip(m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
m_pf1_tilemap->set_scrolly(0, 0);
if (m_flipscreen)
m_pf1_tilemap->set_scrollx(0, 264);
else
m_pf1_tilemap->set_scrollx(0, -16);
m_pf1_tilemap->set_scrollx(0, -16);
m_pf1_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
draw_sprites(bitmap,cliprect, 0);
@ -169,41 +155,22 @@ UINT32 slapfght_state::screen_update_slapfight(screen_device &screen, bitmap_ind
{
UINT8 *src = m_spriteram->buffer();
machine().tilemap().set_flip_all(m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
if (m_flipscreen)
{
m_fix_tilemap->set_scrollx(0, 296);
m_pf1_tilemap->set_scrollx(0, (*m_slapfight_scrollx_lo + 256 * *m_slapfight_scrollx_hi) + 296);
m_pf1_tilemap->set_scrolly(0, (*m_slapfight_scrolly) + 15);
m_fix_tilemap->set_scrolly(0, -1); /* Glitch in Tiger Heli otherwise */
}
else
{
m_fix_tilemap->set_scrollx(0, 0);
m_pf1_tilemap->set_scrollx(0, (*m_slapfight_scrollx_lo + 256 * *m_slapfight_scrollx_hi));
m_pf1_tilemap->set_scrolly(0, (*m_slapfight_scrolly) - 1);
m_fix_tilemap->set_scrolly(0, -1); /* Glitch in Tiger Heli otherwise */
}
m_fix_tilemap->set_scrollx(0, 0);
m_pf1_tilemap->set_scrollx(0, (*m_slapfight_scrollx_lo + 256 * *m_slapfight_scrollx_hi));
m_pf1_tilemap->set_scrolly(0, (*m_slapfight_scrolly) - 1);
m_fix_tilemap->set_scrolly(0, -1); /* Glitch in Tiger Heli otherwise */
m_pf1_tilemap->draw(screen, bitmap, cliprect, 0, 0);
/* Draw the sprites */
for (int offs = 0; offs < m_spriteram->bytes(); offs += 4)
{
if (m_flipscreen)
m_gfxdecode->gfx(2)->transpen(bitmap, cliprect,
src[offs] + ((src[offs + 2] & 0xc0) << 2),
(src[offs + 2] & 0x1e) >> 1,
1, 1,
288 - (src[offs + 1] + ((src[offs + 2] & 0x01) << 8)) + 18, 240 - src[offs + 3], 0
);
else
m_gfxdecode->gfx(2)->transpen(bitmap, cliprect,
src[offs] + ((src[offs + 2] & 0xc0) << 2),
(src[offs + 2] & 0x1e) >> 1,
0, 0,
(src[offs + 1] + ((src[offs + 2] & 0x01) << 8)) - 13, src[offs + 3], 0
);
m_gfxdecode->gfx(2)->transpen(bitmap, cliprect,
src[offs] + ((src[offs + 2] & 0xc0) << 2),
(src[offs + 2] & 0x1e) >> 1,
0, 0,
(src[offs + 1] + ((src[offs + 2] & 0x01) << 8)) - 13, src[offs + 3], 0
);
}
m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0);