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:
Franck Charlet
2008-10-21 01:44:46 +00:00
parent 2b232bbc48
commit c3182555b9
4 changed files with 65 additions and 112 deletions

View File

@@ -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