SDL_Error(), however I can't figure out how to receive the information that returns. So, for now I am kind of lost on how to test for errors besides returning bools or values and ending the program. Is there someway to easily create another console for
printfor
coutstatements?
Thank you.
P.S. The error I'm having right now is that
SDL_LoadBMP("Filename")
is remaining NULL. I assume it is not finding the file somehow, but I am not 100% sure. I have remade the file a couple times, saved as different .bmp formats and also checked the code.Here is my load function, temp remains NULL and I can't figure it out:
SDL_Surface* Sprite::Load(char* File)
{
SDL_Surface* temp = NULL;
SDL_Surface* optimized = NULL;
temp = SDL_LoadBMP(File);
if(temp == NULL)
{
printf(SDL_GetError());
return NULL;
}
optimized = SDL_DisplayFormatAlpha(temp);
SDL_FreeSurface(temp);
return optimized;
}
Thank you!

New Topic/Question
Reply



MultiQuote



|