X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsetup.cpp;h=5465cf02ea1c632d127e35eb9e61b9c0e99c957b;hb=86d6fe09bcf7c97183cd146a7ee48bad1c9a43da;hp=d2866912635ee03f06a90d93178a489399023cf5;hpb=42310b31f51a176a6f11ea403a74a6b014b82ab2;p=supertux.git diff --git a/src/setup.cpp b/src/setup.cpp index d28669126..5465cf02e 100644 --- a/src/setup.cpp +++ b/src/setup.cpp @@ -62,6 +62,11 @@ #define DATA_PREFIX "./data/" #endif +/* Screen proprities: */ +/* Don't use this to test for the actual screen sizes. Use screen->w/h instead! */ +#define SCREEN_W 640 +#define SCREEN_H 480 + /* Local function prototypes: */ void seticon(void); @@ -382,7 +387,7 @@ void st_menu(void) main_menu->additem(MN_GOTO, "Start Game",0,load_game_menu, MNID_STARTGAME); main_menu->additem(MN_GOTO, "Contrib Levels",0,contrib_menu, MNID_CONTRIB); main_menu->additem(MN_GOTO, "Options",0,options_menu, MNID_OPTIONMENU); - main_menu->additem(MN_ACTION,"Level editor",0,0, MNID_LEVELEDITOR); + main_menu->additem(MN_ACTION,"Level Editor",0,0, MNID_LEVELEDITOR); main_menu->additem(MN_ACTION,"Credits",0,0, MNID_CREDITS); main_menu->additem(MN_ACTION,"Quit",0,0, MNID_QUITMAINMENU); @@ -391,7 +396,7 @@ void st_menu(void) #ifndef NOOPENGL options_menu->additem(MN_TOGGLE,"OpenGL",use_gl,0, MNID_OPENGL); #else - options_menu->additem(MN_DEACTIVE,"OpenGL (not supported)",use_gl,MNID_OPENGL); + options_menu->additem(MN_DEACTIVE,"OpenGL (not supported)",use_gl, 0, MNID_OPENGL); #endif options_menu->additem(MN_TOGGLE,"Fullscreen",use_fullscreen,0, MNID_FULLSCREEN); if(audio_device) @@ -405,9 +410,11 @@ void st_menu(void) options_menu->additem(MN_DEACTIVE,"Music ", false,0, MNID_MUSIC); } options_menu->additem(MN_TOGGLE,"Show FPS ",show_fps,0, MNID_SHOWFPS); - options_menu->additem(MN_GOTO,"Key Setup",0,options_keys_menu); - if(use_joystick) - options_menu->additem(MN_GOTO,"Joystick Setup",0,options_joystick_menu); + options_menu->additem(MN_GOTO,"Keyboard Setup",0,options_keys_menu); + + //if(use_joystick) + // options_menu->additem(MN_GOTO,"Joystick Setup",0,options_joystick_menu); + options_menu->additem(MN_HL,"",0,0); options_menu->additem(MN_BACK,"Back",0,0); @@ -417,7 +424,7 @@ void st_menu(void) options_keys_menu->additem(MN_CONTROLFIELD,"Right move", 0,0, 0,&keymap.right); options_keys_menu->additem(MN_CONTROLFIELD,"Jump", 0,0, 0,&keymap.jump); options_keys_menu->additem(MN_CONTROLFIELD,"Duck", 0,0, 0,&keymap.duck); - options_keys_menu->additem(MN_CONTROLFIELD,"Power", 0,0, 0,&keymap.fire); + options_keys_menu->additem(MN_CONTROLFIELD,"Power/Run", 0,0, 0,&keymap.fire); options_keys_menu->additem(MN_HL,"",0,0); options_keys_menu->additem(MN_BACK,"Back",0,0); @@ -465,7 +472,6 @@ void st_menu(void) worldmap_menu->additem(MN_LABEL,"Pause",0,0); worldmap_menu->additem(MN_HL,"",0,0); worldmap_menu->additem(MN_ACTION,"Continue",0,0,MNID_RETURNWORLDMAP); - worldmap_menu->additem(MN_ACTION,"Save",0,0,MNID_SAVEGAME); worldmap_menu->additem(MN_GOTO,"Options",0,options_menu); worldmap_menu->additem(MN_HL,"",0,0); worldmap_menu->additem(MN_ACTION,"Quit Game",0,0,MNID_QUITWORLDMAP); @@ -579,6 +585,7 @@ void st_general_setup(void) gold_text = new Text(datadir + "/images/status/letters-gold.png", TEXT_TEXT, 16,18); blue_text = new Text(datadir + "/images/status/letters-blue.png", TEXT_TEXT, 16,18); red_text = new Text(datadir + "/images/status/letters-red.png", TEXT_TEXT, 16,18); + green_text = new Text(datadir + "/images/status/letters-green.png", TEXT_TEXT, 16,18); white_text = new Text(datadir + "/images/status/letters-white.png", TEXT_TEXT, 16,18); white_small_text = new Text(datadir + "/images/status/letters-white-small.png", TEXT_TEXT, 8,9); white_big_text = new Text(datadir + "/images/status/letters-white-big.png", TEXT_TEXT, 20,23); @@ -605,6 +612,7 @@ void st_general_free(void) delete white_text; delete blue_text; delete red_text; + delete green_text; delete white_small_text; delete white_big_text; delete yellow_nums; @@ -662,7 +670,7 @@ void st_video_setup_sdl(void) if (use_fullscreen) { - screen = SDL_SetVideoMode(640, 480, 0, SDL_FULLSCREEN ) ; /* | SDL_HWSURFACE); */ + screen = SDL_SetVideoMode(SCREEN_W, SCREEN_H, 0, SDL_FULLSCREEN ) ; /* | SDL_HWSURFACE); */ if (screen == NULL) { fprintf(stderr, @@ -675,7 +683,7 @@ void st_video_setup_sdl(void) } else { - screen = SDL_SetVideoMode(640, 480, 0, SDL_HWSURFACE | SDL_DOUBLEBUF ); + screen = SDL_SetVideoMode(SCREEN_W, SCREEN_H, 0, SDL_HWSURFACE | SDL_DOUBLEBUF ); if (screen == NULL) { @@ -700,7 +708,7 @@ void st_video_setup_gl(void) if (use_fullscreen) { - screen = SDL_SetVideoMode(640, 480, 0, SDL_FULLSCREEN | SDL_OPENGL) ; /* | SDL_HWSURFACE); */ + screen = SDL_SetVideoMode(SCREEN_W, SCREEN_H, 0, SDL_FULLSCREEN | SDL_OPENGL) ; /* | SDL_HWSURFACE); */ if (screen == NULL) { fprintf(stderr, @@ -713,7 +721,7 @@ void st_video_setup_gl(void) } else { - screen = SDL_SetVideoMode(640, 480, 0, SDL_OPENGL); + screen = SDL_SetVideoMode(SCREEN_W, SCREEN_H, 0, SDL_OPENGL); if (screen == NULL) { @@ -967,9 +975,9 @@ void parseargs(int argc, char * argv[]) << " Start-Button: " << joystick_keymap.start_button << std::endl; } } - else if (strcmp(argv[i], "--worldmap") == 0) + else if (strcmp(argv[i], "--leveleditor") == 0) { - launch_worldmap_mode = true; + launch_leveleditor_mode = true; } else if (strcmp(argv[i], "--datadir") == 0 || strcmp(argv[i], "-d") == 0 ) @@ -1046,8 +1054,8 @@ void parseargs(int argc, char * argv[]) "Misc Options:\n" " -j, --joystick NUM Use joystick NUM (default: 0)\n" " --joymap XAXIS:YAXIS:A:B:START\n" + " --leveleditor Opens the leveleditor in a file. (Only works when a file is provided.)\n" " Define how joystick buttons and axis should be mapped\n" - " --worldmap Start in worldmap-mode (EXPERIMENTAL)\n" " -d, --datadir DIR Load Game data from DIR (default: automatic)\n" " --debug-mode Enables the debug-mode, which is useful for developers.\n" " --help Display a help message summarizing command-line\n"