Show the grey background first before starting to blit sprites
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403253
This commit is contained in:
parent
84ebed84ce
commit
cba90d1ff7
1 changed files with 4 additions and 0 deletions
|
@ -247,7 +247,11 @@ main(int argc, char *argv[])
|
||||||
velocities[i].y = (rand() % (MAX_SPEED * 2 + 1)) - MAX_SPEED;
|
velocities[i].y = (rand() % (MAX_SPEED * 2 + 1)) - MAX_SPEED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Clear the background to grey */
|
||||||
background = SDL_MapRGB(screen->format, 0xA0, 0xA0, 0xA0);
|
background = SDL_MapRGB(screen->format, 0xA0, 0xA0, 0xA0);
|
||||||
|
SDL_FillRect(screen, NULL, background);
|
||||||
|
SDL_Flip(screen);
|
||||||
|
|
||||||
/* Print out information about our surfaces */
|
/* Print out information about our surfaces */
|
||||||
printf("Screen is at %d bits per pixel\n", screen->format->BitsPerPixel);
|
printf("Screen is at %d bits per pixel\n", screen->format->BitsPerPixel);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue