X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=main.c;h=de9534733e5d3623f79c475bc438b2193f4b6675;hp=662aa97cf2e15793ca0f4bd19edcd7b6e697ca4e;hb=0b36c07b7161b0f4d5f1ffe7dceb16b759395672;hpb=5653fa3092dd1821ca9f50cf85210de4d05a3cf9 diff --git a/main.c b/main.c index 662aa97..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,10 +1004,7 @@ int gameloop() { // Create a new ship and start all over again state = GAMEPLAY; play_tune(1); - // xship = 10; - // yship = YSIZE/2; - xvel = 3; - yvel = 0; + xship -= 50; break; case GAME_OVER: state = HIGH_SCORE_ENTRY; @@ -1053,6 +1052,7 @@ 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; @@ -1124,10 +1126,6 @@ int gameloop() { rock[i].y += rock[i].image->w; } if(rock[i].x < -32.0) rock[i].active = 0; - if(rock[i].xvel > 0) { - if(rock[i].y < 0 || rock[i].y > YSIZE) rock[i].active = 0; - if(rock[i].x > XSIZE) rock[i].active = 0; - } } @@ -1162,6 +1160,8 @@ int gameloop() { else { state = DEAD_PAUSE; state_timeout = 50.0; + xvel = 0; + yvel = 0; } } @@ -1176,6 +1176,7 @@ int gameloop() { for(i = 0; i