summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/mgolf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/mgolf.c')
-rw-r--r--src/mame/drivers/mgolf.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mame/drivers/mgolf.c b/src/mame/drivers/mgolf.c
index 6885c9060d3..10de6aad8ee 100644
--- a/src/mame/drivers/mgolf.c
+++ b/src/mame/drivers/mgolf.c
@@ -46,7 +46,7 @@ public:
virtual void machine_start();
virtual void machine_reset();
virtual void video_start();
- virtual void palette_init();
+ DECLARE_PALETTE_INIT(mgolf);
UINT32 screen_update_mgolf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(interrupt_callback);
void update_plunger( );
@@ -88,14 +88,14 @@ UINT32 mgolf_state::screen_update_mgolf(screen_device &screen, bitmap_ind16 &bit
/* draw sprites */
for (i = 0; i < 2; i++)
{
- m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
+ m_gfxdecode->gfx(1)->transpen(m_palette,bitmap,cliprect,
m_video_ram[0x399 + 4 * i],
i,
0, 0,
m_video_ram[0x390 + 2 * i] - 7,
m_video_ram[0x398 + 4 * i] - 16, 0);
- m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
+ m_gfxdecode->gfx(1)->transpen(m_palette,bitmap,cliprect,
m_video_ram[0x39b + 4 * i],
i,
0, 0,
@@ -283,12 +283,12 @@ static INPUT_PORTS_START( mgolf )
INPUT_PORTS_END
-void mgolf_state::palette_init()
+PALETTE_INIT_MEMBER(mgolf_state, mgolf)
{
- palette_set_color(machine(), 0, rgb_t(0x80, 0x80, 0x80));
- palette_set_color(machine(), 1, rgb_t(0x00, 0x00, 0x00));
- palette_set_color(machine(), 2, rgb_t(0x80, 0x80, 0x80));
- palette_set_color(machine(), 3, rgb_t(0xff, 0xff, 0xff));
+ palette.set_pen_color(0, rgb_t(0x80, 0x80, 0x80));
+ palette.set_pen_color(1, rgb_t(0x00, 0x00, 0x00));
+ palette.set_pen_color(2, rgb_t(0x80, 0x80, 0x80));
+ palette.set_pen_color(3, rgb_t(0xff, 0xff, 0xff));
}
static const gfx_layout tile_layout =
@@ -360,8 +360,8 @@ static MACHINE_CONFIG_START( mgolf, mgolf_state )
MCFG_SCREEN_UPDATE_DRIVER(mgolf_state, screen_update_mgolf)
MCFG_GFXDECODE_ADD("gfxdecode", mgolf)
- MCFG_PALETTE_LENGTH(4)
-
+ MCFG_PALETTE_ADD("palette", 4)
+ MCFG_PALETTE_INIT_OWNER(mgolf_state, mgolf)
/* sound hardware */
MACHINE_CONFIG_END