X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=main.c;h=43a993dd977230723cab26076eb43ec6cafab600;hp=4801df76373a811039e637e7b242ff78fdd157b8;hb=a4c0b4c3158f9ce4ea9473dff373cf3e25f388e7;hpb=5b505719142e9a18b0b7fd025a13e64d207d1c3a diff --git a/main.c b/main.c index 4801df7..43a993d 100644 --- a/main.c +++ b/main.c @@ -19,7 +19,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#undef DEBUG +#ifdef DEBUG +#include "debug.h" +#endif #include "config.h" #include "file.h" @@ -92,7 +94,6 @@ SDL_Surface *surf_ship, // Spaceship element *surf_life, // Indicator of number of ships remaining *surf_rock[NROCKS], // THE ROCKS - *surf_deadrock[NROCKS], // THE DEAD ROCKS *surf_font_big; // The big font SFont_Font *g_font; @@ -562,15 +563,11 @@ init(int fullscreen) { // Load all our lovely rocks for(i = 0; i 3)) { + continue; + } + dx = rock[i].x - shipx; dy = rock[i].y - shipy; + n = sqrt(dx*dx + dy*dy); if(n < blast_radius) { n *= 20; @@ -946,7 +963,7 @@ gameloop() { } else { state = DEAD_PAUSE; - state_timeout = 20.0; + state_timeout = DEAD_PAUSE_LENGTH; shipdx = 0; shipdy = 0; } @@ -1002,18 +1019,6 @@ gameloop() { if(keystate[SDLK_p] | keystate[SDLK_s]) { if(!pausedown) { paused = !paused; - if(paused) { - SDL_Rect src,dest; - src.w = surf_b_variations->w; - src.h = surf_b_variations->h; - dest.w = src.w; - dest.h = src.h; - dest.x = (XSIZE-src.w)/2; - dest.y = (YSIZE-src.h)/2; - SDL_BlitSurface(surf_b_variations,&src,surf_screen,&dest); - // Update the surface - SDL_Flip(surf_screen); - } pausedown = 1; } } else {