bking.c, toypop.c: fix flipscreen after core changes [Alex Jackson]

This commit is contained in:
Alex W. Jackson 2014-02-22 20:55:16 +00:00
parent af7dbf72dd
commit 95667357b9
3 changed files with 5 additions and 8 deletions

View File

@ -124,9 +124,7 @@ WRITE8_MEMBER(bking_state::bking_cont1_w)
coin_lockout_global_w(machine(), ~data & 0x01); coin_lockout_global_w(machine(), ~data & 0x01);
flip_screen_set_no_update(data & 0x04); flip_screen_set(data & 0x04);
machine().tilemap().set_flip_all(flip_screen() ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
m_controller = data & 0x02; m_controller = data & 0x02;

View File

@ -393,7 +393,6 @@ void mappy_state::mappy_draw_sprites(bitmap_ind16 &bitmap, const rectangle &clip
UINT8 *spriteram_2 = spriteram + 0x800; UINT8 *spriteram_2 = spriteram + 0x800;
UINT8 *spriteram_3 = spriteram_2 + 0x800; UINT8 *spriteram_3 = spriteram_2 + 0x800;
int offs; int offs;
enum { xoffs = 0, yoffs = 0 };
for (offs = 0;offs < 0x80;offs += 2) for (offs = 0;offs < 0x80;offs += 2)
{ {
@ -407,8 +406,8 @@ void mappy_state::mappy_draw_sprites(bitmap_ind16 &bitmap, const rectangle &clip
}; };
int sprite = spriteram[offs]; int sprite = spriteram[offs];
int color = spriteram[offs+1]; int color = spriteram[offs+1];
int sx = spriteram_2[offs+1] + 0x100 * (spriteram_3[offs+1] & 1) - 40 + xoffs; int sx = spriteram_2[offs+1] + 0x100 * (spriteram_3[offs+1] & 1) - 40;
int sy = 256 - spriteram_2[offs] + yoffs + 1; // sprites are buffered and delayed by one scanline int sy = 256 - spriteram_2[offs] + 1; // sprites are buffered and delayed by one scanline
int flipx = (spriteram_3[offs] & 0x01); int flipx = (spriteram_3[offs] & 0x01);
int flipy = (spriteram_3[offs] & 0x02) >> 1; int flipy = (spriteram_3[offs] & 0x02) >> 1;
int sizex = (spriteram_3[offs] & 0x04) >> 2; int sizex = (spriteram_3[offs] & 0x04) >> 2;

View File

@ -217,6 +217,7 @@ void toypop_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect,
UINT8 *spriteram_2 = spriteram + 0x800; UINT8 *spriteram_2 = spriteram + 0x800;
UINT8 *spriteram_3 = spriteram_2 + 0x800; UINT8 *spriteram_3 = spriteram_2 + 0x800;
enum { xoffs = -31, yoffs = -8 }; enum { xoffs = -31, yoffs = -8 };
int flip = flip_screen();
for (int offs = 0;offs < 0x80;offs += 2) for (int offs = 0;offs < 0x80;offs += 2)
{ {
@ -243,11 +244,10 @@ void toypop_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect,
sy -= 16 * sizey; sy -= 16 * sizey;
sy = (sy & 0xff) - 32; // fix wraparound sy = (sy & 0xff) - 32; // fix wraparound
if (flip_screen()) if (flip)
{ {
flipx ^= 1; flipx ^= 1;
flipy ^= 1; flipy ^= 1;
sy += 40;
} }
for (int y = 0;y <= sizey;y++) for (int y = 0;y <= sizey;y++)