diff options
author | Alex W. Jackson <alex.w.jackson@gmail.com> | 2014-03-15 07:34:54 +0000 |
---|---|---|
committer | Alex W. Jackson <alex.w.jackson@gmail.com> | 2014-03-15 07:34:54 +0000 |
commit | 25db822531d1e3533f9c65baa656a6b548a30082 (patch) | |
tree | 27008f49daa85c4e2bf76de9c83eb960817c7d15 /src/mame/drivers/namconb1.c | |
parent | 9a3885ad4e113354c87fc063908d8bd7e7a4699d (diff) |
Checkpoint 2:
gfxdecode devices must now be assigned a palette in MCFG. Added palette devices to several MESS drivers and devices to comply with this requirement. This palette is assigned as a default to the gfx_elements created by the device (but still not used for drawing yet, except in the UI graphics viewer)
Tilemaps now have a pointer to a palette device and use that palette for rgb32 drawing, rather than the palette of the screen or bitmap they are drawing to (since rgb32 screens don't have palettes now). When a tilemap is created, it takes its palette from the gfxdecode device it was created with, but you can change a tilemap's palette device with set_palette() at any time (doing this does not mark the tilemap dirty, since all tilemaps use indexed bitmaps internally)
Diffstat (limited to 'src/mame/drivers/namconb1.c')
-rw-r--r-- | src/mame/drivers/namconb1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mame/drivers/namconb1.c b/src/mame/drivers/namconb1.c index ee53347428d..4902e13fa2c 100644 --- a/src/mame/drivers/namconb1.c +++ b/src/mame/drivers/namconb1.c @@ -1162,7 +1162,7 @@ static MACHINE_CONFIG_START( namconb1, namconb1_state ) MCFG_SCREEN_UPDATE_DRIVER(namconb1_state, screen_update_namconb1) MCFG_SCREEN_PALETTE("palette") - MCFG_GFXDECODE_ADD("gfxdecode", namconb1) + MCFG_GFXDECODE_ADD("gfxdecode", "palette", namconb1) MCFG_PALETTE_ADD("palette", 0x2000) MCFG_PALETTE_ENABLE_SHADOWS() @@ -1197,7 +1197,7 @@ static MACHINE_CONFIG_START( namconb2, namconb1_state ) MCFG_SCREEN_UPDATE_DRIVER(namconb1_state, screen_update_namconb2) MCFG_SCREEN_PALETTE("palette") - MCFG_GFXDECODE_ADD("gfxdecode", 2) + MCFG_GFXDECODE_ADD("gfxdecode", "palette", 2) MCFG_PALETTE_ADD("palette", 0x2000) MCFG_PALETTE_ENABLE_SHADOWS() |