Update xevious.cpp

This commit is contained in:
MASH 2016-09-08 13:35:43 +01:00 committed by GitHub
parent cf4a7660c0
commit d6c0e170bf

View File

@ -97,78 +97,6 @@ PALETTE_INIT_MEMBER(xevious_state,xevious)
}
}
PALETTE_INIT_MEMBER(xevious_state,battles)
{
const UINT8 *color_prom = memregion("proms")->base();
int i;
for (i = 0;i < 128;i++)
{
int bit0,bit1,bit2,bit3,r,g,b;
/* red component */
bit0 = (color_prom[0] >> 0) & 0x01;
bit1 = (color_prom[0] >> 1) & 0x01;
bit2 = (color_prom[0] >> 2) & 0x01;
bit3 = (color_prom[0] >> 3) & 0x01;
r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
/* green component */
bit0 = (color_prom[256] >> 0) & 0x01;
bit1 = (color_prom[256] >> 1) & 0x01;
bit2 = (color_prom[256] >> 2) & 0x01;
bit3 = (color_prom[256] >> 3) & 0x01;
g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
/* blue component */
bit0 = (color_prom[2*256] >> 0) & 0x01;
bit1 = (color_prom[2*256] >> 1) & 0x01;
bit2 = (color_prom[2*256] >> 2) & 0x01;
bit3 = (color_prom[2*256] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
palette.set_indirect_color(i,rgb_t(r,g,b));
color_prom++;
}
/* color 0x80 is used by sprites to mark transparency */
palette.set_indirect_color(0x80,rgb_t(0,0,0));
color_prom += 128; /* the bottom part of the PROM is unused */
color_prom += 2*256;
/* color_prom now points to the beginning of the lookup table */
/* background tiles */
for (i = 0;i < TOTAL_COLORS(1);i++)
{
palette.set_pen_indirect(m_gfxdecode->gfx(1)->colorbase() + i,
(color_prom[0] & 0x0f) | ((color_prom[0x400] & 0x0f) << 4));
color_prom++;
}
color_prom += 0x600;
/* sprites */
for (i = 0;i < TOTAL_COLORS(2);i++)
{
int c = (color_prom[0] & 0x0f) | ((color_prom[0x400] & 0x0f) << 4);
palette.set_pen_indirect(m_gfxdecode->gfx(2)->colorbase() + i,
(c & 0x80) ? (c & 0x7f) : 0x80);
color_prom++;
}
/* foreground characters */
for (i = 0;i < TOTAL_COLORS(0);i++)
{
palette.set_pen_indirect(m_gfxdecode->gfx(0)->colorbase() + i,
(i % 2 != 0) ? (i / 2) : 0x80);
}
}
/***************************************************************************
Callbacks for the TileMap code