summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Pierpaolo Prazzoli <pierpaol@mamedev.org>2009-03-08 22:16:30 +0000
committer Pierpaolo Prazzoli <pierpaol@mamedev.org>2009-03-08 22:16:30 +0000
commit3395fccf11bb92b0aa33194d02dc92f5b51170f5 (patch)
tree262cae715ea57d367a09b51d6aecacf7b173eca5
parentb3e201ba267a47a033ff8b1e734527278551ee58 (diff)
00421: fghthist, fghthsta, fghthstj, fghthstu: Some priority problems in Ryoko's stage. Namely, the old man, the cat and the kid. [Pierpaolo Prazzoli]
-rw-r--r--src/mame/drivers/deco32.c2
-rw-r--r--src/mame/video/deco32.c24
2 files changed, 18 insertions, 8 deletions
diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c
index 0d981013212..4cc06c084d9 100644
--- a/src/mame/drivers/deco32.c
+++ b/src/mame/drivers/deco32.c
@@ -362,6 +362,8 @@ static WRITE32_HANDLER( fghthist_eeprom_w )
eeprom_set_clock_line((data & 0x20) ? ASSERT_LINE : CLEAR_LINE);
eeprom_write_bit(data & 0x10);
eeprom_set_cs_line((data & 0x40) ? CLEAR_LINE : ASSERT_LINE);
+
+ deco32_pri_w(space,0,data&0x1,0xffffffff); /* Bit 0 - layer priority toggle */
}
else if (!ACCESSING_BITS_8_15)
{
diff --git a/src/mame/video/deco32.c b/src/mame/video/deco32.c
index 5033e61aeab..12a602feddc 100644
--- a/src/mame/video/deco32.c
+++ b/src/mame/video/deco32.c
@@ -296,9 +296,9 @@ static void fghthist_draw_sprites(running_machine* machine, bitmap_t *bitmap, co
colour = (x >>9) & colourmask;
if ((y&0x8000))
- pri=8;
+ pri=1;
else
- pri=128;
+ pri=4;
fx = y & 0x2000;
fy = y & 0x4000;
@@ -969,9 +969,9 @@ VIDEO_START( captaven )
VIDEO_START( fghthist )
{
pf1_tilemap = tilemap_create(machine, get_pf1_tile_info, tilemap_scan_rows, 8, 8,64,32);
- pf2_tilemap = tilemap_create(machine, get_pf2_tile_info, deco16_scan_rows,16,16,64,32);
- pf3_tilemap = tilemap_create(machine, get_pf3_tile_info, deco16_scan_rows,16,16,64,32);
- pf4_tilemap = tilemap_create(machine, get_pf4_tile_info, deco16_scan_rows, 16,16,64,32);
+ pf2_tilemap = tilemap_create(machine, get_pf2_tile_info, deco16_scan_rows, 16,16,64,32);
+ pf3_tilemap = tilemap_create(machine, get_pf3_tile_info, deco16_scan_rows, 16,16,64,32);
+ pf4_tilemap = tilemap_create(machine, get_pf4_tile_info, deco16_scan_rows, 16,16,64,32);
pf1a_tilemap =0;
dirty_palette = auto_malloc(4096);
@@ -1398,9 +1398,17 @@ VIDEO_UPDATE( fghthist )
deco16_clear_sprite_priority_bitmap();
bitmap_fill(priority_bitmap,cliprect,0);
bitmap_fill(bitmap,cliprect,screen->machine->pens[0x000]); // Palette index not confirmed
- tilemap_draw(bitmap,cliprect,pf4_tilemap,0,1);
- tilemap_draw(bitmap,cliprect,pf3_tilemap,0,4);
- tilemap_draw(bitmap,cliprect,pf2_tilemap,0,16);
+ tilemap_draw(bitmap,cliprect,pf4_tilemap,0,0);
+ if(deco32_pri&1)
+ {
+ tilemap_draw(bitmap,cliprect,pf2_tilemap,0,0);
+ tilemap_draw(bitmap,cliprect,pf3_tilemap,0,2);
+ }
+ else
+ {
+ tilemap_draw(bitmap,cliprect,pf3_tilemap,0,0);
+ tilemap_draw(bitmap,cliprect,pf2_tilemap,0,2);
+ }
fghthist_draw_sprites(screen->machine, bitmap, cliprect, buffered_spriteram32,3,0, 0xf);
tilemap_draw(bitmap,cliprect,pf1_tilemap,0,0);
return 0;