Exemplo n.º 1
0
static void shifter_set_palette(int pos)	// Set current palette to a given position in cycle
{
	int i, pos2;

	if ( pos<0 || pos>=shifter_max ) return;	// Ensure sanity
	mem_pal_copy( mem_pal, sh_old_pal );
	if ( pos==0 ) return;				// pos=0 => original state

	for ( i=0; i<8; i++ )				// Implement each of the shifts
	{
		pos2 = pos / (shifter_in[i][2]+1);	// Normalize the position shift for delay
		pal_shift( shifter_in[i][0], shifter_in[i][1], pos2 );
	}
}
Exemplo n.º 2
0
/* Set current palette to a given position in cycle */
static void shifter_set_palette(shifter_dd *dt, int pos)
{
	int i, pos2;

	mem_pal_copy(mem_pal, dt->old_pal);
	if (!pos) return;			// pos=0 => original state

	for (i = 0; i < NSHIFT; i++)		// Implement each of the shifts
	{
		// Normalize the position shift for delay
		pos2 = pos / (spins[i][2][0] + 1);
		pal_shift(dt->old_pal, spins[i][0][0], spins[i][1][0], pos2);
	}
}