Esempio n. 1
0
/* PaletteEntryPanel::generatePalette
 * Just a helper for generatePalettes to make the code less redundant
 *******************************************************************/
void PaletteEntryPanel::generatePalette(int r, int g, int b, int shift, int steps)
{
	// Create a new palette
	Palette8bit* pal = new Palette8bit;
	if (pal == NULL) return;

	// Seed it with the basic palette
	pal->copyPalette(palettes[0]);

	// Tint palette with given values
	pal->idtint(r, g, b, shift, steps);

	// Add it to the palette list
	palettes.push_back(pal);
}