- PutString(surf_screen,180,50,"High scores");
- for(i = 0; i<8; i++) {
- char s[1024];
- sprintf(s, "#%1d",i + 1);
- PutString(surf_screen, 150, 50 + (i + 2)*font_height,s);
- snprintscore(s, 1024, high[i].score);
- PutString(surf_screen, 200, 50 + (i + 2)*font_height,s);
- sprintf(s, "%3s", high[i].name);
- PutString(surf_screen, 330, 50 + (i + 2)*font_height,s);
- }
-
- }
-
- if(!gameover && state == GAMEPLAY) {
- SDL_LockSurface(surf_screen);
- raw_pixels = (Uint16 *) surf_screen->pixels;
- // Check that the black points on the ship are
- // still black, and not covered up by rocks.
- for(p = black_point; p<blackptr; p++) {
- offset = surf_screen->pitch/2 * (p->y + (int)yship) + p->x + (int)xship;
- if(raw_pixels[offset]) {
- // Set the bang flag
- bang = 1;
- }
- }
- SDL_UnlockSurface(surf_screen);
- }
-
- // Draw all the little ships
- if(state == GAMEPLAY || state == DEAD_PAUSE || state == GAME_OVER)
- for(i = 0; i<nships-1; i++) {
- src.w = surf_life->w;
- src.h = surf_life->h;
- dest.w = src.w;
- dest.h = src.h;
- dest.x = (i + 1)*(src.w + 10);
- dest.y = 20;
- SDL_BlitSurface(surf_life,&src,surf_screen,&dest);