Changeset 5652
- Timestamp:
- Aug 17, 2009, 3:35:34 PM (15 years ago)
- Location:
- code/branches/resource2/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource2/src/core/Clock.h
r3370 r5652 21 21 * 22 22 * Author: 23 * Fabian 'x3n' Landau23 * Reto Grieder 24 24 * Co-authors: 25 * Reto Grieder25 * ... 26 26 * 27 27 */ -
code/branches/resource2/src/core/ConfigFileManager.cc
r5645 r5652 40 40 namespace orxonox 41 41 { 42 const char* const DEFAULT_CONFIG_FILE = "default.ini";43 44 ConfigFileManager* ConfigFileManager::singletonPtr_s = 0;45 46 42 SetConsoleCommandShortcutExtern(config).argumentCompleter(0, autocompletion::configvalueclasses()).argumentCompleter(1, autocompletion::configvalues()).argumentCompleter(2, autocompletion::configvalue()); 47 43 SetConsoleCommandShortcutExtern(tconfig).argumentCompleter(0, autocompletion::configvalueclasses()).argumentCompleter(1, autocompletion::configvalues()).argumentCompleter(2, autocompletion::configvalue()); … … 339 335 void ConfigFile::save() const 340 336 { 341 boost::filesystem::path filepath(Core::getConfigPath() / this->filename_);342 343 337 std::ofstream file; 344 file.open( filepath.string().c_str(), std::fstream::out);338 file.open((Core::getConfigPathString() + filename_).c_str(), std::fstream::out); 345 339 file.setf(std::ios::fixed, std::ios::floatfield); 346 340 file.precision(6); … … 479 473 /////////////////////// 480 474 475 ConfigFileManager* ConfigFileManager::singletonPtr_s = 0; 476 477 std::string ConfigFileManager::DEFAULT_CONFIG_FILE = "default.ini"; 478 481 479 ConfigFileManager::ConfigFileManager() 482 480 : mininmalFreeType_(ConfigFileType::numberOfReservedTypes) -
code/branches/resource2/src/core/ConfigFileManager.h
r3370 r5652 307 307 void updateConfigValues(ConfigFileType type); 308 308 309 static std::string DEFAULT_CONFIG_FILE; 310 309 311 private: 310 312 ConfigFileManager(const ConfigFileManager&); -
code/branches/resource2/src/orxonox/gamestates/GSDedicated.cc
r3370 r5652 28 28 29 29 #include "GSDedicated.h" 30 31 #include <iomanip> 32 #include <iostream> 33 #include <boost/bind.hpp> 30 34 31 35 #include "util/Debug.h" … … 37 41 #include "core/GameMode.h" 38 42 #include "network/Server.h" 39 40 #include <iostream>41 #include <iomanip>42 #include <boost/bind.hpp>43 43 44 44 #ifdef ORXONOX_PLATFORM_UNIX -
code/branches/resource2/src/orxonox/tools/ResourceCollection.cc
r5624 r5652 36 36 namespace orxonox 37 37 { 38 CreateFactory(ResourceCollection); 39 38 40 ResourceCollection::ResourceCollection(BaseObject* creator) 39 41 : BaseObject(creator) -
code/branches/resource2/src/orxonox/tools/ResourceLocation.cc
r5624 r5652 30 30 31 31 #include <OgreResourceGroupManager.h> 32 #include <boost/filesystem.hpp> 33 32 34 #include "util/Exception.h" 35 #include "core/Core.h" 33 36 #include "core/CoreIncludes.h" 37 #include "core/XMLFile.h" 34 38 #include "core/XMLPort.h" 35 39 36 40 namespace orxonox 37 41 { 42 CreateFactory(ResourceLocation); 43 38 44 ResourceLocation::ResourceLocation(BaseObject* creator) 39 45 : BaseObject(creator) … … 43 49 // Default values 44 50 archiveType_ = "FileSystem"; 45 bRecursive_ = false;51 bRecursive_ = true; 46 52 } 47 53 … … 63 69 if (path_.empty()) 64 70 ThrowException(InitialisationFailed, "ResourceLocation: Trying to add one without the path being set"); 71 72 // Find the path 73 boost::filesystem::path path; 74 if (boost::filesystem::exists(Core::getDataPath() / this->getPath())) 75 path = Core::getDataPath() / this->getPath(); 76 else if (Core::isDevelopmentRun() && boost::filesystem::exists(Core::getExternalDataPath() / this->getPath())) 77 path = Core::getExternalDataPath() / this->getPath(); 78 else 79 { 80 COUT(2) << "Warning: ResourceLocation '" << this->getPath() << "' does not seem to exist" << std::endl; 81 return; 82 } 83 65 84 // Add it to the Ogre paths 66 85 Ogre::ResourceGroupManager::getSingleton().addResourceLocation( 67 this->getPath(), this->getArchiveType(), resourceGroup, this->getRecursive());86 path.string(), this->getArchiveType(), resourceGroup, this->getRecursive()); 68 87 resourceGroup_ = resourceGroup; 69 88 }
Note: See TracChangeset
for help on using the changeset viewer.