mirror of
https://github.com/holub/mame
synced 2025-05-10 16:21:42 +03:00
Merge pull request #5160 from cam900/bandit
decmxc06.cpp : Fix bandit regression, Fix notes, Remove outdated comm…
This commit is contained in:
commit
cfc6dd2944
@ -4,9 +4,15 @@
|
||||
Deco MXC06 sprite generator:
|
||||
|
||||
used by:
|
||||
madmotor.c
|
||||
madmotor.cpp
|
||||
dec0.cpp
|
||||
stadhero.cpp
|
||||
thedeep.cpp
|
||||
actfancr.cpp
|
||||
vaportra.cpp
|
||||
dec8.cpp
|
||||
|
||||
Notes (dec0.c)
|
||||
Notes (dec0.cpp)
|
||||
|
||||
Sprite data: The unknown bits seem to be unused.
|
||||
|
||||
@ -29,11 +35,6 @@ Notes (dec0.c)
|
||||
Bit 4,5,6,7: - Colour
|
||||
Byte 5: X-coords
|
||||
|
||||
|
||||
todo:
|
||||
Implement sprite/tilemap orthogonality (not strictly needed as no
|
||||
games make deliberate use of it). (pdrawgfx, or rendering to bitmap for manual mixing)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@ -73,8 +74,8 @@ void deco_mxc06_device::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap
|
||||
|
||||
int flipx = data0 & 0x2000;
|
||||
parentFlipY = flipy = data0 & 0x4000;
|
||||
const u16 h = (1 << ((data0 & 0x1800) >> 11)); /* 1x, 2x, 4x, 8x height */
|
||||
const u16 w = (1 << ((data0 & 0x0600) >> 9)); /* 1x, 2x, 4x, 8x width */
|
||||
const int h = (1 << ((data0 & 0x1800) >> 11)); /* 1x, 2x, 4x, 8x height */
|
||||
int w = (1 << ((data0 & 0x0600) >> 9)); /* 1x, 2x, 4x, 8x width */
|
||||
|
||||
int sx = data2 & 0x01ff;
|
||||
int sy = data0 & 0x01ff;
|
||||
@ -101,10 +102,13 @@ void deco_mxc06_device::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap
|
||||
continue;
|
||||
}
|
||||
|
||||
int chainoffs = priority ? offs - ((w - 1) * 4) : offs; // or bandit breaks
|
||||
for (int x = 0; x < w; x++)
|
||||
{
|
||||
if (chainoffs < size)
|
||||
{
|
||||
// maybe, birdie try appears to specify the base code for each part..
|
||||
u16 code = spriteram[offs + 1] & 0x1fff;
|
||||
u16 code = spriteram[chainoffs + 1] & 0x1fff;
|
||||
|
||||
code &= ~(h - 1);
|
||||
|
||||
@ -139,10 +143,15 @@ void deco_mxc06_device::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
chainoffs += 4;
|
||||
}
|
||||
while (w)
|
||||
{
|
||||
w--;
|
||||
offs += inc;
|
||||
if (offs == end)
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user