summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/mazerbla.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/mazerbla.cpp')
-rw-r--r--src/mame/drivers/mazerbla.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/mame/drivers/mazerbla.cpp b/src/mame/drivers/mazerbla.cpp
index 7e5b6ffc6e4..5ccac260c7e 100644
--- a/src/mame/drivers/mazerbla.cpp
+++ b/src/mame/drivers/mazerbla.cpp
@@ -157,7 +157,7 @@ private:
DECLARE_WRITE8_MEMBER(vsb_ls273_audio_control_w);
DECLARE_WRITE8_MEMBER(sound_int_clear_w);
DECLARE_WRITE8_MEMBER(gg_led_ctrl_w);
- DECLARE_PALETTE_INIT(mazerbla);
+ void mazerbla_palette(palette_device &palette);
uint32_t screen_update_mazerbla(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
INTERRUPT_GEN_MEMBER(sound_interrupt);
@@ -225,12 +225,12 @@ private:
***************************************************************************/
-PALETTE_INIT_MEMBER(mazerbla_state, mazerbla)
+void mazerbla_state::mazerbla_palette(palette_device &palette)
{
- static const int resistances_r[2] = { 4700, 2200 };
- static const int resistances_gb[3] = { 10000, 4700, 2200 };
+ static constexpr int resistances_r[2] = { 4700, 2200 };
+ static constexpr int resistances_gb[3] = { 10000, 4700, 2200 };
- /* just to calculate coefficients for later use */
+ // just to calculate coefficients for later use
compute_resistor_weights(0, 255, -1.0,
3, resistances_gb, m_weights_g, 3600, 0,
3, resistances_gb, m_weights_b, 3600, 0,
@@ -1011,8 +1011,7 @@ MACHINE_CONFIG_START(mazerbla_state::mazerbla)
MCFG_SCREEN_UPDATE_DRIVER(mazerbla_state, screen_update_mazerbla)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, mazerbla_state, screen_vblank))
- MCFG_PALETTE_ADD("palette", 256+1)
- MCFG_PALETTE_INIT_OWNER(mazerbla_state, mazerbla)
+ PALETTE(config, "palette", FUNC(mazerbla_state::mazerbla_palette), 256+1);
/* sound hardware */
MACHINE_CONFIG_END
@@ -1054,8 +1053,7 @@ MACHINE_CONFIG_START(mazerbla_state::greatgun)
MCFG_SCREEN_UPDATE_DRIVER(mazerbla_state, screen_update_mazerbla)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, mazerbla_state, screen_vblank))
- MCFG_PALETTE_ADD("palette", 256+1)
- MCFG_PALETTE_INIT_OWNER(mazerbla_state, mazerbla)
+ PALETTE(config, "palette", FUNC(mazerbla_state::mazerbla_palette), 246+1);
/* sound hardware */
SPEAKER(config, "mono").front_center();