Changeset 8830 for code/branches/output/src/libraries
- Timestamp:
- Aug 7, 2011, 10:51:54 PM (13 years ago)
- Location:
- code/branches/output/src/libraries
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.