Changeset 3366 for code/branches/resource/src/core/Core.cc
- Timestamp:
- Jul 29, 2009, 10:27:10 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource/src/core/Core.cc
r3363 r3366 83 83 { 84 84 //! Static pointer to the singleton 85 Core* Core::singleton Ref_s = 0;85 Core* Core::singletonPtr_s = 0; 86 86 87 87 SetCommandLineArgument(mediaPath, "").information("Path to the media/data files"); … … 139 139 .callback(this, &CoreConfiguration::debugLevelChanged); 140 140 141 SetConfigValue(language_, Language::get Language().defaultLanguage_)141 SetConfigValue(language_, Language::getInstance().defaultLanguage_) 142 142 .description("The language of the ingame text") 143 143 .callback(this, &CoreConfiguration::languageChanged); … … 179 179 { 180 180 // Read the translation file after the language was configured 181 Language::get Language().readTranslatedLanguageFile();181 Language::getInstance().readTranslatedLanguageFile(); 182 182 } 183 183 … … 252 252 // Cleanup guard for external console commands that don't belong to an Identifier 253 253 , consoleCommandDestroyer_(CommandExecutor::destroyExternalCommands) 254 , configuration_(new CoreConfiguration()) // Don't yet create config values! 254 255 , bDevRun_(false) 255 256 , bGraphicsLoaded_(false) 256 , configuration_(new CoreConfiguration()) // Don't yet create config values! 257 { 258 if (singletonRef_s != 0) 259 { 260 COUT(0) << "Error: The Core singleton cannot be recreated! Shutting down." << std::endl; 261 abort(); 262 } 263 Core::singletonRef_s = this; 264 257 { 265 258 // Parse command line arguments first 266 259 CommandLine::parseCommandLine(cmdLine); … … 328 321 Core::~Core() 329 322 { 330 // Don't assign singletonRef_s with NULL! Recreation is not supported331 // The is quite simply because of the pre-main code that uses heap allocation332 // And we correctly deallocate these resources in this destructor.333 323 } 334 324
Note: See TracChangeset
for help on using the changeset viewer.