Haze: moved +16 for sprite offsetting in SD Gundam, no whatsnew

This commit is contained in:
Angelo Salese 2010-12-29 18:56:23 +00:00
parent fb32b80591
commit 5cfd97d3f7
4 changed files with 16 additions and 7 deletions

View File

@ -1225,7 +1225,7 @@ static MACHINE_CONFIG_START( grainbow, driver_device )
MDRV_GFXDECODE(grainbow) MDRV_GFXDECODE(grainbow)
MDRV_PALETTE_LENGTH(128*16) MDRV_PALETTE_LENGTH(128*16)
MDRV_VIDEO_START(legionna) MDRV_VIDEO_START(grainbow)
MDRV_VIDEO_UPDATE(grainbow) MDRV_VIDEO_UPDATE(grainbow)
/* sound hardware */ /* sound hardware */

View File

@ -13,6 +13,7 @@ WRITE16_HANDLER( legionna_text_w );
VIDEO_START( legionna ); VIDEO_START( legionna );
VIDEO_START( cupsoc ); VIDEO_START( cupsoc );
VIDEO_START( denjinmk ); VIDEO_START( denjinmk );
VIDEO_START( grainbow );
VIDEO_UPDATE( legionna ); VIDEO_UPDATE( legionna );
VIDEO_UPDATE( godzilla ); VIDEO_UPDATE( godzilla );
VIDEO_UPDATE( grainbow ); VIDEO_UPDATE( grainbow );

View File

@ -2451,8 +2451,7 @@ static WRITE16_HANDLER( generic_cop_w )
offs = (offset & 3) * 4; offs = (offset & 3) * 4;
/* TODO: I really suspect that following two are actually taken from the 0xa180 macro command then internally loaded */ /* TODO: I really suspect that following two are actually taken from the 0xa180 macro command then internally loaded */
/* TODO: +16 is a temp hack, we need to find the X/Y global register ... also this probably should go into video file rather than here ... */ abs_x = space->read_word(cop_register[0] + 8) - cop_sprite_dma_abs_x;
abs_x = space->read_word(cop_register[0] + 8) - cop_sprite_dma_abs_x + 16;
abs_y = space->read_word(cop_register[0] + 4) - cop_sprite_dma_abs_y; abs_y = space->read_word(cop_register[0] + 4) - cop_sprite_dma_abs_y;
rel_xy = space->read_word(cop_sprite_dma_src + 4 + offs); rel_xy = space->read_word(cop_sprite_dma_src + 4 + offs);

View File

