SDL_DisplayFormat()

implicit declaration of function int SDL_DisplaySurface(...)' assignment toSDL_Surface *’ from `int’ lacks a cast

SDL_Surface *gamebackground;

SDL_Surface *gametemp;

gametemp = SDL_LoadBMP(“gameback.bmp”);
gamebackground=SDL_DisplaySurface(gametemp); // Here is the problem!
SDL_FreeSurface(gametemp);

whats wrong?
you need more information?

SDL_DisplaySurface returns an “int”, or so the compiler thinks. I
don’t see any SDL functions by that name, so your compiler is probably
giving you a warning that it hasn’t seen the declaration for
SDL_DisplaySurface, so it will assume it is a one-parameter function
that returns an “int” and that it will be defined somewhere else…

I think you want SDL_DisplayFormat…–

Olivier A. Dagenais - Software Architect and Developer

“Dan” wrote in message
news:000b01c10630$ae1393c0$54f62ec3 at oemcomputer…

implicit declaration of function int SDL_DisplaySurface(...)' assignment toSDL_Surface *’ from `int’ lacks a cast

SDL_Surface *gamebackground;

SDL_Surface *gametemp;

gametemp = SDL_LoadBMP(“gameback.bmp”);
gamebackground=SDL_DisplaySurface(gametemp); // Here is the
problem!
SDL_FreeSurface(gametemp);

whats wrong?
you need more information?

gamebackground=SDL_DisplaySurface(gametemp); // Here is the problem!

Did you mean SDL_DisplayFormat()?

–ryan.