mirror of
https://github.com/holub/mame
synced 2025-10-07 17:27:06 +03:00
namco_c355spr: don't add shadow offset to black_pen, it will crash MAME(and black+shadow = black anyway) (nw)
This commit is contained in:
parent
fd44ff524a
commit
805c32201e
@ -49,7 +49,8 @@ void namco_c355spr_device::zdrawgfxzoom(
|
|||||||
if (gfx)
|
if (gfx)
|
||||||
{
|
{
|
||||||
device_palette_interface &palette = gfx->palette();
|
device_palette_interface &palette = gfx->palette();
|
||||||
int shadow_offset = (palette.shadows_enabled()) ? palette.entries() : 0;
|
const int shadow_offset = (palette.shadows_enabled()) ? palette.entries() : 0;
|
||||||
|
const pen_t black = palette.black_pen();
|
||||||
const pen_t *pal = &palette.pen(gfx->colorbase() + gfx->granularity() * (color % gfx->colors()));
|
const pen_t *pal = &palette.pen(gfx->colorbase() + gfx->granularity() * (color % gfx->colors()));
|
||||||
const u8 *source_base = gfx->get_data(code % gfx->elements());
|
const u8 *source_base = gfx->get_data(code % gfx->elements());
|
||||||
int sprite_screen_height = (scaley * gfx->height() + 0x8000) >> 16;
|
int sprite_screen_height = (scaley * gfx->height() + 0x8000) >> 16;
|
||||||
@ -159,6 +160,7 @@ void namco_c355spr_device::zdrawgfxzoom(
|
|||||||
{
|
{
|
||||||
if (color == 0xf && c == 0xfe && shadow_offset)
|
if (color == 0xf && c == 0xfe && shadow_offset)
|
||||||
{
|
{
|
||||||
|
if (dest[x] != black)
|
||||||
dest[x] |= shadow_offset;
|
dest[x] |= shadow_offset;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user