diff options
Diffstat (limited to 'src/mame/drivers/carjmbre.cpp')
-rw-r--r-- | src/mame/drivers/carjmbre.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/mame/drivers/carjmbre.cpp b/src/mame/drivers/carjmbre.cpp index 0c6a3b88e9e..57be932e911 100644 --- a/src/mame/drivers/carjmbre.cpp +++ b/src/mame/drivers/carjmbre.cpp @@ -53,8 +53,8 @@ class carjmbre_state : public driver_device { public: - carjmbre_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + carjmbre_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), m_videoram(*this, "videoram"), @@ -81,7 +81,7 @@ public: DECLARE_WRITE8_MEMBER(flipscreen_w); INTERRUPT_GEN_MEMBER(vblank_nmi); - DECLARE_PALETTE_INIT(carjmbre); + void carjmbre_palette(palette_device &palette) const; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); TILE_GET_INFO_MEMBER(get_tile_info); @@ -118,10 +118,10 @@ static const res_net_decode_info carjmbre_decode_info = { 1, // there may be two proms needed to construct color 0, 63, // start/end - // R, G, B, - { 0, 0, 0, }, // offsets - { 0, 3, 6, }, // shifts - {0x07,0x07,0x03, } // masks + // R, G, B + { 0, 0, 0 }, // offsets + { 0, 3, 6 }, // shifts + {0x07,0x07,0x03 } // masks }; static const res_net_info carjmbre_net_info = @@ -134,7 +134,7 @@ static const res_net_info carjmbre_net_info = } }; -PALETTE_INIT_MEMBER(carjmbre_state, carjmbre) +void carjmbre_state::carjmbre_palette(palette_device &palette) const { const uint8_t *color_prom = memregion("proms")->base(); std::vector<rgb_t> rgb; @@ -374,11 +374,10 @@ MACHINE_CONFIG_START(carjmbre_state::carjmbre) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) MCFG_SCREEN_UPDATE_DRIVER(carjmbre_state, screen_update) - MCFG_SCREEN_PALETTE("palette") + MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_carjmbre) - MCFG_PALETTE_ADD("palette", 64) - MCFG_PALETTE_INIT_OWNER(carjmbre_state, carjmbre) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_carjmbre); + PALETTE(config, m_palette, FUNC(carjmbre_state::carjmbre_palette), 64); /* sound hardware */ SPEAKER(config, "mono").front_center(); |