moved around code, workaround internal compiler error with 32bit official build tools

This commit is contained in:
Michaël Banaan Ananas 2010-06-26 16:36:34 +00:00
parent f4d1f7df71
commit 259baecffc

View File

@ -30,65 +30,6 @@
***************************************************************************/
PALETTE_INIT( mappy )
{
static const int resistances[3] = { 1000, 470, 220 };
double rweights[3], gweights[3], bweights[2];
int i;
/* compute the color output resistor weights */
compute_resistor_weights(0, 255, -1.0,
3, &resistances[0], rweights, 0, 0,
3, &resistances[0], gweights, 0, 0,
2, &resistances[1], bweights, 0, 0);
/* allocate the colortable */
machine->colortable = colortable_alloc(machine, 32);
/* create a lookup table for the palette */
for (i = 0; i < 32; i++)
{
int bit0, bit1, bit2;
int r, g, b;
/* red component */
bit0 = (color_prom[i] >> 0) & 0x01;
bit1 = (color_prom[i] >> 1) & 0x01;
bit2 = (color_prom[i] >> 2) & 0x01;
r = combine_3_weights(rweights, bit0, bit1, bit2);
/* green component */
bit0 = (color_prom[i] >> 3) & 0x01;
bit1 = (color_prom[i] >> 4) & 0x01;
bit2 = (color_prom[i] >> 5) & 0x01;
g = combine_3_weights(gweights, bit0, bit1, bit2);
/* blue component */
bit0 = (color_prom[i] >> 6) & 0x01;
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(bweights, bit0, bit1);
colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
color_prom += 32;
/* characters map to the upper 16 palette entries */
for (i = 0*4; i < 64*4; i++)
{
UINT8 ctabentry = color_prom[i] & 0x0f;
colortable_entry_set_value(machine->colortable, i, ctabentry + 0x10);
}
/* sprites map to the lower 16 palette entries */
for (i = 64*4; i < machine->config->total_colors; i++)
{
UINT8 ctabentry = color_prom[i] & 0x0f;
colortable_entry_set_value(machine->colortable, i, ctabentry);
}
}
PALETTE_INIT( superpac )
{
static const int resistances[3] = { 1000, 470, 220 };
@ -148,6 +89,65 @@ PALETTE_INIT( superpac )
}
}
PALETTE_INIT( mappy )
{
static const int resistances[3] = { 1000, 470, 220 };
double rweights[3], gweights[3], bweights[2];
int i;
/* compute the color output resistor weights */
compute_resistor_weights(0, 255, -1.0,
3, &resistances[0], rweights, 0, 0,
3, &resistances[0], gweights, 0, 0,
2, &resistances[1], bweights, 0, 0);
/* allocate the colortable */
machine->colortable = colortable_alloc(machine, 32);
/* create a lookup table for the palette */
for (i = 0; i < 32; i++)
{
int bit0, bit1, bit2;
int r, g, b;
/* red component */
bit0 = (color_prom[i] >> 0) & 0x01;
bit1 = (color_prom[i] >> 1) & 0x01;
bit2 = (color_prom[i] >> 2) & 0x01;
r = combine_3_weights(rweights, bit0, bit1, bit2);
/* green component */
bit0 = (color_prom[i] >> 3) & 0x01;
bit1 = (color_prom[i] >> 4) & 0x01;
bit2 = (color_prom[i] >> 5) & 0x01;
g = combine_3_weights(gweights, bit0, bit1, bit2);
/* blue component */
bit0 = (color_prom[i] >> 6) & 0x01;
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(bweights, bit0, bit1);
colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
color_prom += 32;
/* characters map to the upper 16 palette entries */
for (i = 0*4; i < 64*4; i++)
{
UINT8 ctabentry = color_prom[i] & 0x0f;
colortable_entry_set_value(machine->colortable, i, ctabentry + 0x10);
}
/* sprites map to the lower 16 palette entries */
for (i = 64*4; i < machine->config->total_colors; i++)
{
UINT8 ctabentry = color_prom[i] & 0x0f;
colortable_entry_set_value(machine->colortable, i, ctabentry);
}
}
/***************************************************************************