- reset_sprites();
- reset_rocks();
- screendx = SCREENDXMIN; screendy = 0;
-
- ship.x = XSIZE/2.2; ship.y = YSIZE/2;
- ship.dx = screendx; ship.dy = screendy;
- ship.lives = 4;
- ship.flags = MOVE|DRAW|COLLIDE;
- SDL_SetAlpha(ship.image, SDL_SRCALPHA, SDL_ALPHA_OPAQUE);
- add_sprite(SPRITE(&ship));
-
- score = 0;
-
- state = GAMEPLAY;
- play_tune(TUNE_GAMEPLAY);
+ if(state == GAME_OVER && new_high_score(score))
+ init_score_entry();
+ else {
+ reset_sprites();
+ reset_rocks();
+ screendx = SCREENDXMIN; screendy = 0;
+
+ ship.x = XSIZE/2.2; ship.y = YSIZE/2;
+ ship.dx = screendx; ship.dy = screendy;
+ ship.lives = 4;
+ ship.flags = MOVE|DRAW|COLLIDE;
+ SDL_SetAlpha(ship.image, SDL_SRCALPHA, SDL_ALPHA_OPAQUE);
+ add_sprite(SPRITE(&ship));
+
+ score = 0;
+
+ state = GAMEPLAY;
+ play_tune(TUNE_GAMEPLAY);
+ }