Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 924


Ignore:
Timestamp:
Mar 25, 2008, 11:05:52 PM (16 years ago)
Author:
bknecht
Message:

those changes enable setting the data-repos via arguments and ini-file

Location:
code/branches/script/src/orxonox
Files:
2 edited

Legend:

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

    r911 r924  
    4848  {
    4949    RegisterObject(GraphicsEngine);
    50     this->bOverwritePath_ = false;
     50    //this->bOverwritePath_ = false;
    5151    this->setConfigValues();
    5252    // set to standard values
     
    6363  {
    6464    SetConfigValue(dataPath_, dataPath_).description("relative path to media data");
    65     //if(this->bOverwritePath_)
    66       ResetConfigValue(dataPath_);
    6765
    6866  }
     
    10098  bool GraphicsEngine::load(std::string dataPath)
    10199  {
    102     if( dataPath != "" ) {
     100    // temporary overwrite of dataPath, change ini file for permanent change
     101    if( dataPath != "" )
    103102      dataPath_ = dataPath;
    104       bOverwritePath_ = true;
    105       setConfigValues();
    106     }
    107103    loadRessourceLocations(this->dataPath_);
    108104    if (!root_->restoreConfig() && !root_->showConfigDialog())
     
    115111    root_->initialise(true, "OrxonoxV2");
    116112    TextureManager::getSingleton().setDefaultNumMipmaps(5);
     113    //TODO: Do NOT load all the groups, why are we doing that? And do we really do that? initialise != load...
    117114    ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
    118115  }
     
    124121    // Load resource paths from data file using configfile ressource type
    125122    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;*/
    131123    cf.load(dataPath + "resources.cfg");
    132124
  • code/branches/script/src/orxonox/GraphicsEngine.h

    r911 r924  
    4242      std::string         dataPath_;    //!< path to data file
    4343      Ogre::SceneManager* scene_;       //!< scene manager of the game
    44       bool               bOverwritePath_; //!< overwrites path
     44      //bool               bOverwritePath_; //!< overwrites path
    4545
    4646  };
Note: See TracChangeset for help on using the changeset viewer.