Ive been looking for more ways to speed up my game using Hardware accelerated SDL, I have a 16bpp, SDL_HWSURFACE|SDL_DOUBLEBUF SetVideoMode, and all of my small copies are 16x16 sprites. Lots of my sprites have transparent parts, and Im loading them with IMG_Load as png files. It said to convert all surfaces Im copying to the main screen to the same format, my function is this: CODE
SDL_Surface *IMG_Load3(char *str)
{
temp = IMG_Load(str);
tem2 = SDL_DisplayFormat(temp);
SDL_FreeSurface(temp);
return tem2;
}
But all my transparent pixels are white or black, and some have a white line on the right edge. Is there a way around this?
Also: are there any other things I can do to speed it up?
SDL_Surface *IMG_Load3(char *str)
{
temp = IMG_Load(str);
tem2 = SDL_DisplayFormat(temp);
SDL_FreeSurface(temp);
return tem2;
}
But all my transparent pixels are white or black, and some have a white line on the right edge. Is there a way around this?
Also: are there any other things I can do to speed it up?