I noticed modifying the logical palette only wasn't effective in fullscreen mode so i modified the palette functions to act a little bit differently: the physical palette is only refreshed globally after all locals colors are modified, that should hopefully fix the speed issue as it looks like there's also a vblank wait when the physical palette is modified (that's how it acts on mac).
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@293 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
20
divers.c
20
divers.c
@@ -86,7 +86,16 @@ void Set_palette(T_Palette Palette)
|
||||
PaletteSDL[i].b=(Palette[i].B<<2) + (Palette[i].B>>4);
|
||||
}
|
||||
//SDL_PHYSPAL|
|
||||
SDL_SetPalette(Ecran_SDL,SDL_LOGPAL,PaletteSDL,0,256);
|
||||
SDL_SetPalette(Ecran_SDL, SDL_PHYSPAL | SDL_LOGPAL, PaletteSDL,0,256);
|
||||
}
|
||||
|
||||
void Set_color(byte Couleur, byte Rouge, byte Vert, byte Bleu)
|
||||
{
|
||||
SDL_Color comp;
|
||||
comp.r=Rouge << 2;
|
||||
comp.g=Vert << 2;
|
||||
comp.b=Bleu << 2;
|
||||
SDL_SetPalette(Ecran_SDL, SDL_LOGPAL, &comp, Couleur, 1);
|
||||
}
|
||||
|
||||
void Attendre_fin_de_click(void)
|
||||
@@ -788,15 +797,6 @@ void Tempo_jauge(byte Vitesse)
|
||||
}
|
||||
}
|
||||
|
||||
void Set_color(byte Couleur, byte Rouge, byte Vert, byte Bleu)
|
||||
{
|
||||
SDL_Color comp;
|
||||
comp.r=Rouge << 2;
|
||||
comp.g=Vert << 2;
|
||||
comp.b=Bleu << 2;
|
||||
SDL_SetPalette(Ecran_SDL, SDL_LOGPAL, &comp, Couleur, 1);
|
||||
}
|
||||
|
||||
void Scroll_picture(short Decalage_X,short Decalage_Y)
|
||||
{
|
||||
byte* esi = Ecran_backup; //Source de la copie
|
||||
|
||||
Reference in New Issue
Block a user