Mercurial > sdl-ios-xcode
comparison test/automated/surface/surface.c @ 3719:15373e31daff gsoc2009_unit_tests
Moved some code around.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Tue, 07 Jul 2009 16:28:42 +0000 |
parents | 9d71382713b5 |
children | 09bbf9dc41ed |
comparison
equal
deleted
inserted
replaced
3718:9d71382713b5 | 3719:15373e31daff |
---|---|
323 int i, j, ni, nj; | 323 int i, j, ni, nj; |
324 int mode; | 324 int mode; |
325 | 325 |
326 SDL_ATbegin( "Blit Test" ); | 326 SDL_ATbegin( "Blit Test" ); |
327 | 327 |
328 /* Create the blit surface. */ | 328 /* Create face surface. */ |
329 face = SDL_LoadBMP("../icon.bmp"); | |
330 if (SDL_ATassert( "SDL_CreateLoadBmp", face != NULL)) | |
331 return; | |
332 | |
333 /* Set transparent pixel as the pixel at (0,0) */ | |
334 if (face->format->palette) | |
335 SDL_SetColorKey(face, (SDL_SRCCOLORKEY | SDL_RLEACCEL), | |
336 *(Uint8 *) face->pixels); | |
337 /* | |
338 face = SDL_CreateRGBSurfaceFrom( (void*)img_face.pixel_data, | 329 face = SDL_CreateRGBSurfaceFrom( (void*)img_face.pixel_data, |
339 img_face.width, img_face.height, 32, img_face.width*4, | 330 img_face.width, img_face.height, 32, img_face.width*4, |
340 RMASK, GMASK, BMASK, AMASK ); | 331 RMASK, GMASK, BMASK, AMASK ); |
341 if (SDL_ATassert( "SDL_CreateRGBSurfaceFrom", face != NULL)) | 332 if (SDL_ATassert( "SDL_CreateRGBSurfaceFrom", face != NULL)) |
342 return; | 333 return; |
343 */ | |
344 | 334 |
345 /* Create the test surface. */ | 335 /* Create the test surface. */ |
346 testsur = SDL_CreateRGBSurface( 0, 80, 60, 32, | 336 testsur = SDL_CreateRGBSurface( 0, 80, 60, 32, |
347 RMASK, GMASK, BMASK, AMASK ); | 337 RMASK, GMASK, BMASK, AMASK ); |
348 if (SDL_ATassert( "SDL_CreateRGBSurface", testsur != NULL)) | 338 if (SDL_ATassert( "SDL_CreateRGBSurface", testsur != NULL)) |