summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/norautp.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2014-02-27 13:35:15 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2014-02-27 13:35:15 +0000
commit64ac8f6776fc4451d756b0eb3bb6dbd22c49801a (patch)
treebb1d096fecec4684c8ab2b7be1b4d539ca06e57b /src/mame/drivers/norautp.c
parentf9d3fbaa73ccdab2e5fcf9fc095a14b4f24c3133 (diff)
Huge update, palette is now device (nw)
note: Aaron please give more descriptive text for release log I have no more strength :)
Diffstat (limited to 'src/mame/drivers/norautp.c')
-rw-r--r--src/mame/drivers/norautp.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/mame/drivers/norautp.c b/src/mame/drivers/norautp.c
index dc54d0047de..42519cf9214 100644
--- a/src/mame/drivers/norautp.c
+++ b/src/mame/drivers/norautp.c
@@ -577,7 +577,7 @@ UINT32 norautp_state::screen_update_norautp(screen_device &screen, bitmap_ind16
count = 0;
- bitmap.fill(machine().pens[0], cliprect); //black pen
+ bitmap.fill(m_palette->pen(0), cliprect); //black pen
for(y = 0; y < 8; y++)
{
@@ -589,7 +589,7 @@ UINT32 norautp_state::screen_update_norautp(screen_device &screen, bitmap_ind16
int tile = m_np_vram[count] & 0x3f;
int colour = (m_np_vram[count] & 0xc0) >> 6;
- m_gfxdecode->gfx(1)->opaque(bitmap,cliprect, tile, colour, 0, 0, (x * 32) + 8, y * 32);
+ m_gfxdecode->gfx(1)->opaque(m_palette,bitmap,cliprect, tile, colour, 0, 0, (x * 32) + 8, y * 32);
count+=2;
}
@@ -601,7 +601,7 @@ UINT32 norautp_state::screen_update_norautp(screen_device &screen, bitmap_ind16
int tile = m_np_vram[count] & 0x3f;
int colour = (m_np_vram[count] & 0xc0) >> 6;
- m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, tile, colour, 0, 0, x * 16, y * 32);
+ m_gfxdecode->gfx(0)->opaque(m_palette,bitmap,cliprect, tile, colour, 0, 0, x * 16, y * 32);
count++;
}
@@ -612,17 +612,17 @@ UINT32 norautp_state::screen_update_norautp(screen_device &screen, bitmap_ind16
}
-void norautp_state::palette_init()
+PALETTE_INIT_MEMBER(norautp_state, norautp)
{
/* 1st gfx bank */
- palette_set_color(machine(), 0, rgb_t(0x00, 0x00, 0xff)); /* blue */
- palette_set_color(machine(), 1, rgb_t(0xff, 0xff, 0x00)); /* yellow */
- palette_set_color(machine(), 2, rgb_t(0x00, 0x00, 0xff)); /* blue */
- palette_set_color(machine(), 3, rgb_t(0xff, 0xff, 0xff)); /* white */
- palette_set_color(machine(), 4, rgb_t(0xff, 0xff, 0xff)); /* white */
- palette_set_color(machine(), 5, rgb_t(0xff, 0x00, 0x00)); /* red */
- palette_set_color(machine(), 6, rgb_t(0xff, 0xff, 0xff)); /* white */
- palette_set_color(machine(), 7, rgb_t(0x00, 0x00, 0x00)); /* black */
+ palette.set_pen_color(0, rgb_t(0x00, 0x00, 0xff)); /* blue */
+ palette.set_pen_color(1, rgb_t(0xff, 0xff, 0x00)); /* yellow */
+ palette.set_pen_color(2, rgb_t(0x00, 0x00, 0xff)); /* blue */
+ palette.set_pen_color(3, rgb_t(0xff, 0xff, 0xff)); /* white */
+ palette.set_pen_color(4, rgb_t(0xff, 0xff, 0xff)); /* white */
+ palette.set_pen_color(5, rgb_t(0xff, 0x00, 0x00)); /* red */
+ palette.set_pen_color(6, rgb_t(0xff, 0xff, 0xff)); /* white */
+ palette.set_pen_color(7, rgb_t(0x00, 0x00, 0x00)); /* black */
}
@@ -1273,7 +1273,8 @@ static MACHINE_CONFIG_START( noraut_base, norautp_state )
MCFG_GFXDECODE_ADD("gfxdecode", norautp)
- MCFG_PALETTE_LENGTH(8)
+ MCFG_PALETTE_ADD("palette", 8)
+ MCFG_PALETTE_INIT_OWNER(norautp_state, norautp)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")