Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 30, 2009, 12:00:16 AM (15 years ago)
Author:
rgrieder
Message:

Extracted path related parts of Core into a new PathConfig class. This should decrease the mess in Core.cc a little bit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/libraries/core/GraphicsManager.cc

    r5829 r5836  
    5555#include "ConfigValueIncludes.h"
    5656#include "CoreIncludes.h"
    57 #include "Core.h"
    5857#include "Game.h"
    5958#include "GameMode.h"
    6059#include "Loader.h"
    6160#include "MemoryArchive.h"
     61#include "PathConfig.h"
    6262#include "WindowEventListener.h"
    6363#include "XMLFile.h"
     
    102102
    103103        // At first, add the root paths of the data directories as resource locations
    104         Ogre::ResourceGroupManager::getSingleton().addResourceLocation(Core::getDataPathString(), "FileSystem", "dataRoot", false);
     104        Ogre::ResourceGroupManager::getSingleton().addResourceLocation(PathConfig::getDataPathString(), "FileSystem", "dataRoot", false);
    105105        // Load resources
    106106        resources_.reset(new XMLFile("resources.oxr", "dataRoot"));
     
    109109
    110110        // Only for development runs
    111         if (Core::isDevelopmentRun())
    112         {
    113             Ogre::ResourceGroupManager::getSingleton().addResourceLocation(Core::getExternalDataPathString(), "FileSystem", "externalDataRoot", false);
     111        if (PathConfig::isDevelopmentRun())
     112        {
     113            Ogre::ResourceGroupManager::getSingleton().addResourceLocation(PathConfig::getExternalDataPathString(), "FileSystem", "externalDataRoot", false);
    114114            extResources_.reset(new XMLFile("resources.oxr", "externalDataRoot"));
    115115            extResources_->setLuaSupport(false);
     
    135135        // Undeclare the resources
    136136        Loader::unload(resources_.get());
    137         if (Core::isDevelopmentRun())
     137        if (PathConfig::isDevelopmentRun())
    138138            Loader::unload(extResources_.get());
    139139    }
     
    246246        }
    247247
    248         boost::filesystem::path ogreConfigFilepath(Core::getConfigPath() / this->ogreConfigFile_);
    249         boost::filesystem::path ogreLogFilepath(Core::getLogPath() / this->ogreLogFile_);
     248        boost::filesystem::path ogreConfigFilepath(PathConfig::getConfigPath() / this->ogreConfigFile_);
     249        boost::filesystem::path ogreLogFilepath(PathConfig::getLogPath() / this->ogreLogFile_);
    250250
    251251        // create a new logManager
     
    422422        assert(this->renderWindow_);
    423423       
    424         this->renderWindow_->writeContentsToTimestampedFile(Core::getLogPathString() + "screenShot_", ".jpg");
     424        this->renderWindow_->writeContentsToTimestampedFile(PathConfig::getLogPathString() + "screenShot_", ".jpg");
    425425    }
    426426}
Note: See TracChangeset for help on using the changeset viewer.