From 204dee854991267a0d6b2eec0d6df935225a2c18 Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Wed, 17 Sep 2008 22:43:59 +0000 Subject: [PATCH] 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 --- divers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/divers.c b/divers.c index 25cd51c9..e1c06fb4 100644 --- a/divers.c +++ b/divers.c @@ -55,9 +55,9 @@ void Set_palette(T_Palette Palette) SDL_Color PaletteSDL[256]; for(i=0;i<256;i++) { - PaletteSDL[i].r=Palette[i].R*4; //Les couleurs VGA ne vont que de 0 à 63 - PaletteSDL[i].g=Palette[i].V*4; - PaletteSDL[i].b=Palette[i].B*4; + 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<<2) + (Palette[i].V>>4); + PaletteSDL[i].b=(Palette[i].B<<2) + (Palette[i].B>>4); } SDL_SetPalette(Ecran_SDL,SDL_PHYSPAL|SDL_LOGPAL,PaletteSDL,0,256); }