@ -11,6 +11,7 @@ UINT16 *legionna_back_data,*legionna_fore_data,*legionna_mid_data,*legionna_scro
static tilemap_t *background_layer,*foreground_layer,*midground_layer,*text_layer; static tilemap_t *background_layer,*foreground_layer,*midground_layer,*text_layer;
UINT16 legionna_layer_disable; UINT16 legionna_layer_disable;
int legionna_sprite_xoffs;
/******************************************************************************/ /******************************************************************************/
@ -144,6 +145,7 @@ VIDEO_START( legionna )
text_layer = tilemap_create(machine, get_text_tile_info,tilemap_scan_rows, 8,8,64,32); text_layer = tilemap_create(machine, get_text_tile_info,tilemap_scan_rows, 8,8,64,32);
legionna_scrollram16 = auto_alloc_array(machine, UINT16, 0x60/2); legionna_scrollram16 = auto_alloc_array(machine, UINT16, 0x60/2);
legionna_sprite_xoffs = 0;
tilemap_set_transparent_pen(background_layer,15); tilemap_set_transparent_pen(background_layer,15);
tilemap_set_transparent_pen(midground_layer,15); tilemap_set_transparent_pen(midground_layer,15);
@ -159,6 +161,7 @@ VIDEO_START( denjinmk )
text_layer = tilemap_create(machine, get_text_tile_info,tilemap_scan_rows, 8,8,64,32); text_layer = tilemap_create(machine, get_text_tile_info,tilemap_scan_rows, 8,8,64,32);
legionna_scrollram16 = auto_alloc_array(machine, UINT16, 0x60/2); legionna_scrollram16 = auto_alloc_array(machine, UINT16, 0x60/2);
legionna_sprite_xoffs = 0;
tilemap_set_transparent_pen(background_layer,15); tilemap_set_transparent_pen(background_layer,15);
tilemap_set_transparent_pen(midground_layer,15); tilemap_set_transparent_pen(midground_layer,15);
@ -174,6 +177,7 @@ VIDEO_START( cupsoc )
text_layer = tilemap_create(machine, get_text_tile_info,tilemap_scan_rows, 8,8,64,32); text_layer = tilemap_create(machine, get_text_tile_info,tilemap_scan_rows, 8,8,64,32);
legionna_scrollram16 = auto_alloc_array(machine, UINT16, 0x60/2); legionna_scrollram16 = auto_alloc_array(machine, UINT16, 0x60/2);
legionna_sprite_xoffs = 0;
tilemap_set_transparent_pen(background_layer,15); tilemap_set_transparent_pen(background_layer,15);
tilemap_set_transparent_pen(midground_layer,15); tilemap_set_transparent_pen(midground_layer,15);
@ -181,7 +185,12 @@ VIDEO_START( cupsoc )
tilemap_set_transparent_pen(text_layer,15); tilemap_set_transparent_pen(text_layer,15);
} }
VIDEO_START(grainbow)
{
VIDEO_START_CALL(legionna);
legionna_sprite_xoffs = 16;
}
/************************************************************************* /*************************************************************************
Legionnaire Spriteram (similar to Dcon) Legionnaire Spriteram (similar to Dcon)
@ -276,7 +285,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
{ {
pdrawgfx_transpen(bitmap,cliprect,machine->gfx[3], pdrawgfx_transpen(bitmap,cliprect,machine->gfx[3],
sprite++, sprite++,
color,fx,fy,x+ax*16,y+ay*16, color,fx,fy,(x+ax*16)+legionna_sprite_xoffs,y+ay*16,
machine->priority_bitmap,pri_mask, 15); machine->priority_bitmap,pri_mask, 15);
} }
} }
@ -287,7 +296,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
{ {
pdrawgfx_transpen(bitmap,cliprect,machine->gfx[3], pdrawgfx_transpen(bitmap,cliprect,machine->gfx[3],
sprite++, sprite++,
color,fx,fy,x+ax*16,y+(dy-ay-1)*16, color,fx,fy,(x+ax*16)+legionna_sprite_xoffs,y+(dy-ay-1)*16,
machine->priority_bitmap,pri_mask,15); machine->priority_bitmap,pri_mask,15);
} }
} }
@ -301,7 +310,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
{ {
pdrawgfx_transpen(bitmap,cliprect,machine->gfx[3], pdrawgfx_transpen(bitmap,cliprect,machine->gfx[3],
sprite++, sprite++,
color,fx,fy,x+(dx-ax-1)*16,y+ay*16, color,fx,fy,(x+(dx-ax-1)*16)+legionna_sprite_xoffs,y+ay*16,
machine->priority_bitmap,pri_mask,15); machine->priority_bitmap,pri_mask,15);
} }
} }
@ -312,7 +321,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
{ {
pdrawgfx_transpen(bitmap,cliprect,machine->gfx[3], pdrawgfx_transpen(bitmap,cliprect,machine->gfx[3],
sprite++, sprite++,
color,fx,fy,x+(dx-ax-1)*16,y+(dy-ay-1)*16, color,fx,fy,(x+(dx-ax-1)*16)+legionna_sprite_xoffs,y+(dy-ay-1)*16,
machine->priority_bitmap,pri_mask, 15); machine->priority_bitmap,pri_mask, 15);
} }
} }