Display is now using RGB range 0-255 instead of 0-250.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@160 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
2e3a9c387f
commit
204dee8549
6
divers.c
6
divers.c
@ -55,9 +55,9 @@ void Set_palette(T_Palette Palette)
|
|||||||
SDL_Color PaletteSDL[256];
|
SDL_Color PaletteSDL[256];
|
||||||
for(i=0;i<256;i++)
|
for(i=0;i<256;i++)
|
||||||
{
|
{
|
||||||
PaletteSDL[i].r=Palette[i].R*4; //Les couleurs VGA ne vont que de 0 à 63
|
PaletteSDL[i].r=(Palette[i].R<<2) + (Palette[i].R>>4); //Les couleurs VGA ne vont que de 0 à 63
|
||||||
PaletteSDL[i].g=Palette[i].V*4;
|
PaletteSDL[i].g=(Palette[i].V<<2) + (Palette[i].V>>4);
|
||||||
PaletteSDL[i].b=Palette[i].B*4;
|
PaletteSDL[i].b=(Palette[i].B<<2) + (Palette[i].B>>4);
|
||||||
}
|
}
|
||||||
SDL_SetPalette(Ecran_SDL,SDL_PHYSPAL|SDL_LOGPAL,PaletteSDL,0,256);
|
SDL_SetPalette(Ecran_SDL,SDL_PHYSPAL|SDL_LOGPAL,PaletteSDL,0,256);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user