- // Draw the life indicators.
- if(state == GAMEPLAY || state == DEAD_PAUSE || state == GAME_OVER) {
- for(i = 0; i<ship.lives-1; i++) {
- dest.x = (i + 1)*(surf_life->w + 10);
- dest.y = 20;
- SDL_BlitSurface(surf_life, NULL, surf_screen, &dest);
- }
- }
+ SDL_FillRect(surf_screen,NULL,0); // black background
+ drawdots(surf_screen); // background dots
+ draw_sprite(SPRITE(&ship));
+ draw_rocks();