mirror of
https://github.com/holub/mame
synced 2025-05-15 18:32:02 +03:00
fixed multiwidth sprites in decmxc06.c, removed code which appeared to serve no purpose other than to break the birdtry gfxdecode in machine/dec0.c [David Haywood]
This commit is contained in:
parent
446be9ae42
commit
00f3454dae
@ -417,24 +417,5 @@ DRIVER_INIT( hbarrel )
|
||||
DRIVER_INIT( birdtry )
|
||||
{
|
||||
dec0_state *state = machine.driver_data<dec0_state>();
|
||||
UINT8 *src, tmp;
|
||||
int i, j, k;
|
||||
|
||||
state->GAME=3;
|
||||
|
||||
src = machine.region("gfx4")->base();
|
||||
|
||||
/* some parts of the graphic have bytes swapped */
|
||||
for (k = 0;k < 0x70000;k += 0x20000)
|
||||
{
|
||||
for (i = 0x2000;i < 0x10000;i += 32)
|
||||
{
|
||||
for (j = 0;j < 16;j++)
|
||||
{
|
||||
tmp = src[k+i+j+16];
|
||||
src[k+i+j+16] = src[k+i+j];
|
||||
src[k+i+j] = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,8 +32,6 @@ todo:
|
||||
Implement sprite/tilemap orthogonality (not strictly needed as no
|
||||
games make deliberate use of it). (pdrawgfx, or rendering to bitmap for manual mixing)
|
||||
|
||||
fix multi-width support, used by birdie try
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@ -94,7 +92,6 @@ void deco_mxc06_device::draw_sprites( running_machine &machine, bitmap_t *bitmap
|
||||
/* multi width used only on the title screen? */
|
||||
|
||||
|
||||
code = spriteram[offs + 1] & 0x1fff;
|
||||
|
||||
sx = sx & 0x01ff;
|
||||
sy = sy & 0x01ff;
|
||||
@ -103,15 +100,7 @@ void deco_mxc06_device::draw_sprites( running_machine &machine, bitmap_t *bitmap
|
||||
sx = 240 - sx;
|
||||
sy = 240 - sy;
|
||||
|
||||
code &= ~(h-1);
|
||||
if (flipy)
|
||||
incy = -1;
|
||||
else
|
||||
{
|
||||
code += h-1;
|
||||
incy = 1;
|
||||
}
|
||||
|
||||
|
||||
if (flip_screen_get(machine))
|
||||
{
|
||||
sy = 240 - sy;
|
||||
@ -125,6 +114,19 @@ void deco_mxc06_device::draw_sprites( running_machine &machine, bitmap_t *bitmap
|
||||
|
||||
for (x = 0; x < w; x++)
|
||||
{
|
||||
// maybe, birdie try appears to specify the base code for each part..
|
||||
code = spriteram[offs + 1] & 0x1fff;
|
||||
|
||||
code &= ~(h-1);
|
||||
|
||||
if (flipy)
|
||||
incy = -1;
|
||||
else
|
||||
{
|
||||
code += h-1;
|
||||
incy = 1;
|
||||
}
|
||||
|
||||
for (y = 0; y < h; y++)
|
||||
{
|
||||
if (spriteram[offs] & 0x8000)
|
||||
@ -155,7 +157,7 @@ void deco_mxc06_device::draw_sprites( running_machine &machine, bitmap_t *bitmap
|
||||
if (draw)
|
||||
{
|
||||
drawgfx_transpen(bitmap,cliprect,machine.gfx[m_gfxregion],
|
||||
code - y * incy + h * x,
|
||||
code - y * incy,
|
||||
color & col_mask,
|
||||
flipx,flipy,
|
||||
sx + (mult * x),sy + (mult * y),0);
|
||||
@ -164,8 +166,8 @@ void deco_mxc06_device::draw_sprites( running_machine &machine, bitmap_t *bitmap
|
||||
}
|
||||
|
||||
offs += 4;
|
||||
if (offs >= 0x800 / 2 || spriteram[offs] & 0x8000) // seems the expected behaviour on the title screen - WRONG for birdie try
|
||||
break;
|
||||
if (offs >= 0x800 / 2)
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user