--- missile-1.0.1.old/Makefile +++ missile-1.0.1/Makefile @@ -19,9 +19,9 @@ # INSTALLATION DIRS: # binary will be installed to $game_prefix/$game_bin # data to $game_prefix/$game_data -game_prefix = /usr/local +game_prefix = __META_PREFIX__ game_bin = bin -game_data = share/missile +game_data = data game_icons = share/pixmaps # who the owner of the installed game will be --- missile-1.0.1.old/missile.c +++ missile-1.0.1/missile.c @@ -38,6 +38,7 @@ #define MAX_ITEMS_TO_UPDATE 30 SDL_Rect RECTS_TO_UPDATE[MAX_ITEMS_TO_UPDATE]; int LAST_RECT = 0; +int quitflag = 0; /* Sprites. Global because they're used in nearly every function */ SDL_Surface *SPRITE[NUMBER_SPRITES]; @@ -2353,11 +2354,12 @@ case SDL_KEYDOWN: key = event.key.keysym.sym; - if (key == QUIT) + if ((key == QUIT) || (key == SDLK_q)) { g->currentwave.endtime = 0; game_on = 0; g->gameover = 1; + quitflag = 1; } else if (key == SKIPWAVE) /* cheat: remove for version 1.0 */ g->wave_number++; @@ -2686,7 +2688,7 @@ { case SDL_KEYDOWN: key = event.key.keysym.sym; - if (key == QUIT) + if ((key == QUIT) || (key == SDLK_q)) running = 0; #ifdef ZAURUS else if (key == STARTGAME || key == STARTGAME2) @@ -2753,6 +2755,7 @@ if ( LAST_RECT == -1 ) LAST_RECT = 1; SDL_UpdateRects(screen, LAST_RECT, RECTS_TO_UPDATE); LAST_RECT = 0; + if (quitflag) break; SDL_Delay( 1000/FPS ); } --- missile-1.0.1.old/missile.h +++ missile-1.0.1/missile.h @@ -62,7 +62,7 @@ #ifndef DATA -#define DATA "/usr/local/share/missile" +#define DATA "__META_PREFIX__/data" #endif #define DATA_GFX "graphics" #define DATA_SFX "sound" @@ -142,7 +142,7 @@ #define SAM_EXPLOSION_VELOCITY 17.0 /* pixels/second */ #define SAM_EXPLOSION_RADIUS 20 /* pixels */ #else -#define SAM_VELOCITY 500.0 /* pixels/second */ +#define SAM_VELOCITY 450.0 /* pixels/second */ #define SAM_EXPLOSION_VELOCITY 35.0 /* pixels/second */ #define SAM_EXPLOSION_RADIUS 40 /* pixels */ #endif @@ -182,8 +182,8 @@ #define MISSILE_MAX_SPD 50 /* maximum possible missile speed */ #define MISSILE_MIN_SPD 20 /* minimum missile speed */ #else -#define MISSILE_MAX_SPD 100 /* maximum possible missile speed */ -#define MISSILE_MIN_SPD 40 /* minimum missile speed */ +#define MISSILE_MAX_SPD 65 /* maximum possible missile speed */ +#define MISSILE_MIN_SPD 30 /* minimum missile speed */ #endif // TODO: STEVE CHECK THIS OUT