Converted cultures driver to have separated color tables for each plane.

(yes I did a quick test,current implementation makes (for example) human skin colors memory address to be equal to the palaces colors memory address in the intro)
This commit is contained in:
Angelo Salese 2008-11-15 18:01:40 +00:00
parent 44583b05fd
commit 98f8897cba

View File

@ -311,16 +311,20 @@ static const gfx_layout gfxlayout =
};
static GFXDECODE_START( culture )
GFXDECODE_ENTRY("gfx1", 0, gfxlayout, 0, 1 )
GFXDECODE_ENTRY("gfx2", 0, gfxlayout, 0, 1 )
GFXDECODE_ENTRY("gfx3", 0, gfxlayout, 0, 1 )
GFXDECODE_ENTRY("gfx1", 0, gfxlayout, 0x000, 1 )
GFXDECODE_ENTRY("gfx2", 0, gfxlayout, 0x100, 1 )
GFXDECODE_ENTRY("gfx3", 0, gfxlayout, 0x200, 1 )
GFXDECODE_END
//WRONG!
static PALETTE_INIT( cultures )
{
int c,x;
int c,x,plane;
/*every plane appears to use his dedicated color table*/
for(plane = 0;plane < 0x300;plane+=0x100)
{
for (c = 0; c < 256; c++)
{
int r,g,b,i;
@ -340,7 +344,8 @@ static PALETTE_INIT( cultures )
x = ((x & 4) << 1) | ((x & 8) >> 1) | (x & 1);
palette_set_color_rgb(machine, x | (((c << 4) & 0xf0) ^ 0), pal4bit(r), pal4bit(g), pal4bit(b));
palette_set_color_rgb(machine, plane+(x | (((c << 4) & 0xf0) ^ 0)), pal4bit(r), pal4bit(g), pal4bit(b));
}
}
}
@ -376,7 +381,7 @@ static MACHINE_DRIVER_START( cultures )
MDRV_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 0*8, 30*8-1)
MDRV_GFXDECODE(culture)
MDRV_PALETTE_LENGTH(256)
MDRV_PALETTE_LENGTH(0x300)
MDRV_PALETTE_INIT(cultures)