Palette now uses RGB components in the full 0-255 range instead of 0-63.

All palette functions can be used in HSL color space too (multi-select, etc).
Fixed some more missing refreshes in Palette screen.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@368 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2008-12-03 01:03:32 +00:00
parent bee5956c41
commit 14accb544b
15 changed files with 671 additions and 386 deletions

View File

@@ -633,9 +633,9 @@ byte * Surface_en_bytefield(SDL_Surface *Source, byte * Destination)
SDL_Color Conversion_couleur_SDL(byte Index)
{
SDL_Color Couleur;
Couleur.r = (Principal_Palette[Index].R<<2) + (Principal_Palette[Index].R>>4);
Couleur.g = (Principal_Palette[Index].V<<2) + (Principal_Palette[Index].V>>4);
Couleur.b = (Principal_Palette[Index].B<<2) + (Principal_Palette[Index].B>>4);
Couleur.r = Principal_Palette[Index].R;
Couleur.g = Principal_Palette[Index].V;
Couleur.b = Principal_Palette[Index].B;
Couleur.unused = 255;
return Couleur;
}