Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/03/2011, 13:06
eric123
 
Fecha de Ingreso: marzo-2011
Mensajes: 4
Antigüedad: 13 años, 1 mes
Puntos: 0
Creando juegos SDL

hee estado investigando sobre como crear juegos y me he topado con la pagina http://www.lazyfoo.net y estoy en la leccion 2 pero no se exactamente que realizan estas dos cosas
SDL_Surface *load_image( std::string filename )<---------------------------------------------------
{
//Temporary storage for the image that's loaded
SDL_Surface* loadedImage = NULL;
//The optimized image that will be used
SDL_Surface* optimizedImage = NULL;
//Load the image
loadedImage = SDL_LoadBMP( filename.c_str() ); <------------------------------------
//If nothing went wrong in loading the image
if( loadedImage != NULL )
{
//Create an optimized image
optimizedImage = SDL_DisplayFormat( loadedImage );
//Free the old image SDL_FreeSurface( loadedImage );
}
Agradeceria mucho que me lo descrivieran de la forma mas sensilla posdible
Gracias