X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=main.c;h=60ee8f099c696ac34fe5514527ee7bde1dd5300c;hp=a2d7bee15a89930549191d8a34403c2b178d0654;hb=7981a2b8d152e6372aea8191f8c2197f866a450b;hpb=d887174053073d15b027fd5e25a14dd0d4df063a diff --git a/main.c b/main.c index a2d7bee..60ee8f0 100644 --- a/main.c +++ b/main.c @@ -19,7 +19,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#ifndef WIN32 +# include +#endif #include #include #include @@ -103,12 +105,12 @@ float state_timeout = 600.0; char *msgs[2][3] = { { "Press SPACE for normal game", - "Press 'e' for easy game", + "Press '1' for easy game", "http://jasonwoof.org/vor" }, { "Press SPACE for easy game", - "Press 'n' for normal game", + "Press '2' for normal game", "http://jasonwoof.org/vor" } }; @@ -339,7 +341,7 @@ load_image(char *filename) void load_ship(void) { - load_sprite(SPRITE(&ship), "sprites/ship.png"); + load_sprite(SPRITE(&ship), "ship.png"); } int @@ -391,18 +393,18 @@ init(void) { } // Load the banners - NULLERROR(surf_b_variations = load_image("banners/variations.png")); - NULLERROR(surf_b_on = load_image("banners/on.png")); - NULLERROR(surf_b_rockdodger = load_image("banners/rockdodger.png")); + NULLERROR(surf_b_variations = load_image("b_variations.png")); + NULLERROR(surf_b_on = load_image("b_on.png")); + NULLERROR(surf_b_rockdodger = load_image("b_rockdodger.png")); - NULLERROR(surf_b_game = load_image("banners/game.png")); - NULLERROR(surf_b_over = load_image("banners/over.png")); + NULLERROR(surf_b_game = load_image("b_game.png")); + NULLERROR(surf_b_over = load_image("b_over.png")); // Load the life indicator (small ship) graphic. - NULLERROR(surf_life = load_image("indicators/life.png")); + NULLERROR(surf_life = load_image("life.png")); // Load the font image - s = add_data_path(BIG_FONT_FILE); + s = add_data_path("font.png"); if(s) { NULLERROR(surf_font_big = IMG_Load(s)); free(s); @@ -692,20 +694,20 @@ gameloop() { } // new game - if((keystate[SDLK_SPACE] || keystate[SDLK_e] || keystate[SDLK_n]) + if((keystate[SDLK_SPACE] || keystate[SDLK_1] || keystate[SDLK_2]) && (state == HIGH_SCORE_DISPLAY || state == TITLE_PAGE || state == GAME_OVER)) { if(state == GAME_OVER && new_high_score(score)) init_score_entry(); else { - if((keystate[SDLK_SPACE] && !initial_rocks) || keystate[SDLK_n]) { + if((keystate[SDLK_SPACE] && !initial_rocks) || keystate[SDLK_2]) { g_easy = 0; initial_rocks = NORMAL_I_ROCKS; final_rocks = NORMAL_F_ROCKS; if(opt_gamespeed == EASY_GAMESPEED) opt_gamespeed = NORMAL_GAMESPEED; - } else if(keystate[SDLK_e]) { + } else if(keystate[SDLK_1]) { g_easy = 1; initial_rocks = EASY_I_ROCKS; final_rocks = EASY_F_ROCKS; @@ -765,7 +767,9 @@ gameloop() { int main(int argc, char **argv) { init_opts(); +#ifndef WIN32 argp_parse(&argp, argc, argv, 0, 0, 0); +#endif if(init()) { printf ("ta: '%s'\n",initerror);