mirror of
https://github.com/holub/mame
synced 2025-05-21 05:08:54 +03:00
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:
parent
44583b05fd
commit
98f8897cba
@ -311,16 +311,20 @@ static const gfx_layout gfxlayout =
|
|||||||
};
|
};
|
||||||
|
|
||||||
static GFXDECODE_START( culture )
|
static GFXDECODE_START( culture )
|
||||||
GFXDECODE_ENTRY("gfx1", 0, gfxlayout, 0, 1 )
|
GFXDECODE_ENTRY("gfx1", 0, gfxlayout, 0x000, 1 )
|
||||||
GFXDECODE_ENTRY("gfx2", 0, gfxlayout, 0, 1 )
|
GFXDECODE_ENTRY("gfx2", 0, gfxlayout, 0x100, 1 )
|
||||||
GFXDECODE_ENTRY("gfx3", 0, gfxlayout, 0, 1 )
|
GFXDECODE_ENTRY("gfx3", 0, gfxlayout, 0x200, 1 )
|
||||||
GFXDECODE_END
|
GFXDECODE_END
|
||||||
|
|
||||||
|
|
||||||
//WRONG!
|
//WRONG!
|
||||||
static PALETTE_INIT( cultures )
|
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++)
|
for (c = 0; c < 256; c++)
|
||||||
{
|
{
|
||||||
int r,g,b,i;
|
int r,g,b,i;
|
||||||
@ -340,7 +344,8 @@ static PALETTE_INIT( cultures )
|
|||||||
|
|
||||||
x = ((x & 4) << 1) | ((x & 8) >> 1) | (x & 1);
|
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_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 0*8, 30*8-1)
|
||||||
|
|
||||||
MDRV_GFXDECODE(culture)
|
MDRV_GFXDECODE(culture)
|
||||||
MDRV_PALETTE_LENGTH(256)
|
MDRV_PALETTE_LENGTH(0x300)
|
||||||
|
|
||||||
MDRV_PALETTE_INIT(cultures)
|
MDRV_PALETTE_INIT(cultures)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user