summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/deco16ic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/deco16ic.c')
-rw-r--r--src/mame/video/deco16ic.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mame/video/deco16ic.c b/src/mame/video/deco16ic.c
index e65bbc19653..50d2b17d38f 100644
--- a/src/mame/video/deco16ic.c
+++ b/src/mame/video/deco16ic.c
@@ -181,7 +181,8 @@ deco16ic_device::deco16ic_device(const machine_config &mconfig, const char *tag,
m_pf12_last_small(0),
m_pf12_last_big(0),
m_pf1_8bpp_mode(0),
- m_gfxdecode(*this)
+ m_gfxdecode(*this),
+ m_palette(*this)
{
}
@@ -512,7 +513,7 @@ void deco16ic_device::custom_tilemap_draw(
if ((flags & TILEMAP_DRAW_OPAQUE) || (p & trans_mask))
{
- bitmap.pix(y, x) = machine().pens[p];
+ bitmap.pix(y, x) = m_palette->pen(p);
if (screen.priority().valid())
{
UINT8 *pri = &screen.priority().pix8(y);
@@ -944,3 +945,13 @@ void deco16ic_device::tilemap_12_combine_draw(screen_device &screen, bitmap_rgb3
{
custom_tilemap_draw(screen, bitmap, cliprect, 0, m_pf1_tilemap_16x16, 0, m_pf2_tilemap_16x16, m_pf1_rowscroll_ptr, m_pf12_control[1], m_pf12_control[2], m_pf12_control[5] & 0xff, m_pf12_control[6] & 0xff, 0xf, 4, 0xff, flags, priority, is_tattoo);
}
+
+//-------------------------------------------------
+// static_set_palette_tag: Set the tag of the
+// palette device
+//-------------------------------------------------
+
+void deco16ic_device::static_set_palette_tag(device_t &device, const char *tag)
+{
+ downcast<deco16ic_device &>(device).m_palette.set_tag(tag);
+}