summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/cball.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/cball.c')
-rw-r--r--src/mame/drivers/cball.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mame/drivers/cball.c b/src/mame/drivers/cball.c
index 2845eba7c33..2433a467a9b 100644
--- a/src/mame/drivers/cball.c
+++ b/src/mame/drivers/cball.c
@@ -40,7 +40,7 @@ public:
virtual void machine_start();
virtual void machine_reset();
virtual void video_start();
- virtual void palette_init();
+ DECLARE_PALETTE_INIT(cball);
UINT32 screen_update_cball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(interrupt_callback);
@@ -76,7 +76,7 @@ UINT32 cball_state::screen_update_cball(screen_device &screen, bitmap_ind16 &bit
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
/* draw sprite */
- m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
+ m_gfxdecode->gfx(1)->transpen(m_palette,bitmap,cliprect,
m_video_ram[0x399] >> 4,
0,
0, 0,
@@ -124,14 +124,14 @@ void cball_state::machine_reset()
}
-void cball_state::palette_init()
+PALETTE_INIT_MEMBER(cball_state, cball)
{
- 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_color(machine(), 4, rgb_t(0x80, 0x80, 0x80));
- palette_set_color(machine(), 5, rgb_t(0xc0, 0xc0, 0xc0));
+ 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));
+ palette.set_pen_color(4, rgb_t(0x80, 0x80, 0x80));
+ palette.set_pen_color(5, rgb_t(0xc0, 0xc0, 0xc0));
}
@@ -262,8 +262,8 @@ static MACHINE_CONFIG_START( cball, cball_state )
MCFG_SCREEN_UPDATE_DRIVER(cball_state, screen_update_cball)
MCFG_GFXDECODE_ADD("gfxdecode", cball)
- MCFG_PALETTE_LENGTH(6)
-
+ MCFG_PALETTE_ADD("palette", 6)
+ MCFG_PALETTE_INIT_OWNER(cball_state, cball)
/* sound hardware */
MACHINE_CONFIG_END