From: <au...@us...> - 2010-02-25 00:40:32
|
Revision: 4837 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4837&view=rev Author: auria Date: 2010-02-25 00:40:25 +0000 (Thu, 25 Feb 2010) Log Message: ----------- Fixed STK to not stumble upon command-line arguments that the OS X Finder might pass to the process Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2010-02-25 00:16:06 UTC (rev 4836) +++ main/trunk/src/main.cpp 2010-02-25 00:40:25 UTC (rev 4837) @@ -462,6 +462,10 @@ else if( !strcmp(argv[i], "--fullscreen") || !strcmp(argv[i], "-f")) {} else if( !strcmp(argv[i], "--windowed") || !strcmp(argv[i], "-w")) {} else if( !strcmp(argv[i], "--version") || !strcmp(argv[i], "-v")) {} +#ifdef __APPLE__ + // on OS X, sometimes the Finder will pass a -psn* something parameter to the application + else if( strncmp(argv[i], "-psn", 3) == 0) {} +#endif else { fprintf ( stderr, "Invalid parameter: %s.\n\n", argv[i] ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-07-25 22:36:00
|
Revision: 5707 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5707&view=rev Author: hikerstk Date: 2010-07-25 22:35:53 +0000 (Sun, 25 Jul 2010) Log Message: ----------- Added --gp option to start a GP from the command line. Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2010-07-22 22:51:46 UTC (rev 5706) +++ main/trunk/src/main.cpp 2010-07-25 22:35:53 UTC (rev 5707) @@ -82,6 +82,7 @@ "Options:\n" " -N, --no-start-screen Immediatgely start race without showing a menu.\n" " -t, --track NAME Start at track NAME (see --list-tracks).\n" + " --gp name Start the specified Grand Prix." " --stk-config FILE use ./data/FILE instead of ./data/stk_config.xml\n" " -l, --list-tracks Show available tracks.\n" " -k, --numkarts NUM Number of karts on the racetrack.\n" @@ -334,6 +335,13 @@ } i++; } + else if( (!strcmp(argv[i], "--gp")) && i+1<argc) + { + race_manager->setMajorMode(RaceManager::MAJOR_MODE_GRAND_PRIX); + const GrandPrixData *gp = grand_prix_manager->getGrandPrix(argv[i+1]); + race_manager->setGrandPrix(*gp); + i++; + } else if( (!strcmp(argv[i], "--stk-config")) && i+1<argc ) { stk_config->load(file_manager->getConfigFile(argv[i+1])); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-09-15 00:38:14
|
Revision: 6008 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=6008&view=rev Author: hikerstk Date: 2010-09-15 00:38:07 +0000 (Wed, 15 Sep 2010) Log Message: ----------- Fixed 'tabs' in file. Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2010-09-15 00:31:05 UTC (rev 6007) +++ main/trunk/src/main.cpp 2010-09-15 00:38:07 UTC (rev 6008) @@ -259,15 +259,15 @@ { for(unsigned int i=0; i<kart_properties_manager->getNumberOfKarts(); i++) - { - const KartProperties *km = kart_properties_manager->getKartById(i); - printf("%s:\t%swidth: %f length: %f height: %f\n", - km->getIdent().c_str(), - (km->getIdent().size()<7) ? "\t" : "", - km->getMasterKartModel().getWidth(), - km->getMasterKartModel().getLength(), - km->getMasterKartModel().getHeight()); - } + { + const KartProperties *km = kart_properties_manager->getKartById(i); + printf("%s:\t%swidth: %f length: %f height: %f\n", + km->getIdent().c_str(), + (km->getIdent().size()<7) ? "\t" : "", + km->getMasterKartModel().getWidth(), + km->getMasterKartModel().getLength(), + km->getMasterKartModel().getHeight()); + } } else if(!strcmp(argv[i], "--check-debug")) { @@ -560,7 +560,7 @@ network_manager = new NetworkManager (); #ifdef ADDONS_MANAGER network_http = new NetworkHttp (); - addons_manager = new Addons (); + addons_manager = new Addons (); #endif stk_config->load(file_manager->getConfigFile("stk_config.xml")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-09-16 05:48:33
|
Revision: 6025 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=6025&view=rev Author: hikerstk Date: 2010-09-16 05:48:26 +0000 (Thu, 16 Sep 2010) Log Message: ----------- Added number of mesh buffers to --kartsize-debug. Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2010-09-16 03:53:09 UTC (rev 6024) +++ main/trunk/src/main.cpp 2010-09-16 05:48:26 UTC (rev 6025) @@ -261,12 +261,13 @@ i++) { const KartProperties *km = kart_properties_manager->getKartById(i); - printf("%s:\t%swidth: %f length: %f height: %f\n", + printf("%s:\t%swidth: %f length: %f height: %f mesh-buffer count %d\n", km->getIdent().c_str(), (km->getIdent().size()<7) ? "\t" : "", km->getMasterKartModel().getWidth(), km->getMasterKartModel().getLength(), - km->getMasterKartModel().getHeight()); + km->getMasterKartModel().getHeight(), + km->getMasterKartModel().getModel()->getMeshBufferCount()); } } else if(!strcmp(argv[i], "--check-debug")) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-09-19 19:30:20
|
Revision: 6071 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=6071&view=rev Author: auria Date: 2010-09-19 19:30:14 +0000 (Sun, 19 Sep 2010) Log Message: ----------- More icons to the shiny loading screen ;) Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2010-09-19 19:22:43 UTC (rev 6070) +++ main/trunk/src/main.cpp 2010-09-19 19:30:14 UTC (rev 6071) @@ -557,7 +557,13 @@ item_manager = new ItemManager (); attachment_manager = new AttachmentManager (); highscore_manager = new HighscoreManager (); + grand_prix_manager = new GrandPrixManager (); + // Consistency check for challenges, and enable all challenges + // that have all prerequisites fulfilled + grand_prix_manager->checkConsistency(); + GUIEngine::addLoadingIcon( irr_driver->getTexture(file_manager->getTextureFile("cup_gold.png")) ); + network_manager = new NetworkManager (); #ifdef ADDONS_MANAGER network_http = new NetworkHttp (); @@ -568,6 +574,8 @@ track_manager->loadTrackList(); music_manager->addMusicToTracks(); + GUIEngine::addLoadingIcon( irr_driver->getTexture(file_manager->getTextureFile("notes.png")) ); + race_manager = new RaceManager (); // default settings for Quickstart race_manager->setNumPlayers(1); @@ -579,9 +587,6 @@ //menu_manager= new MenuManager(); - // Consistency check for challenges, and enable all challenges - // that have all prerequisites fulfilled - grand_prix_manager->checkConsistency(); #ifdef ADDONS_MANAGER KartPropertiesManager::addKartSearchDir(file_manager->getAddonsDir() + "/data/karts/"); std::cout << "addons dir:" << file_manager->getAddonsDir() + "/data/karts/" << std::endl; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-09-20 17:36:19
|
Revision: 6088 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=6088&view=rev Author: auria Date: 2010-09-20 17:36:12 +0000 (Mon, 20 Sep 2010) Log Message: ----------- Fixed empty GP list Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2010-09-20 17:36:02 UTC (rev 6087) +++ main/trunk/src/main.cpp 2010-09-20 17:36:12 UTC (rev 6088) @@ -557,13 +557,6 @@ item_manager = new ItemManager (); attachment_manager = new AttachmentManager (); highscore_manager = new HighscoreManager (); - - grand_prix_manager = new GrandPrixManager (); - // Consistency check for challenges, and enable all challenges - // that have all prerequisites fulfilled - grand_prix_manager->checkConsistency(); - GUIEngine::addLoadingIcon( irr_driver->getTexture(file_manager->getTextureFile("cup_gold.png")) ); - network_manager = new NetworkManager (); #ifdef ADDONS_MANAGER network_http = new NetworkHttp (); @@ -576,6 +569,12 @@ GUIEngine::addLoadingIcon( irr_driver->getTexture(file_manager->getTextureFile("notes.png")) ); + grand_prix_manager = new GrandPrixManager (); + // Consistency check for challenges, and enable all challenges + // that have all prerequisites fulfilled + grand_prix_manager->checkConsistency(); + GUIEngine::addLoadingIcon( irr_driver->getTexture(file_manager->getTextureFile("cup_gold.png")) ); + race_manager = new RaceManager (); // default settings for Quickstart race_manager->setNumPlayers(1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-12-16 22:28:39
|
Revision: 7042 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7042&view=rev Author: hikerstk Date: 2010-12-16 22:28:33 +0000 (Thu, 16 Dec 2010) Log Message: ----------- Fixed compilation problems when not using addon manager. Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2010-12-16 21:59:06 UTC (rev 7041) +++ main/trunk/src/main.cpp 2010-12-16 22:28:33 UTC (rev 7042) @@ -611,7 +611,9 @@ //delete in reverse order of what they were created in. //see InitTuxkart() if(race_manager) delete race_manager; +#ifdef ADDONS_MANAGER if(network_http) delete network_http; +#endif if(network_manager) delete network_manager; if(grand_prix_manager) delete grand_prix_manager; if(highscore_manager) delete highscore_manager; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-12-23 04:52:48
|
Revision: 7149 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7149&view=rev Author: hikerstk Date: 2010-12-23 04:52:42 +0000 (Thu, 23 Dec 2010) Log Message: ----------- Added missing newline to information message. Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2010-12-23 02:47:37 UTC (rev 7148) +++ main/trunk/src/main.cpp 2010-12-23 04:52:42 UTC (rev 7149) @@ -656,7 +656,7 @@ std::string logoutfile = file_manager->getLogFile("stdout.log"); std::string logerrfile = file_manager->getLogFile("stderr.log"); std::cout << "Error messages and other text output will be logged to " ; - std::cout << logoutfile << " and "<<logerrfile; + std::cout << logoutfile << " and "<<logerrfile<<"\n"; if(freopen (logoutfile.c_str(),"w",stdout)!=stdout) { fprintf(stderr, "Can not open log file '%s'. Writing to stdout instead.\n", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mbj...@us...> - 2010-12-31 05:05:07
|
Revision: 7207 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7207&view=rev Author: mbjornstk Date: 2010-12-31 05:04:59 +0000 (Fri, 31 Dec 2010) Log Message: ----------- Add --animations=[01] and --gfx=[01] to control effects from command line. Plus clean a bunch of tabs and trailing whitespace. Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2010-12-31 03:04:31 UTC (rev 7206) +++ main/trunk/src/main.cpp 2010-12-31 05:04:59 UTC (rev 7207) @@ -103,6 +103,9 @@ " (Default: 0, OpenGL: 1, Direct3D9: 2, \n" " Direct3D8: 3, Software: 4, \n" " Burning's Software: 5, Null device: 6).\n" + " --animations=n Play karts' animations (Enable: 1, Disable: 0).\n" + " --gfx=n Play other graphical effects like impact stars dance,\n" + " water animations or explosions (Enable: 1, Disable: 0).\n" // should not be used by unaware users:u // " --profile Enable automatic driven profile mode for 20 seconds.\n" // " --profile=n Enable automatic driven profile mode for n seconds.\n" @@ -125,7 +128,7 @@ } // cmdLineHelp //============================================================================= -/** For base options that don't need much to be inited (and, in some cases, +/** For base options that don't need much to be inited (and, in some cases, * that need to be read before initing stuff) - it only assumes that * user config is loaded (necessary to check for blacklisted screen * resolutions), but nothing else (esp. not kart_properties_manager and @@ -169,8 +172,8 @@ std::ostringstream o; o << UserConfigParams::m_width << "x" << UserConfigParams::m_height; std::string res = o.str(); - if (std::find(UserConfigParams::m_blacklist_res.begin(), - UserConfigParams::m_blacklist_res.end(),res) == UserConfigParams::m_blacklist_res.end()) + if (std::find(UserConfigParams::m_blacklist_res.begin(), + UserConfigParams::m_blacklist_res.end(),res) == UserConfigParams::m_blacklist_res.end()) UserConfigParams::m_fullscreen = true; else fprintf ( stdout, "Resolution %s has been blacklisted, so it is not available!\n", res.c_str()); @@ -250,10 +253,10 @@ { UserConfigParams::m_gamepad_debug=true; } - else if (!strcmp(argv[i], "--tutorial-debug")) - { - UserConfigParams::m_tutorial_debug = true; - } + else if (!strcmp(argv[i], "--tutorial-debug")) + { + UserConfigParams::m_tutorial_debug = true; + } else if(sscanf(argv[i], "--track-debug=%d",&n)==1) { UserConfigParams::m_track_debug=n; @@ -272,17 +275,17 @@ } else if(!strcmp(argv[i], "--kartsize-debug")) { - for(unsigned int i=0; i<kart_properties_manager->getNumberOfKarts(); + for(unsigned int i=0; i<kart_properties_manager->getNumberOfKarts(); i++) { const KartProperties *km = kart_properties_manager->getKartById(i); printf("%s:\t%swidth: %f length: %f height: %f mesh-buffer count %d\n", km->getIdent().c_str(), (km->getIdent().size()<7) ? "\t" : "", - km->getMasterKartModel().getWidth(), - km->getMasterKartModel().getLength(), + km->getMasterKartModel().getWidth(), + km->getMasterKartModel().getLength(), km->getMasterKartModel().getHeight(), - km->getMasterKartModel().getModel()->getMeshBufferCount()); + km->getMasterKartModel().getModel()->getMeshBufferCount()); } } else if(!strcmp(argv[i], "--check-debug")) @@ -311,13 +314,35 @@ network_manager->setMode(NetworkManager::NW_CLIENT); UserConfigParams::m_server_address=s; } + else if ( sscanf(argv[i], "--gfx=%d", &n) ) + { + if (n) + { + UserConfigParams::m_graphical_effects = true; + } + else + { + UserConfigParams::m_graphical_effects = false; + } + } + else if ( sscanf(argv[i], "--animations=%d", &n) ) + { + if (n) + { + UserConfigParams::m_show_steering_animations = true; + } + else + { + UserConfigParams::m_show_steering_animations = false; + } + } else if( (!strcmp(argv[i], "--kart") && i+1<argc )) { std::string filename=file_manager->getKartFile(std::string(argv[i+1])+".tkkf"); if(filename!="") { UserConfigParams::m_default_kart = argv[i+1]; - + // if a player was added with -N, change its kart. Otherwise, nothing to do, // kart choice will be picked up upon player creation. if (StateManager::get()->activePlayerCount() > 0) @@ -358,7 +383,7 @@ race_manager->setTrack(argv[i+1]); fprintf ( stdout, "You choose to start in track: %s.\n", argv[i+1] ) ; } - else + else { fprintf(stdout, "Track %s has not been unlocked yet. \n", argv[i+1]); fprintf(stdout, "Use --list-tracks to list available tracks.\n\n"); @@ -400,7 +425,7 @@ track->getIdent().c_str(), track->getName().c_str()); } - } + } fprintf ( stdout, "Use --track N to choose track.\n\n"); } @@ -462,7 +487,7 @@ UserConfigParams::m_log_errors=true; } else if( sscanf(argv[i], "--profile=%d", &n)==1) { - if(n<0) + if(n<0) { printf("Profiling %d laps\n",-n); ProfileWorld::setProfileModeLaps(-n); @@ -555,12 +580,12 @@ stk_config->load(file_manager->getDataFile("stk_config.xml")); irr_driver = new IrrDriver(); - + // Init GUI IrrlichtDevice* device = irr_driver->getDevice(); video::IVideoDriver* driver = device->getVideoDriver(); GUIEngine::init(device, driver, StateManager::get()); - + #ifdef ADDONS_MANAGER // This only initialises the non-network part of the addons manager. The // online section of the addons manager will be initialised from a @@ -585,21 +610,21 @@ #ifdef ADDONS_MANAGER KartPropertiesManager::addKartSearchDir( file_manager->getAddonsFile("data/karts/") ); - track_manager->addTrackSearchDir( + track_manager->addTrackSearchDir( file_manager->getAddonsFile("/data/tracks/")); #endif track_manager->loadTrackList(); music_manager->addMusicToTracks(); - GUIEngine::addLoadingIcon( + GUIEngine::addLoadingIcon( irr_driver->getTexture(file_manager->getTextureFile("notes.png")) ); - + grand_prix_manager = new GrandPrixManager (); // Consistency check for challenges, and enable all challenges // that have all prerequisites fulfilled grand_prix_manager->checkConsistency(); GUIEngine::addLoadingIcon( irr_driver->getTexture(file_manager->getTextureFile("cup_gold.png")) ); - + race_manager = new RaceManager (); // default settings for Quickstart race_manager->setNumPlayers(1); @@ -645,10 +670,10 @@ //============================================================================= -int main(int argc, char *argv[] ) +int main(int argc, char *argv[] ) { srand(( unsigned ) time( 0 )); - + try { // Init the minimum managers so that user config exists, then // handle all command line options that do not need (or must @@ -656,9 +681,9 @@ initUserConfig(argv); // argv passed so config file can be // found more reliably handleCmdLinePreliminary(argc, argv); - + initRest(); - + if (UserConfigParams::m_log_errors) //Enable logging of stdout and stderr to logfile { std::string logoutfile = file_manager->getLogFile("stdout.log"); @@ -678,10 +703,10 @@ } input_manager = new InputManager (); - + // Get into menu mode initially. - input_manager->setMode(InputManager::MENU); - + input_manager->setMode(InputManager::MENU); + main_loop = new MainLoop(); material_manager -> loadMaterial (); GUIEngine::addLoadingIcon( irr_driver->getTexture(file_manager->getGUIDir() + "/options_video.png") ); @@ -690,7 +715,7 @@ //m_tutorial_manager = new TutorialManager(); GUIEngine::addLoadingIcon( irr_driver->getTexture(file_manager->getTextureFile("gui_lock.png")) ); projectile_manager -> loadData (); - + // Both item_manager and powerup_manager load models and therefore // textures from the model directory. To avoid reading the // materials.xml twice, we do this here once for both: @@ -704,7 +729,7 @@ } if(materials_file!="") material_manager->popTempMaterial(); - + GUIEngine::addLoadingIcon( irr_driver->getTexture(file_manager->getGUIDir() + "/gift.png") ); file_manager->popTextureSearchPath(); @@ -812,7 +837,7 @@ user_config->saveConfig(); } if(input_manager) delete input_manager; // if early crash avoid delete NULL - + if (user_config && UserConfigParams::m_log_errors) //close logfiles { fclose(stderr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2011-01-03 03:28:24
|
Revision: 7219 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7219&view=rev Author: hikerstk Date: 2011-01-03 03:28:18 +0000 (Mon, 03 Jan 2011) Log Message: ----------- Fixed incorrect/hard coded paths. Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2011-01-03 03:25:36 UTC (rev 7218) +++ main/trunk/src/main.cpp 2011-01-03 03:28:18 UTC (rev 7219) @@ -609,9 +609,9 @@ network_manager = new NetworkManager (); #ifdef ADDONS_MANAGER KartPropertiesManager::addKartSearchDir( - file_manager->getAddonsFile("data/karts/") ); + file_manager->getAddonsFile("karts")); track_manager->addTrackSearchDir( - file_manager->getAddonsFile("/data/tracks/")); + file_manager->getAddonsFile("tracks")); #endif track_manager->loadTrackList(); music_manager->addMusicToTracks(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2011-01-11 21:06:25
|
Revision: 7363 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7363&view=rev Author: hikerstk Date: 2011-01-11 21:06:19 +0000 (Tue, 11 Jan 2011) Log Message: ----------- Fixed compiler warnings. Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2011-01-11 19:45:05 UTC (rev 7362) +++ main/trunk/src/main.cpp 2011-01-11 21:06:19 UTC (rev 7363) @@ -195,10 +195,13 @@ const bool deadzone = (abs(g.m_axis[a]) < DEADZONE_JOYSTICK); - core::recti fillbar(position2di(axis_x + axis_w/2, axis_y + a*axis_h), - dimension2di((axis_w/2)*rate, axis_h)); + core::recti fillbar(position2di(axis_x + axis_w/2, + axis_y + a*axis_h), + dimension2di( (int)(axis_w/2*rate), + axis_h) ); fillbar.repair(); // dimension may be negative - driver->draw2DRectangle (deadzone ? video::SColor(255,255,0,0) : video::SColor(255,0,255,0), + driver->draw2DRectangle (deadzone ? video::SColor(255,255,0,0) + : video::SColor(255,0,255,0), fillbar); driver->draw2DRectangleOutline( core::recti(pos, size) ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mbj...@us...> - 2011-01-14 04:05:52
|
Revision: 7413 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7413&view=rev Author: mbjornstk Date: 2011-01-14 04:05:46 +0000 (Fri, 14 Jan 2011) Log Message: ----------- Add --weather=0 (or 1) parameter to set weather effects. Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2011-01-14 03:41:52 UTC (rev 7412) +++ main/trunk/src/main.cpp 2011-01-14 04:05:46 UTC (rev 7413) @@ -245,6 +245,7 @@ " --animations=n Play karts' animations (Enable: 1, Disable: 0).\n" " --gfx=n Play other graphical effects like impact stars dance,\n" " water animations or explosions (Enable: 1, Disable: 0).\n" + " --weather=n Show weather effects like rain or snow (0 or 1 as --gfx).\n" // should not be used by unaware users:u // " --profile Enable automatic driven profile mode for 20 seconds.\n" // " --profile=n Enable automatic driven profile mode for n seconds.\n" @@ -468,6 +469,17 @@ UserConfigParams::m_graphical_effects = false; } } + else if ( sscanf(argv[i], "--weather=%d", &n) ) + { + if (n) + { + UserConfigParams::m_weather_effects = true; + } + else + { + UserConfigParams::m_weather_effects = false; + } + } else if ( sscanf(argv[i], "--animations=%d", &n) ) { if (n) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2011-02-18 01:21:56
|
Revision: 7722 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7722&view=rev Author: auria Date: 2011-02-18 01:21:50 +0000 (Fri, 18 Feb 2011) Log Message: ----------- Change way language from config is set in the environment, should hopefully work under Linux now Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2011-02-18 01:12:29 UTC (rev 7721) +++ main/trunk/src/main.cpp 2011-02-18 01:21:50 UTC (rev 7722) @@ -727,12 +727,10 @@ if (UserConfigParams::m_language.toString() != "system") { - char buffer[1024]; - snprintf(buffer, 1024, "LANGUAGE=%s", UserConfigParams::m_language.c_str()); #ifdef WIN32 - _putenv( buffer ); + SetEnvironmentVariableA("LANGUAGE", UserConfigParams::m_language.c_str()); #else - putenv( buffer ); + setenv("LANGUAGE", UserConfigParams::m_language.c_str(), 1); #endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2011-03-01 19:23:29
|
Revision: 7779 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7779&view=rev Author: auria Date: 2011-03-01 19:23:23 +0000 (Tue, 01 Mar 2011) Log Message: ----------- Forbid selecting locked kart when starting from command-line Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2011-03-01 19:11:23 UTC (rev 7778) +++ main/trunk/src/main.cpp 2011-03-01 19:23:23 UTC (rev 7779) @@ -497,24 +497,33 @@ } else if( (!strcmp(argv[i], "--kart") && i+1<argc )) { - const KartProperties *prop = kart_properties_manager->getKart(argv[i+1]); - if(prop) + if (!unlock_manager->isLocked(argv[i+1])) { - UserConfigParams::m_default_kart = argv[i+1]; - - // if a player was added with -N, change its kart. Otherwise, nothing to do, - // kart choice will be picked up upon player creation. - if (StateManager::get()->activePlayerCount() > 0) + const KartProperties *prop = kart_properties_manager->getKart(argv[i+1]); + if(prop) { - race_manager->setLocalKartInfo(0, argv[i+1]); + UserConfigParams::m_default_kart = argv[i+1]; + + // if a player was added with -N, change its kart. Otherwise, nothing to do, + // kart choice will be picked up upon player creation. + if (StateManager::get()->activePlayerCount() > 0) + { + race_manager->setLocalKartInfo(0, argv[i+1]); + } + fprintf ( stdout, "You chose to use kart '%s'.\n", argv[i+1] ) ; + i++; } - fprintf ( stdout, "You chose to use kart '%s'.\n", argv[i+1] ) ; - i++; + else + { + fprintf(stdout, "Kart '%s' not found, ignored.\n", + argv[i+1]); + } } else { - fprintf(stdout, "Kart '%s' not found, ignored.\n", - argv[i+1]); + fprintf(stdout, "Kart %s has not been unlocked yet. \n", argv[i+1]); + fprintf(stdout, "Use --list-tracks to list available tracks.\n\n"); + return 0; } } else if( (!strcmp(argv[i], "--mode") && i+1<argc )) @@ -544,7 +553,7 @@ else { fprintf(stdout, "Track %s has not been unlocked yet. \n", argv[i+1]); - fprintf(stdout, "Use --list-tracks to list available tracks.\n\n"); + fprintf(stdout, "Use --list-karts to list available tracks.\n\n"); return 0; } i++; @@ -593,7 +602,10 @@ for (unsigned int i = 0; NULL != kart_properties_manager->getKartById(i); i++) { const KartProperties* KP= kart_properties_manager->getKartById(i); - fprintf (stdout, "\t%10s: %ls\n", KP->getIdent().c_str(), KP->getName()); + if (!unlock_manager->isLocked(KP->getIdent())) + { + fprintf (stdout, "\t%10s: %ls\n", KP->getIdent().c_str(), KP->getName()); + } } fprintf ( stdout, "\n" ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2011-03-03 21:56:36
|
Revision: 7800 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7800&view=rev Author: auria Date: 2011-03-03 21:56:30 +0000 (Thu, 03 Mar 2011) Log Message: ----------- Fixed kart/track confusion in command-line output Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2011-03-03 21:46:36 UTC (rev 7799) +++ main/trunk/src/main.cpp 2011-03-03 21:56:30 UTC (rev 7800) @@ -522,7 +522,7 @@ else { fprintf(stdout, "Kart %s has not been unlocked yet. \n", argv[i+1]); - fprintf(stdout, "Use --list-tracks to list available tracks.\n\n"); + fprintf(stdout, "Use --list-karts to list available karts.\n\n"); return 0; } } @@ -553,7 +553,7 @@ else { fprintf(stdout, "Track %s has not been unlocked yet. \n", argv[i+1]); - fprintf(stdout, "Use --list-karts to list available tracks.\n\n"); + fprintf(stdout, "Use --list-tracks to list available tracks.\n\n"); return 0; } i++; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2011-03-31 10:15:16
|
Revision: 8144 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=8144&view=rev Author: hikerstk Date: 2011-03-31 10:15:09 +0000 (Thu, 31 Mar 2011) Log Message: ----------- Added a popup window to inform the user about STK accessing a server on the internet. Auria: I couldn't easily find (or remember) the class to use which allows the user to select yes/no - could you fix that? Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2011-03-31 06:18:29 UTC (rev 8143) +++ main/trunk/src/main.cpp 2011-03-31 10:15:09 UTC (rev 8144) @@ -70,6 +70,7 @@ #include "race/race_manager.hpp" #include "states_screens/main_menu_screen.hpp" #include "states_screens/state_manager.hpp" +#include "states_screens/dialogs/message_dialog.hpp" #include "tracks/track.hpp" #include "tracks/track_manager.hpp" #include "tutorial/tutorial_manager.hpp" @@ -909,6 +910,14 @@ if(!UserConfigParams::m_no_start_screen) { StateManager::get()->pushScreen(MainMenuScreen::getInstance()); + if(UserConfigParams::m_internet_status==NetworkHttp::IPERM_NOT_ASKED) + { + new MessageDialog(_("SuperTuxKart now supports a news server " + "to display updates. To enable this, go to options, then " + "User Interface, and select \"Internet STK news\".")); + // FIXME: Needs feedback from user, then set the value + UserConfigParams::m_internet_status=NetworkHttp::IPERM_NOT_ASKED + } } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2011-03-31 10:25:11
|
Revision: 8145 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=8145&view=rev Author: hikerstk Date: 2011-03-31 10:25:05 +0000 (Thu, 31 Mar 2011) Log Message: ----------- Fixed typo in previous commit. Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2011-03-31 10:15:09 UTC (rev 8144) +++ main/trunk/src/main.cpp 2011-03-31 10:25:05 UTC (rev 8145) @@ -916,7 +916,7 @@ "to display updates. To enable this, go to options, then " "User Interface, and select \"Internet STK news\".")); // FIXME: Needs feedback from user, then set the value - UserConfigParams::m_internet_status=NetworkHttp::IPERM_NOT_ASKED + UserConfigParams::m_internet_status=NetworkHttp::IPERM_NOT_ASKED; } } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2011-03-31 16:20:10
|
Revision: 8148 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=8148&view=rev Author: auria Date: 2011-03-31 16:20:04 +0000 (Thu, 31 Mar 2011) Log Message: ----------- ops, forgot to close the dialog once the user gave their answer Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2011-03-31 16:17:51 UTC (rev 8147) +++ main/trunk/src/main.cpp 2011-03-31 16:20:04 UTC (rev 8148) @@ -1,8 +1,8 @@ // $Id$ // // SuperTuxKart - a fun racing game with go-kart -// Copyright (C) 2004-2005 Steve Baker <sjb...@ai...> -// Copyright (C) 2006 Joerg Henrichs, Steve Baker +// Copyright (C) 2004-2006 Steve Baker <sjb...@ai...> +// Copyright (C) 2011 Joerg Henrichs, Marianne Gagnon // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -918,11 +918,13 @@ virtual void onConfirm() { UserConfigParams::m_internet_status = NetworkHttp::IPERM_ALLOWED; + GUIEngine::ModalDialog::dismiss(); } virtual void onCancel() { UserConfigParams::m_internet_status = NetworkHttp::IPERM_NOT_ALLOWED; + GUIEngine::ModalDialog::dismiss(); } }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2011-03-31 16:25:14
|
Revision: 8149 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=8149&view=rev Author: auria Date: 2011-03-31 16:25:08 +0000 (Thu, 31 Mar 2011) Log Message: ----------- Change popup message now that we have yes/no Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2011-03-31 16:20:04 UTC (rev 8148) +++ main/trunk/src/main.cpp 2011-03-31 16:25:08 UTC (rev 8149) @@ -928,9 +928,10 @@ } }; - new MessageDialog(_("SuperTuxKart now supports a news server " - "to display updates. To enable this, go to options, then " - "User Interface, and select \"Internet STK news\"."), new ConfirmServer(), true); + new MessageDialog(_("SuperTuxKart may connect to a news server " + "to display updates. Would you like this feature to be enabled? " + "(To change this setting at a later time, go to options, select tab " + "'User Interface', and edit \"Internet STK news\")."), new ConfirmServer(), true); } } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2011-03-31 21:13:46
|
Revision: 8151 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=8151&view=rev Author: hikerstk Date: 2011-03-31 21:13:40 +0000 (Thu, 31 Mar 2011) Log Message: ----------- Fixed hang when STK ends the first time internet news is enabled. Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2011-03-31 19:40:40 UTC (rev 8150) +++ main/trunk/src/main.cpp 2011-03-31 21:13:40 UTC (rev 8151) @@ -917,16 +917,20 @@ public: virtual void onConfirm() { + delete network_http; UserConfigParams::m_internet_status = NetworkHttp::IPERM_ALLOWED; GUIEngine::ModalDialog::dismiss(); - } - + network_http = new NetworkHttp(); + } // onConfirm + // -------------------------------------------------------- virtual void onCancel() { + delete network_http; UserConfigParams::m_internet_status = NetworkHttp::IPERM_NOT_ALLOWED; GUIEngine::ModalDialog::dismiss(); - } - }; + network_http = new NetworkHttp(); + } // onCancel + }; // ConfirmServer new MessageDialog(_("SuperTuxKart may connect to a news server " "to display updates. Would you like this feature to be enabled? " This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2011-03-31 22:27:10
|
Revision: 8153 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=8153&view=rev Author: auria Date: 2011-03-31 22:27:04 +0000 (Thu, 31 Mar 2011) Log Message: ----------- Print irrlicht version on terminal as per suggestion by Joerg (but I realize this isn't really needed since irrlicht logs it anyway) Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2011-03-31 21:26:37 UTC (rev 8152) +++ main/trunk/src/main.cpp 2011-03-31 22:27:04 UTC (rev 8153) @@ -362,13 +362,18 @@ exit(EXIT_FAILURE); } } - else if( !strcmp(argv[i], "--version") || !strcmp(argv[i], "-V") ) + else if (strcmp(argv[i], "--version") == 0 || strcmp(argv[i], "-V") == 0) { printf("==============================\n"); fprintf ( stdout, "SuperTuxKart, %s.\n", STK_VERSION ) ; #ifdef SVNVERSION fprintf ( stdout, "SuperTuxKart, SVN revision number '%s'.\n", SVNVERSION ) ; #endif + + // IRRLICHT_VERSION_SVN + fprintf ( stdout, "Irrlicht version %i.%i.%i (%s)\n", IRRLICHT_VERSION_MAJOR , IRRLICHT_VERSION_MINOR, + IRRLICHT_VERSION_REVISION, IRRLICHT_SDK_VERSION ); + printf("==============================\n"); exit(0); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2011-04-06 23:45:40
|
Revision: 8234 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=8234&view=rev Author: auria Date: 2011-04-06 23:45:34 +0000 (Wed, 06 Apr 2011) Log Message: ----------- Undo test modification I accidentally committed Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2011-04-06 23:45:16 UTC (rev 8233) +++ main/trunk/src/main.cpp 2011-04-06 23:45:34 UTC (rev 8234) @@ -917,7 +917,7 @@ if(!UserConfigParams::m_no_start_screen) { StateManager::get()->pushScreen(MainMenuScreen::getInstance()); - //if(UserConfigParams::m_internet_status==NetworkHttp::IPERM_NOT_ASKED) + if(UserConfigParams::m_internet_status==NetworkHttp::IPERM_NOT_ASKED) { class ConfirmServer : public MessageDialog::IConfirmDialogListener { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2011-04-12 01:23:33
|
Revision: 8294 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=8294&view=rev Author: hikerstk Date: 2011-04-12 01:23:27 +0000 (Tue, 12 Apr 2011) Log Message: ----------- Accept both American and Britain spelling for -gamepad-visuali{s,z}ation. Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2011-04-11 22:10:05 UTC (rev 8293) +++ main/trunk/src/main.cpp 2011-04-12 01:23:27 UTC (rev 8294) @@ -290,7 +290,8 @@ cmdLineHelp(argv[0]); exit(0); } - else if(!strcmp(argv[i], "--gamepad-visualisation")) + else if(!strcmp(argv[i], "--gamepad-visualisation") || + !strcmp(argv[i], "--gamepad-visualization") ) { UserConfigParams::m_gamepad_visualisation=true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2011-04-27 00:11:23
|
Revision: 8466 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=8466&view=rev Author: hikerstk Date: 2011-04-27 00:11:16 +0000 (Wed, 27 Apr 2011) Log Message: ----------- The verbosity was set too late, so many messages where not shown. Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2011-04-26 17:39:07 UTC (rev 8465) +++ main/trunk/src/main.cpp 2011-04-27 00:11:16 UTC (rev 8466) @@ -295,6 +295,12 @@ { UserConfigParams::m_gamepad_visualisation=true; } + else if ( !strcmp(argv[i], "-v") && i+1<argc ) + { + UserConfigParams::m_verbosity = atoi(argv[i+1]); + printf("Setting verbosity to %d\n",UserConfigParams::m_verbosity); + i++; + } else if( (!strcmp(argv[i], "--stk-config")) && i+1<argc ) { stk_config->load(file_manager->getDataFile(argv[i+1])); @@ -657,11 +663,6 @@ ProfileWorld::setProfileModeTime(20); race_manager->setNumLaps(999999); // profile end depends on time } - else if ( !strcmp(argv[i], "-v") && i+1<argc ) - { - UserConfigParams::m_verbosity = atoi(argv[i+1]); - i++; - } else if( sscanf(argv[i], "--history=%d", &n)==1) { history->doReplayHistory( (History::HistoryReplayMode)n); @@ -689,6 +690,7 @@ else if( !strcmp(argv[i], "--trackdir") && i+1<argc ) { i++; } else if( !strcmp(argv[i], "--kartdir") && i+1<argc ) { i++; } else if( !strcmp(argv[i], "--renderer") && i+1<argc ) { i++; } + else if( !strcmp(argv[i], "-v") && i+1<argc ) { i++; } else if( !strcmp(argv[i], "--screensize") || !strcmp(argv[i], "-s")) {i++;} else if( !strcmp(argv[i], "--fullscreen") || !strcmp(argv[i], "-f")) {} else if( !strcmp(argv[i], "--windowed") || !strcmp(argv[i], "-w")) {} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2011-04-28 10:56:19
|
Revision: 8478 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=8478&view=rev Author: hikerstk Date: 2011-04-28 10:56:13 +0000 (Thu, 28 Apr 2011) Log Message: ----------- Added --debug={memory,gui,addons,misc} command line option (so far only memory debug is actually supported by debug code). Modified Paths: -------------- main/trunk/src/main.cpp Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2011-04-28 04:25:58 UTC (rev 8477) +++ main/trunk/src/main.cpp 2011-04-28 10:56:13 UTC (rev 8478) @@ -90,8 +90,8 @@ struct Gamepad { - s16 m_axis[SEvent::SJoystickEvent::NUMBER_OF_AXES]; - bool m_button_state[SEvent::SJoystickEvent::NUMBER_OF_BUTTONS]; + s16 m_axis[SEvent::SJoystickEvent::NUMBER_OF_AXES]; + bool m_button_state[SEvent::SJoystickEvent::NUMBER_OF_BUTTONS]; }; #define GAMEPAD_COUNT 8 // const won't work @@ -295,10 +295,26 @@ { UserConfigParams::m_gamepad_visualisation=true; } + else if ( !strcmp(argv[i], "--debug=memory") ) + { + UserConfigParams::m_verbosity |= UserConfigParams::LOG_MEMORY; + } + else if ( !strcmp(argv[i], "--debug=addons") ) + { + UserConfigParams::m_verbosity |= UserConfigParams::LOG_ADDONS; + } + else if ( !strcmp(argv[i], "--debug=gui") ) + { + UserConfigParams::m_verbosity |= UserConfigParams::LOG_GUI; + } + else if ( !strcmp(argv[i], "--debug=misc") ) + { + UserConfigParams::m_verbosity |= UserConfigParams::LOG_MISC; + } else if ( !strcmp(argv[i], "-v") && i+1<argc ) { UserConfigParams::m_verbosity = atoi(argv[i+1]); - printf("Setting verbosity to %d\n",UserConfigParams::m_verbosity); + printf("Setting verbosity to %d\n",UserConfigParams::m_verbosity); i++; } else if( (!strcmp(argv[i], "--stk-config")) && i+1<argc ) @@ -691,6 +707,10 @@ else if( !strcmp(argv[i], "--kartdir") && i+1<argc ) { i++; } else if( !strcmp(argv[i], "--renderer") && i+1<argc ) { i++; } else if( !strcmp(argv[i], "-v") && i+1<argc ) { i++; } + else if( !strcmp(argv[i], "--debug=memory") ) {} + else if( !strcmp(argv[i], "--debug=addons") ) {} + else if( !strcmp(argv[i], "--debug=gui" ) ) {} + else if( !strcmp(argv[i], "--debug=misc" ) ) {} else if( !strcmp(argv[i], "--screensize") || !strcmp(argv[i], "-s")) {i++;} else if( !strcmp(argv[i], "--fullscreen") || !strcmp(argv[i], "-f")) {} else if( !strcmp(argv[i], "--windowed") || !strcmp(argv[i], "-w")) {} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |