X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=main.c;h=de9534733e5d3623f79c475bc438b2193f4b6675;hp=71f014bed52edcfe3f5758f159e1f4ada1c40487;hb=0b36c07b7161b0f4d5f1ffe7dceb16b759395672;hpb=5abd974b9e8aee28979e797d52eb5a71dd8b10ff diff --git a/main.c b/main.c index 71f014b..de95347 100644 --- a/main.c +++ b/main.c @@ -54,6 +54,8 @@ struct rock_struct { // soon as it isn't we BLOW UP float x,y,xvel,yvel; int active; + int dead; // has been blown out of the way + // to make room for a new ship appearing. SDL_Surface *image; int type_number; float heat; @@ -1002,8 +1004,7 @@ int gameloop() { // Create a new ship and start all over again state = GAMEPLAY; play_tune(1); - xvel = 3; - yvel = 0; + xship -= 50; break; case GAME_OVER: state = HIGH_SCORE_ENTRY; @@ -1051,14 +1052,18 @@ int gameloop() { } else { if(state == DEAD_PAUSE) { float blast_radius = START_RAD * state_timeout / 50.0; + if(xship < 60) xship = 60; for(i = 0; i YSIZE)) rock[i].active = 0; if(rock[i].y > YSIZE) { rock[i].y -= YSIZE; rock[i].y -= rock[i].image->w; @@ -1154,8 +1160,6 @@ int gameloop() { else { state = DEAD_PAUSE; state_timeout = 50.0; - xship = 10; - yship = YSIZE/2; xvel = 0; yvel = 0; } @@ -1172,6 +1176,7 @@ int gameloop() { for(i = 0; i