Previous 199869 Revisions Next

r39977 Monday 27th July, 2015 at 16:20:20 UTC by Dirk Best
4enraya: use standard 3-bit rgb palette
[src/mame/drivers]4enraya.c
[src/mame/includes]4enraya.h
[src/mame/video]4enraya.c

trunk/src/mame/drivers/4enraya.c
r248488r248489
442442
443443   MCFG_GFXDECODE_ADD("gfxdecode", "palette", 4enraya)
444444
445   MCFG_PALETTE_ADD("palette", 8)
446   MCFG_PALETTE_INIT_OWNER(_4enraya_state, _4enraya)
445   MCFG_PALETTE_ADD_3BIT_RGB("palette")
447446
448447   /* sound hardware */
449448   MCFG_SPEAKER_STANDARD_MONO("mono")
trunk/src/mame/includes/4enraya.h
r248488r248489
4444   DECLARE_WRITE8_MEMBER(sound_control_w);
4545   DECLARE_DRIVER_INIT(unkpacg);
4646   TILE_GET_INFO_MEMBER(get_tile_info);
47   DECLARE_PALETTE_INIT(_4enraya);
4847   UINT32 screen_update_4enraya(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
4948
5049   virtual void machine_start();
trunk/src/mame/video/4enraya.c
r248488r248489
1818   m_bg_tilemap->mark_tile_dirty(offset & 0x3ff);
1919}
2020
21PALETTE_INIT_MEMBER(_4enraya_state, _4enraya)
22{
23   /* RGB format */
24   for (int i = 0; i < 8; i++)
25      m_palette->set_pen_color(i, rgb_t(pal1bit(i >> 0),pal1bit(i >> 1),pal1bit(i >> 2)));
26}
27
2821TILE_GET_INFO_MEMBER(_4enraya_state::get_tile_info)
2922{
3023   int code = m_videoram[tile_index * 2] + (m_videoram[tile_index * 2 + 1] << 8);


Previous 199869 Revisions Next


© 1997-2024 The MAME Team