[SDL] is SDL slow or?

Nicolai Haehnle prefect_ at gmx.net
Fri Nov 22 05:16:18 PST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 22 November 2002 13:40, Rewsta wrote:
> do this,
> TEMP = SDL_LoadBMP("träd.bmp");
> back=SDL_DisplayFormat(Temp);   //convert to screen format
> TEMP = SDL_LoadBMP("mark_tiles.bmp");
> sprite=SDL_DisplayFormat(Temp);   //convert to screen format

Note that you'll have to perform SDL_FreeSurface(TEMP); twice in there, or 
you'll leak memory. Bill Kendrick already posted a correct version 
(complete with error checking), just thought I'd point that out again.

cu,
Nicolai
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE93i48sxPozBga0lwRAvJ0AJ9rhTfJey9H4u80MmlrUBDJ+DjK9gCgjUWR
qgn/8C1yIWsOMAXrG2V38J4=
=21I5
-----END PGP SIGNATURE-----





More information about the SDL mailing list