summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/warpsped.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/warpsped.cpp')
-rw-r--r--src/mame/drivers/warpsped.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/mame/drivers/warpsped.cpp b/src/mame/drivers/warpsped.cpp
index 85e584710fd..410bfe1f5eb 100644
--- a/src/mame/drivers/warpsped.cpp
+++ b/src/mame/drivers/warpsped.cpp
@@ -93,12 +93,13 @@ L10, L15, L18 and G18 all read the same
class warpspeed_state : public driver_device
{
public:
- warpspeed_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ warpspeed_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_videoram(*this, "videoram"),
- m_workram(*this, "workram") { }
+ m_workram(*this, "workram")
+ { }
void warpspeed(machine_config &config);
@@ -120,7 +121,7 @@ private:
TILE_GET_INFO_MEMBER(get_starfield_tile_info);
virtual void video_start() override;
- DECLARE_PALETTE_INIT(warpspeed);
+ void warpsped_palette(palette_device &palette) const;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_circles(bitmap_ind16 &bitmap);
@@ -310,17 +311,15 @@ static GFXDECODE_START( gfx_warpspeed )
GFXDECODE_ENTRY( "gfx2", 0, charlayout, 0, 1 )
GFXDECODE_END
-PALETTE_INIT_MEMBER(warpspeed_state, warpspeed)
+void warpspeed_state::warpsped_palette(palette_device &palette) const
{
// tilemaps
- palette.set_pen_color(0,rgb_t::black()); /* black */
- palette.set_pen_color(1,rgb_t::white()); /* white */
+ palette.set_pen_color(0, rgb_t::black()); // black
+ palette.set_pen_color(1, rgb_t::white()); // white
// circles
- for ( int i = 0; i < 8; i++ )
- {
- palette.set_pen_color(2 + i, 0xff*BIT(i,0), 0xff*BIT(i,1), 0xff*BIT(i,2));
- }
+ for (int i = 0; i < 8; i++)
+ palette.set_pen_color(2 + i, 0xff * BIT(i, 0), 0xff * BIT(i, 1), 0xff * BIT(i, 2));
}
MACHINE_CONFIG_START(warpspeed_state::warpspeed)
@@ -340,9 +339,8 @@ MACHINE_CONFIG_START(warpspeed_state::warpspeed)
MCFG_SCREEN_PALETTE("palette")
MCFG_SCREEN_UPDATE_DRIVER(warpspeed_state, screen_update)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_warpspeed)
- MCFG_PALETTE_ADD("palette", 2+8)
- MCFG_PALETTE_INIT_OWNER(warpspeed_state, warpspeed)
+ GFXDECODE(config, m_gfxdecode, "palette", gfx_warpspeed);
+ PALETTE(config, "palette", FUNC(warpspeed_state::warpsped_palette), 2 + 8);
MACHINE_CONFIG_END
ROM_START( warpsped )