Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 20, 2008, 3:56:23 PM (17 years ago)
Author:
bknecht
Message:

applied some old changes (compiles, but may fail running)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/script/src/orxonox/GraphicsEngine.cc

    r790 r911  
    3636#include <OgreTextureManager.h>
    3737
     38#include "core/CoreIncludes.h"
    3839#include "core/Debug.h"
    3940#include "GraphicsEngine.h"
     
    4647  GraphicsEngine::GraphicsEngine()
    4748  {
     49    RegisterObject(GraphicsEngine);
     50    this->bOverwritePath_ = false;
     51    this->setConfigValues();
    4852    // set to standard values
    4953    this->configPath_ = "";
    50     this->dataPath_ = "";
    5154    scene_ = NULL;
    5255  }
     
    5558  GraphicsEngine::~GraphicsEngine()
    5659  {
     60  }
     61
     62  void GraphicsEngine::setConfigValues()
     63  {
     64    SetConfigValue(dataPath_, dataPath_).description("relative path to media data");
     65    //if(this->bOverwritePath_)
     66      ResetConfigValue(dataPath_);
     67
    5768  }
    5869
     
    8798  }
    8899
    89   bool GraphicsEngine::load()
     100  bool GraphicsEngine::load(std::string dataPath)
    90101  {
     102    if( dataPath != "" ) {
     103      dataPath_ = dataPath;
     104      bOverwritePath_ = true;
     105      setConfigValues();
     106    }
    91107    loadRessourceLocations(this->dataPath_);
    92108    if (!root_->restoreConfig() && !root_->showConfigDialog())
     
    108124    // Load resource paths from data file using configfile ressource type
    109125    ConfigFile cf;
     126    /*dataPath = "/home/piranha/orxonox/trunk/";
     127    //dataPath += "resources.cfg";
     128    std::cout << "*******************" << std::endl;
     129    std::cout << dataPath << std::endl;
     130    std::cout << "*******************" << std::endl;*/
    110131    cf.load(dataPath + "resources.cfg");
    111132
Note: See TracChangeset for help on using the changeset viewer.