Changeset 2103 for code/trunk/src/orxonox
- Timestamp:
- Nov 2, 2008, 12:22:42 AM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/CameraManager.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/CameraManager.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/Main.cc
r2087 r2103 42 42 #include "util/SignalHandler.h" 43 43 #include "core/ConfigFileManager.h" 44 #include "core/CommandLine.h" 44 45 45 46 #include "gamestates/GSRoot.h" … … 51 52 #include "gamestates/GSGUI.h" 52 53 #include "gamestates/GSIOConsole.h" 53 54 using namespace orxonox;55 54 56 55 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE … … 86 85 //#endif 87 86 87 SetCommandLineArgument(settingsFile, "orxonox.ini"); 88 88 89 int main(int argc, char** argv) 89 90 { 91 using namespace orxonox; 92 90 93 // create a signal handler (only works for linux) 91 94 SignalHandler::getInstance()->doCatch(argv[0], "orxonox.log"); 92 95 93 // Specifiy config file before creating the GameStates in order to have 96 // Parse command line arguments 97 try 98 { 99 CommandLine::parseAll(argc, argv); 100 } 101 catch (ArgumentException& ex) 102 { 103 COUT(1) << ex.what() << std::endl; 104 COUT(0) << "Usage:" << std::endl << "orxonox " << CommandLine::getUsageInformation() << std::endl; 105 } 106 107 // Create the ConfigFileManager before creating the GameStates in order to have 94 108 // setConfigValues() in the constructor (required). 95 ConfigFileManager::getInstance().setFile(CFT_Settings, "orxonox.ini"); 109 ConfigFileManager* configFileManager = new ConfigFileManager(); 110 configFileManager->setFilename(ConfigFileType::Settings, CommandLine::getValue("settingsFile").getString()); 96 111 97 112 // create the gamestates … … 115 130 116 131 // Here happens the game 117 root.start(argc, argv); 132 root.start(); 133 134 // Destroy ConfigFileManager again. 135 delete configFileManager; 118 136 119 137 return 0; -
code/trunk/src/orxonox/gamestates/GSGraphics.cc
r2087 r2103 93 93 void GSGraphics::setConfigValues() 94 94 { 95 SetConfigValue(resourceFile_, "resources.cfg").description("Location of the resources file in the data path."); 96 SetConfigValue(ogreConfigFile_, "ogre.cfg").description("Location of the Ogre config file"); 97 SetConfigValue(ogrePluginsFile_, "plugins.cfg").description("Location of the Ogre plugins file"); 98 SetConfigValue(ogreLogFile_, "ogre.log").description("Logfile for messages from Ogre. \ 99 Use \"\" to suppress log file creation."); 100 SetConfigValue(ogreLogLevelTrivial_ , 5).description("Corresponding orxonox debug level for ogre Trivial"); 101 SetConfigValue(ogreLogLevelNormal_ , 4).description("Corresponding orxonox debug level for ogre Normal"); 102 SetConfigValue(ogreLogLevelCritical_, 2).description("Corresponding orxonox debug level for ogre Critical"); 103 SetConfigValue(statisticsRefreshCycle_, 200000).description("Sets the time in microseconds interval at \ 104 which average fps, etc. get updated."); 95 SetConfigValue(resourceFile_, "resources.cfg") 96 .description("Location of the resources file in the data path."); 97 SetConfigValue(ogreConfigFile_, "ogre.cfg") 98 .description("Location of the Ogre config file"); 99 SetConfigValue(ogrePluginsFile_, "plugins.cfg") 100 .description("Location of the Ogre plugins file"); 101 SetConfigValue(ogreLogFile_, "ogre.log") 102 .description("Logfile for messages from Ogre. Use \"\" to suppress log file creation."); 103 SetConfigValue(ogreLogLevelTrivial_ , 5) 104 .description("Corresponding orxonox debug level for ogre Trivial"); 105 SetConfigValue(ogreLogLevelNormal_ , 4) 106 .description("Corresponding orxonox debug level for ogre Normal"); 107 SetConfigValue(ogreLogLevelCritical_, 2) 108 .description("Corresponding orxonox debug level for ogre Critical"); 109 SetConfigValue(statisticsRefreshCycle_, 200000) 110 .description("Sets the time in microseconds interval at which average fps, etc. get updated."); 111 SetConfigValue(defaultMasterKeybindings_, "def_masterKeybindings.ini") 112 .description("Filename of default master keybindings."); 105 113 } 106 114 … … 136 144 inputManager_->initialise(windowHnd, renderWindow_->getWidth(), renderWindow_->getHeight(), true); 137 145 // Configure master input state with a KeyBinder 138 //masterKeyBinder_ = new KeyBinder();139 //masterKeyBinder_->loadBindings("master_keybindings.ini");140 //inputManager_->getMasterInputState()->addKeyHandler(masterKeyBinder_);146 masterKeyBinder_ = new KeyBinder(); 147 masterKeyBinder_->loadBindings("masterKeybindings.ini", defaultMasterKeybindings_); 148 inputManager_->getMasterInputState()->addKeyHandler(masterKeyBinder_); 141 149 142 150 // Load the InGameConsole … … 172 180 173 181 //inputManager_->getMasterInputState()->removeKeyHandler(this->masterKeyBinder_); 174 //delete this->masterKeyBinder_;182 delete this->masterKeyBinder_; 175 183 delete this->inputManager_; 176 184 -
code/trunk/src/orxonox/gamestates/GSGraphics.h
r2087 r2103 103 103 104 104 // config values 105 std::string resourceFile_; //!< resources file name 106 std::string ogreConfigFile_; //!< ogre config file name 107 std::string ogrePluginsFile_; //!< ogre plugins file name 108 std::string ogreLogFile_; //!< log file name for Ogre log messages 109 int ogreLogLevelTrivial_; //!< Corresponding Orxonx debug level for LL_TRIVIAL 110 int ogreLogLevelNormal_; //!< Corresponding Orxonx debug level for LL_NORMAL 111 int ogreLogLevelCritical_; //!< Corresponding Orxonx debug level for LL_CRITICAL 112 unsigned int detailLevelParticle_; //!< Detail level of particle effects (0: off, 1: low, 2: normal, 3: high) 105 std::string resourceFile_; //!< resources file name 106 std::string ogreConfigFile_; //!< ogre config file name 107 std::string ogrePluginsFile_; //!< ogre plugins file name 108 std::string ogreLogFile_; //!< log file name for Ogre log messages 109 int ogreLogLevelTrivial_; //!< Corresponding Orxonx debug level for LL_TRIVIAL 110 int ogreLogLevelNormal_; //!< Corresponding Orxonx debug level for LL_NORMAL 111 int ogreLogLevelCritical_; //!< Corresponding Orxonx debug level for LL_CRITICAL 112 unsigned int detailLevelParticle_; //!< Detail level of particle effects (0: off, 1: low, 2: normal, 3: high) 113 std::string defaultMasterKeybindings_; //!< Filename of default master keybindings. 113 114 }; 114 115 } -
code/trunk/src/orxonox/gamestates/GSLevel.cc
r2087 r2103 74 74 { 75 75 SetConfigValue(keyDetectorCallbackCode_, "KeybindBindingStringKeyName="); 76 SetConfigValue(defaultKeybindings_, "def_keybindings.ini") 77 .description("Filename of default keybindings."); 76 78 } 77 79 … … 82 84 inputState_ = InputManager::getInstance().createInputState<SimpleInputState>("game", 20); 83 85 keyBinder_ = new KeyBinder(); 84 keyBinder_->loadBindings("keybindings.ini" );86 keyBinder_->loadBindings("keybindings.ini", defaultKeybindings_); 85 87 inputState_->setHandler(keyBinder_); 86 88 -
code/trunk/src/orxonox/gamestates/GSLevel.h
r2087 r2103 71 71 LevelManager* levelManager_; 72 72 73 // config values73 //##### ConfigValues ##### 74 74 std::string keyDetectorCallbackCode_; 75 //! Filename of default keybindings. 76 std::string defaultKeybindings_; 75 77 76 78 private: -
code/trunk/src/orxonox/objects/infos/Level.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/infos/Level.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/Backlight.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/Backlight.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/Camera.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/Camera.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/ParticleSpawner.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/ParticleSpawner.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.h
- Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset
for help on using the changeset viewer.