rocks near starting position dissapear when you die so you can reapear safely
#define W 100
#define M 255
#define BIG_FONT_FILE "fonts/score.png"
#define W 100
#define M 255
#define BIG_FONT_FILE "fonts/score.png"
+#define STARTSPACE 430 // pixels from the left which will be cleared of rocks when you die
// }}}
// macros {{{
#define CONDERROR(a) if((a)) {initerror = strdup(SDL_GetError());return 1;}
// }}}
// macros {{{
#define CONDERROR(a) if((a)) {initerror = strdup(SDL_GetError());return 1;}
// Create a new ship and start all over again
state = GAMEPLAY;
play_tune(1);
// Create a new ship and start all over again
state = GAMEPLAY;
play_tune(1);
xship = 10;
yship = YSIZE/2;
xship = 10;
yship = YSIZE/2;
yvel = 0;
shieldlevel = 3*W;
yvel = 0;
shieldlevel = 3*W;
+ for(i = 0; i<MAXROCKS; i++ ) {
+ if(rock[i].x < STARTSPACE) {
+ rock[i].active = 0;
+ }
+ }
break;
case GAME_OVER:
state = HIGH_SCORE_ENTRY;
break;
case GAME_OVER:
state = HIGH_SCORE_ENTRY;
}
else {
state = DEAD_PAUSE;
}
else {
state = DEAD_PAUSE;
+ state_timeout = 50.0;
+