- // Draw a fully black background
- SDL_FillRect(surf_screen,NULL,0);
-
- // Draw the background dots
- drawdots(surf_screen);
-
- // Draw ship
- if(state == GAMEPLAY ) {
- dest.x = shipx;
- dest.y = shipy;
- SDL_BlitSurface(surf_ship,NULL,surf_screen,&dest);
+ 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);