mirror of
https://github.com/holub/mame
synced 2025-10-06 17:08:28 +03:00
Wrap-around fix from Haze for ZT, nw
This commit is contained in:
parent
784717afbf
commit
d901fed61a
@ -680,9 +680,6 @@ void raiden2_state::draw_sprites(running_machine &machine, bitmap_ind16 &bitmap,
|
|||||||
int xflip, yflip;
|
int xflip, yflip;
|
||||||
int xstep, ystep;
|
int xstep, ystep;
|
||||||
|
|
||||||
if (sx & 0x8000) sx -= 0x10000;
|
|
||||||
if (sy & 0x8000) sy -= 0x10000;
|
|
||||||
|
|
||||||
|
|
||||||
ytlim = (source[0] >> 12) & 0x7;
|
ytlim = (source[0] >> 12) & 0x7;
|
||||||
xtlim = (source[0] >> 8) & 0x7;
|
xtlim = (source[0] >> 8) & 0x7;
|
||||||
@ -714,6 +711,12 @@ void raiden2_state::draw_sprites(running_machine &machine, bitmap_ind16 &bitmap,
|
|||||||
{
|
{
|
||||||
for (ytiles = 0; ytiles < ytlim; ytiles++)
|
for (ytiles = 0; ytiles < ytlim; ytiles++)
|
||||||
{
|
{
|
||||||
|
/* note this wraparound handling could be wrong if some of the COP maths is wrong */
|
||||||
|
|
||||||
|
#define ZEROTEAM_MASK_X (0x1ff) // causes a blank square in the corner of zero team, but otherwise the thrusters of the ship in the r2 intro are clipped, using 0x8000 as a sign bit instead of this logic works for r2, but not zero team
|
||||||
|
#define ZEROTEAM_MASK_Y (0x1ff)
|
||||||
|
|
||||||
|
|
||||||
drawgfx_transpen(
|
drawgfx_transpen(
|
||||||
bitmap,
|
bitmap,
|
||||||
cliprect,
|
cliprect,
|
||||||
@ -721,7 +724,35 @@ void raiden2_state::draw_sprites(running_machine &machine, bitmap_ind16 &bitmap,
|
|||||||
tile_number,
|
tile_number,
|
||||||
colr,
|
colr,
|
||||||
yflip,xflip,
|
yflip,xflip,
|
||||||
sx+xstep*xtiles,sy+ystep*ytiles,15);
|
(sx+xstep*xtiles)&ZEROTEAM_MASK_X,(sy+ystep*ytiles)&ZEROTEAM_MASK_Y,15);
|
||||||
|
|
||||||
|
drawgfx_transpen(
|
||||||
|
bitmap,
|
||||||
|
cliprect,
|
||||||
|
gfx,
|
||||||
|
tile_number,
|
||||||
|
colr,
|
||||||
|
yflip,xflip,
|
||||||
|
((sx+xstep*xtiles)&ZEROTEAM_MASK_X)-0x200,(sy+ystep*ytiles)&ZEROTEAM_MASK_Y,15);
|
||||||
|
|
||||||
|
drawgfx_transpen(
|
||||||
|
bitmap,
|
||||||
|
cliprect,
|
||||||
|
gfx,
|
||||||
|
tile_number,
|
||||||
|
colr,
|
||||||
|
yflip,xflip,
|
||||||
|
(sx+xstep*xtiles)&ZEROTEAM_MASK_X,((sy+ystep*ytiles)&ZEROTEAM_MASK_Y)-0x200,15);
|
||||||
|
|
||||||
|
drawgfx_transpen(
|
||||||
|
bitmap,
|
||||||
|
cliprect,
|
||||||
|
gfx,
|
||||||
|
tile_number,
|
||||||
|
colr,
|
||||||
|
yflip,xflip,
|
||||||
|
((sx+xstep*xtiles)&ZEROTEAM_MASK_X)-0x200,((sy+ystep*ytiles)&ZEROTEAM_MASK_Y)-0x200,15);
|
||||||
|
|
||||||
|
|
||||||
tile_number++;
|
tile_number++;
|
||||||
}
|
}
|
||||||
|
@ -2502,7 +2502,7 @@ static WRITE16_HANDLER( generic_cop_w )
|
|||||||
//if(dma_trigger != 0x87)
|
//if(dma_trigger != 0x87)
|
||||||
//printf("SRC: %08x %08x DST:%08x SIZE:%08x TRIGGER: %08x %02x %02x\n",cop_dma_src[cop_dma_trigger] << 6,cop_dma_fade_table * 0x400,cop_dma_dst[cop_dma_trigger] << 6,cop_dma_size[cop_dma_trigger] << 5,cop_dma_trigger,pal_brightness_val,pal_brightness_mode);
|
//printf("SRC: %08x %08x DST:%08x SIZE:%08x TRIGGER: %08x %02x %02x\n",cop_dma_src[cop_dma_trigger] << 6,cop_dma_fade_table * 0x400,cop_dma_dst[cop_dma_trigger] << 6,cop_dma_size[cop_dma_trigger] << 5,cop_dma_trigger,pal_brightness_val,pal_brightness_mode);
|
||||||
|
|
||||||
src = (cop_dma_src[cop_dma_trigger] << 6) ;
|
src = (cop_dma_src[cop_dma_trigger] << 6);
|
||||||
dst = (cop_dma_dst[cop_dma_trigger] << 6);
|
dst = (cop_dma_dst[cop_dma_trigger] << 6);
|
||||||
size = ((cop_dma_size[cop_dma_trigger] << 5) - (cop_dma_dst[cop_dma_trigger] << 6) + 0x20)/2;
|
size = ((cop_dma_size[cop_dma_trigger] << 5) - (cop_dma_dst[cop_dma_trigger] << 6) + 0x20)/2;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user