Skip to content

Commit cdf07d9

Browse files
authored
sinclair/specnext_layer2.cpp: Mixing layer2 with transparent color is transparent (#14224)
1 parent e86591c commit cdf07d9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/mame/sinclair/specnext_layer2.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ void specnext_layer2_device::draw_256(screen_device &screen, bitmap_rgb32 &bitma
8080

8181
const rgb_t gt0 = rgbexpand<3,3,3>((m_global_transparent << 1) | 0, 6, 3, 0);
8282
const rgb_t gt1 = rgbexpand<3,3,3>((m_global_transparent << 1) | 1, 6, 3, 0);
83+
const rgb_t fallback_color = palette().pen_color(0x800);
8384
const u16 pen_base = (m_layer2_palette_select ? m_palette_alt_offset : m_palette_base_offset) | (m_palette_offset << 4);
8485
const u16 x_min = (((clip.left() - offset_h) >> 1) + m_scroll_x) % info[0];
8586
for (u16 vpos = clip.top(); vpos <= clip.bottom(); vpos++)
@@ -107,6 +108,11 @@ void specnext_layer2_device::draw_256(screen_device &screen, bitmap_rgb32 &bitma
107108
*(prio + 1) |= prio_color ? 8 : pcode;
108109
}
109110
}
111+
else if (mixer)
112+
{
113+
*pix = fallback_color;
114+
*(pix + 1) = fallback_color;
115+
}
110116

111117
++x %= info[0];
112118
if (x == 0)

0 commit comments

Comments
 (0)