Mercurial > sdl-ios-xcode
diff test/testsprite.c @ 2792:c2d9b1aff59f
Show the grey background first before starting to blit sprites
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 27 Nov 2008 04:51:34 +0000 |
parents | 8c9fa61a521c |
children | 9de326b3099c |
line wrap: on
line diff
--- a/test/testsprite.c Wed Nov 26 21:59:35 2008 +0000 +++ b/test/testsprite.c Thu Nov 27 04:51:34 2008 +0000 @@ -247,7 +247,11 @@ velocities[i].y = (rand() % (MAX_SPEED * 2 + 1)) - MAX_SPEED; } } + + /* Clear the background to grey */ background = SDL_MapRGB(screen->format, 0xA0, 0xA0, 0xA0); + SDL_FillRect(screen, NULL, background); + SDL_Flip(screen); /* Print out information about our surfaces */ printf("Screen is at %d bits per pixel\n", screen->format->BitsPerPixel);