mirror of
https://github.com/mamedev/mame.git
synced 2024-11-18 10:06:19 +01:00
panicr: fixed sprite position
This commit is contained in:
parent
bfcb47e2da
commit
e6bf8f49f7
1 changed files with 5 additions and 6 deletions
|
@ -216,23 +216,22 @@ static VIDEO_START( panicr )
|
||||||
static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect )
|
static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect )
|
||||||
{
|
{
|
||||||
UINT8 *spriteram = machine->generic.spriteram.u8;
|
UINT8 *spriteram = machine->generic.spriteram.u8;
|
||||||
int offs,fx,fy,x,y,color,sprite;
|
int offs,flipx,flipy,x,y,color,sprite;
|
||||||
|
|
||||||
for (offs = 0; offs<0x1000; offs+=16)
|
for (offs = 0; offs<0x1000; offs+=16)
|
||||||
{
|
{
|
||||||
|
flipx = 0;
|
||||||
fx = 0;
|
flipy = spriteram[offs+1] & 0x80;
|
||||||
fy = spriteram[offs+1] & 0x80;
|
|
||||||
y = spriteram[offs+2];
|
y = spriteram[offs+2];
|
||||||
x = spriteram[offs+3];
|
x = spriteram[offs+3];
|
||||||
|
if (spriteram[offs+1] & 0x40) x -= 0x100;
|
||||||
|
|
||||||
color = spriteram[offs+1] & 0x0f;
|
color = spriteram[offs+1] & 0x0f;
|
||||||
|
|
||||||
sprite = spriteram[offs+0]+(scrollram[0x0c]<<8);
|
sprite = spriteram[offs+0]+(scrollram[0x0c]<<8);
|
||||||
|
|
||||||
drawgfx_transmask(bitmap,cliprect,machine->gfx[2],
|
drawgfx_transmask(bitmap,cliprect,machine->gfx[2],
|
||||||
sprite,
|
sprite,
|
||||||
color,fx,fy,x,y,
|
color,flipx,flipy,x,y,
|
||||||
colortable_get_transpen_mask(machine->colortable, machine->gfx[2], color, 0));
|
colortable_get_transpen_mask(machine->colortable, machine->gfx[2], color, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue