Changeset 8830
- Timestamp:
- Aug 7, 2011, 10:51:54 PM (13 years ago)
- Location:
- code/branches/output/src
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/output/src/Orxonox.cc
r8812 r8830 61 61 using namespace orxonox; 62 62 63 orxout(user_status) << "Welcome to Orxonox (v" << ORXONOX_VERSION_MAJOR << '.' << ORXONOX_VERSION_MINOR << '.' << ORXONOX_VERSION_PATCH << ' ' << ORXONOX_VERSION_NAME << ')' << endl; 64 orxout(internal_status) << "Congratulations, you survived the static initialization. Entering main()" << endl; 65 if (argc > 0) 66 orxout(internal_info) << "argv[0]: " << argv[0] << endl; 67 63 68 try 64 69 { … … 78 83 #endif 79 84 80 return main(strCmdLine); 85 int value = main(strCmdLine); 86 orxout(internal_status) << "Terminating main() normally with value " << value << endl; 87 return value; 81 88 } 82 89 catch (...) 83 90 { 84 orxout(user_error) << " Orxonox failed to initialise: " << orxonox::Exception::handleMessage() << endl;91 orxout(user_error) << "Exception caught in main(): " << orxonox::Exception::handleMessage() << endl; 85 92 orxout(user_error) << "Terminating program." << endl; 86 93 return 1; -
code/branches/output/src/libraries/core/Core.cc
r8806 r8830 112 112 , destructionHelper_(this) 113 113 { 114 orxout(internal_status) << "initializing Core object..." << endl; 115 114 116 // Set the hard coded fixed paths 115 117 this->pathConfig_ = new PathConfig(); … … 119 121 120 122 // Load modules 123 orxout(internal_info) << "Loading modules:" << endl; 121 124 const std::vector<std::string>& modulePaths = this->pathConfig_->getModulePaths(); 122 125 for (std::vector<std::string>::const_iterator it = modulePaths.begin(); it != modulePaths.end(); ++it) … … 138 141 this->pathConfig_->setConfigurablePaths(); 139 142 143 orxout(internal_info) << "Root path: " << PathConfig::getRootPathString() << endl; 144 orxout(internal_info) << "Executable path: " << PathConfig::getExecutablePathString() << endl; 145 orxout(internal_info) << "Data path: " << PathConfig::getDataPathString() << endl; 146 orxout(internal_info) << "Ext. data path: " << PathConfig::getExternalDataPathString() << endl; 147 orxout(internal_info) << "Config path: " << PathConfig::getConfigPathString() << endl; 148 orxout(internal_info) << "Log path: " << PathConfig::getLogPathString() << endl; 149 orxout(internal_info) << "Modules path: " << PathConfig::getModulePathString() << endl; 150 140 151 // create a signal handler (only active for Linux) 141 152 // This call is placed as soon as possible, but after the directories are set … … 153 164 154 165 // Manage ini files and set the default settings file (usually orxonox.ini) 166 orxout(internal_info) << "Loading config:" << endl; 155 167 this->configFileManager_ = new ConfigFileManager(); 156 168 this->configFileManager_->setFilename(ConfigFileType::Settings, … … 158 170 159 171 // Required as well for the config values 172 orxout(internal_info) << "Loading language:" << endl; 160 173 this->languageInstance_ = new Language(); 161 174 … … 163 176 // possibility to configure everything below here 164 177 RegisterRootObject(Core); 178 orxout(internal_info) << "configuring Core" << endl; 165 179 this->setConfigValues(); 166 180 … … 175 189 } 176 190 if (this->bStartIOConsole_) 191 { 192 orxout(internal_info) << "creating IO console" << endl; 177 193 this->ioConsole_ = new IOConsole(); 194 } 178 195 #endif 179 196 180 197 // creates the class hierarchy for all classes with factories 198 orxout(internal_info) << "creating class hierarchy" << endl; 181 199 Identifier::createClassHierarchy(); 182 200 183 201 // Load OGRE excluding the renderer and the render window 202 orxout(internal_info) << "creating GraphicsManager:" << endl; 184 203 this->graphicsManager_ = new GraphicsManager(false); 185 204 … … 189 208 190 209 // Create singletons that always exist (in other libraries) 210 orxout(internal_info) << "creating root scope:" << endl; 191 211 this->rootScope_ = new Scope<ScopeID::Root>(); 192 212 … … 205 225 orxout(internal_error) << "Could not open file for documentation writing" << endl; 206 226 } 227 228 orxout(internal_status) << "finished initializing Core object" << endl; 207 229 } 208 230 209 231 void Core::destroy() 210 232 { 233 orxout(internal_status) << "destroying Core object..." << endl; 234 211 235 // Remove us from the object lists again to avoid problems when destroying them 212 236 this->unregisterObject(); … … 227 251 safeObjectDelete(&dynLibManager_); 228 252 safeObjectDelete(&pathConfig_); 253 254 orxout(internal_status) << "finished destroying Core object" << endl; 229 255 } 230 256 … … 310 336 void Core::loadGraphics() 311 337 { 338 orxout(internal_info) << "loading graphics in Core" << endl; 339 312 340 // Any exception should trigger this, even in upgradeToGraphics (see its remarks) 313 341 Loki::ScopeGuard unloader = Loki::MakeObjGuard(*this, &Core::unloadGraphics); … … 351 379 352 380 // Create singletons associated with graphics (in other libraries) 381 orxout(internal_info) << "creating graphics scope:" << endl; 353 382 graphicsScope_ = new Scope<ScopeID::Graphics>(); 354 383 355 384 unloader.Dismiss(); 385 386 orxout(internal_info) << "finished loading graphics in Core" << endl; 356 387 } 357 388 358 389 void Core::unloadGraphics() 359 390 { 391 orxout(internal_info) << "unloading graphics in Core" << endl; 392 360 393 safeObjectDelete(&graphicsScope_); 361 394 safeObjectDelete(&guiManager_); -
code/branches/output/src/libraries/core/GUIManager.cc
r8806 r8830 257 257 { 258 258 RegisterRootObject(GUIManager); 259 260 orxout(internal_status) << "initializing GUIManager..." << endl; 261 259 262 this->setConfigValues(); 260 263 … … 335 338 // Set up the sheet manager in the Lua framework 336 339 this->luaState_->doFile("SheetManager.lua"); 340 341 orxout(internal_status) << "finished initializing GUIManager" << endl; 337 342 } 338 343 339 344 void GUIManager::destroy() 340 345 { 346 orxout(internal_status) << "destroying GUIManager..." << endl; 347 341 348 using namespace CEGUI; 342 349 … … 355 362 #endif 356 363 safeObjectDelete(&luaState_); 364 365 orxout(internal_status) << "finished destroying GUIManager" << endl; 357 366 } 358 367 -
code/branches/output/src/libraries/core/Game.cc
r8806 r8830 84 84 , destructionHelper_(this) 85 85 { 86 orxout(internal_status) << "initializing Game object..." << endl; 87 86 88 #ifdef ORXONOX_PLATFORM_WINDOWS 87 89 minimumSleepTime_ = 1000/*us*/; … … 106 108 107 109 // Create the Core 110 orxout(internal_info) << "creating Core object:" << endl; 108 111 this->core_ = new Core(cmdLine); 109 112 … … 125 128 this->loadedTopStateNode_ = this->rootStateNode_; 126 129 this->loadedStates_.push_back(this->getState(rootStateNode_->name_)); 130 131 orxout(internal_status) << "finished initializing Game object" << endl; 127 132 } 128 133 129 134 void Game::destroy() 130 135 { 136 orxout(internal_status) << "destroying Game object..." << endl; 137 131 138 // Remove us from the object lists again to avoid problems when destroying them 132 139 this->unregisterObject(); … … 139 146 safeObjectDelete(&core_); 140 147 safeObjectDelete(&gameClock_); 148 149 orxout(internal_status) << "finished destroying Game object..." << endl; 141 150 } 142 151 … … 165 174 orxout(user_error) << "Starting game without requesting GameState. This automatically terminates the program." << endl; 166 175 176 // Update the GameState stack if required. We do this already here to have a properly initialized game before entering the main loop 177 this->updateGameStateStack(); 178 179 orxout(user_status) << "Game loaded" << endl; 180 orxout(internal_status) << "--------------------------------------------------" << endl; 181 orxout(internal_status) << "starting main loop..." << endl; 182 167 183 // START GAME 168 184 // first delta time should be about 0 seconds … … 217 233 this->updateFPSLimiter(); 218 234 } 235 236 orxout(internal_status) << "finished main loop" << endl; 237 orxout(internal_status) << "--------------------------------------------------" << endl; 219 238 220 239 // UNLOAD all remaining states … … 338 357 void Game::stop() 339 358 { 359 orxout(user_status) << "Exit" << endl; 340 360 this->bAbort_ = true; 341 361 } … … 507 527 if (!GameMode::showsGraphics()) 508 528 { 529 orxout(user_status) << "Loading graphics" << endl; 530 orxout(internal_info) << "loading graphics in Game" << endl; 531 509 532 core_->loadGraphics(); 510 533 Loki::ScopeGuard graphicsUnloader = Loki::MakeObjGuard(*this, &Game::unloadGraphics); … … 524 547 } 525 548 graphicsUnloader.Dismiss(); 549 550 orxout(internal_info) << "finished loading graphics in Game" << endl; 526 551 } 527 552 } … … 531 556 if (GameMode::showsGraphics()) 532 557 { 558 orxout(user_status) << "Unloading graphics" << endl; 559 orxout(internal_info) << "unloading graphics in Game" << endl; 560 533 561 // Destroy all the GameStates that require graphics 534 562 for (GameStateMap::iterator it = constructedStates_.begin(); it != constructedStates_.end();) … … 555 583 void Game::loadState(const std::string& name) 556 584 { 585 orxout(internal_status) << "loading state '" << name << "'" << endl; 586 557 587 this->bChangingState_ = true; 558 588 LOKI_ON_BLOCK_EXIT_OBJ(*this, &Game::resetChangingState); (void)LOKI_ANONYMOUS_VARIABLE(scopeGuard); … … 577 607 void Game::unloadState(const std::string& name) 578 608 { 609 orxout(internal_status) << "unloading state '" << name << "'" << endl; 610 579 611 this->bChangingState_ = true; 580 612 try -
code/branches/output/src/libraries/core/GraphicsManager.cc
r8820 r8830 104 104 RegisterObject(GraphicsManager); 105 105 106 orxout(internal_status) << "initializing GraphicsManager..." << endl; 106 107 this->setConfigValues(); 107 108 … … 129 130 this->upgradeToGraphics(); 130 131 } 132 133 orxout(internal_status) << "finished initializing GraphicsManager" << endl; 131 134 } 132 135 133 136 void GraphicsManager::destroy() 134 137 { 138 orxout(internal_status) << "destroying GraphicsManager..." << endl; 139 135 140 Loader::unload(debugOverlay_.get()); 136 141 … … 148 153 safeObjectDelete(&ogreLogger_); 149 154 safeObjectDelete(&ogreWindowEventListener_); 155 156 orxout(internal_status) << "finished destroying GraphicsManager" << endl; 150 157 } 151 158 … … 173 180 return; 174 181 182 orxout(internal_info) << "GraphicsManager upgrade to graphics" << endl; 183 175 184 // load all the required plugins for Ogre 176 185 this->loadOgrePlugins(); … … 183 192 // choose another resource group. 184 193 Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); 194 195 orxout(internal_info) << "GraphicsManager finished upgrade to graphics" << endl; 185 196 } 186 197 … … 239 250 void GraphicsManager::loadOgrePlugins() 240 251 { 252 orxout(internal_info) << "loading ogre plugins" << endl; 253 241 254 // Plugin path can have many different locations... 242 255 std::string pluginPath = specialConfig::ogrePluginsDirectory; -
code/branches/output/src/libraries/core/Language.cc
r8806 r8830 201 201 void Language::readDefaultLanguageFile() 202 202 { 203 orxout(internal_ status, context::language) << "Read default language file." << endl;203 orxout(internal_info, context::language) << "Read default language file." << endl; 204 204 205 205 const std::string& filepath = PathConfig::getConfigPathString() + getFilename(this->defaultLanguage_); … … 250 250 void Language::readTranslatedLanguageFile() 251 251 { 252 orxout(internal_ status, context::language) << "Read translated language file (" << Core::getInstance().getLanguage() << ")." << endl;252 orxout(internal_info, context::language) << "Read translated language file (" << Core::getInstance().getLanguage() << ")." << endl; 253 253 254 254 const std::string& filepath = PathConfig::getConfigPathString() + getFilename(Core::getInstance().getLanguage()); … … 263 263 orxout(internal_error, context::language) << "Couldn't open file " << getFilename(Core::getInstance().getLanguage()) << " to read the translated language entries!" << endl; 264 264 Core::getInstance().resetLanguage(); 265 orxout(internal_ status, context::language) << "Reset language to " << this->defaultLanguage_ << '.' << endl;265 orxout(internal_info, context::language) << "Reset language to " << this->defaultLanguage_ << '.' << endl; 266 266 return; 267 267 } … … 304 304 void Language::writeDefaultLanguageFile() const 305 305 { 306 orxout(internal_ status, context::language) << "Write default language file." << endl;306 orxout(internal_info, context::language) << "Write default language file." << endl; 307 307 308 308 const std::string& filepath = PathConfig::getConfigPathString() + getFilename(this->defaultLanguage_); -
code/branches/output/src/libraries/core/Loader.cc
r8820 r8830 189 189 if(bVerbose) 190 190 { 191 orxout(user_ status, context::loader) << "Start loading " << file->getFilename() << "..." << endl;191 orxout(user_info) << "Start loading " << file->getFilename() << "..." << endl; 192 192 orxout(internal_info, context::loader) << "Mask: " << Loader::currentMask_s << endl; 193 193 } … … 217 217 218 218 if(bVerbose) 219 orxout(user_ status, context::loader) << "Finished loading " << file->getFilename() << '.' << endl;219 orxout(user_info) << "Finished loading " << file->getFilename() << '.' << endl; 220 220 else 221 221 orxout(verbose, context::loader) << "Finished loading " << file->getFilename() << '.' << endl; -
code/branches/output/src/libraries/util/Scope.h
r8804 r8830 128 128 Scope() 129 129 { 130 orxout(internal_status) << "creating scope... (" << scope << ")" << endl; 131 130 132 try 131 133 { … … 148 150 throw; 149 151 } 152 153 orxout(internal_status) << "created scope (" << scope << ")" << endl; 150 154 } 151 155 … … 153 157 ~Scope() 154 158 { 159 orxout(internal_status) << "destroying scope... (" << scope << ")" << endl; 160 155 161 ScopeManager::instanceCounts_s[scope]--; 156 162 … … 162 168 if (ScopeManager::instanceCounts_s[scope] == 0) 163 169 this->deactivateListeners(); 170 171 orxout(internal_status) << "destroyed scope (" << scope << ")" << endl; 164 172 } 165 173 -
code/branches/output/src/orxonox/Main.cc
r8729 r8830 61 61 int main(const std::string& strCmdLine) 62 62 { 63 orxout(internal_status) << "entering orxonox::main()" << endl; 64 orxout(internal_info) << "command line: " << strCmdLine << endl; 65 66 orxout(internal_info) << "creating Game object:" << endl; 63 67 Game* game = new Game(strCmdLine); 68 orxout(user_status) << "Finished initialization" << endl; 64 69 65 70 if (CommandLineParser::getValue("generateDoc").getString().empty()) 66 71 { 72 orxout(internal_info) << "preparing game states" << endl; 73 67 74 /* TODO make this clear */ 68 75 game->setStateHierarchy( … … 98 105 } 99 106 107 orxout(internal_info) << "starting game" << endl; 100 108 game->run(); 101 109 } -
code/branches/output/src/orxonox/gamestates/GSClient.cc
r8788 r8830 52 52 void GSClient::activate() 53 53 { 54 orxout(user_status) << "Starting client" << endl; 55 54 56 GameMode::setIsClient(true); 55 57 -
code/branches/output/src/orxonox/gamestates/GSLevel.cc
r8809 r8830 74 74 void GSLevel::activate() 75 75 { 76 orxout(user_status) << "Loading level" << endl; 77 76 78 if (GameMode::showsGraphics()) 77 79 { … … 155 157 156 158 // call the loader 157 orxout(user_status) << "Loading level..." << endl;158 159 startFile_ = new XMLFile(LevelManager::getInstance().getDefaultLevel()); 159 160 bool loaded = Loader::open(startFile_); … … 169 170 delete startFile_; 170 171 171 orxout(user_status) << "Unloaded level" << endl;172 172 orxout(internal_info) << "Remaining objects:" << endl; 173 173 unsigned int i = 0; -
code/branches/output/src/orxonox/gamestates/GSMainMenu.cc
r8079 r8830 95 95 void GSMainMenu::activate() 96 96 { 97 orxout(user_status) << "Loading main menu" << endl; 98 97 99 // show main menu 98 100 GraphicsManager::getInstance().setCamera(this->camera_); -
code/branches/output/src/orxonox/gamestates/GSMasterServer.cc
r8809 r8830 50 50 void GSMasterServer::activate() 51 51 { 52 orxout(user_status) << "Starting masterserver" << endl; 53 52 54 /* TODO make this work for masterserver as well */ 53 55 //GameMode::setIsServer(true); 54 56 55 57 this->mserver = new MasterServer(); 56 orxout(user_status) << "Loading masterserver mode" << endl;57 58 58 this->mserver->run(); 59 59 } -
code/branches/output/src/orxonox/gamestates/GSServer.cc
r8809 r8830 54 54 void GSServer::activate() 55 55 { 56 orxout(user_status) << "Starting server" << endl; 57 56 58 GameMode::setIsServer(true); 57 59 -
code/branches/output/src/orxonox/sound/SoundManager.cc
r8809 r8830 71 71 RegisterRootObject(SoundManager); 72 72 73 orxout(user_status) << "Loading sound" << endl; 74 73 75 this->bDestructorCalled_ = false; 74 76
Note: See TracChangeset
for help on using the changeset viewer.