Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9796 in orxonox.OLD for branches/new_class_id


Ignore:
Timestamp:
Sep 23, 2006, 7:15:25 PM (18 years ago)
Author:
bensch
Message:

switched to checks of the NewResourceManager in orxonox.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/orxonox.cc

    r9795 r9796  
    341341  if ((dataPath = Preferences::getInstance()->getString(CONFIG_SECTION_GENERAL, CONFIG_NAME_DATADIR, ""))!= "")
    342342  {
    343     if (!ResourceManager::getInstance()->setDataDir(dataPath) &&
    344         !ResourceManager::getInstance()->verifyDataDir(DEFAULT_DATA_DIR_CHECKFILE))
     343    NewResourceManager::getInstance()->setMainGlobalPath(dataPath) ;
     344    if(!NewResourceManager::getInstance()->checkFileInMainPath(File(DEFAULT_DATA_DIR_CHECKFILE)))
    345345    {
    346346      PRINTF(1)("Data Could not be located in %s\n", dataPath.c_str());
    347347    }
    348348  }
    349 
    350 
    351   while (!ResourceManager::getInstance()->verifyDataDir(DEFAULT_DATA_DIR_CHECKFILE))
     349  while (!NewResourceManager::getInstance()->checkFileInMainPath(File(DEFAULT_DATA_DIR_CHECKFILE)))
    352350  {
    353351
    354352    PRINTF(1)("The DataDirectory %s could not be verified\n\nh" \
    355353              "!!!  Please Change in File %s Section %s Entry %s to a suitable value !!!\n",
    356               ResourceManager::getInstance()->getDataDir().c_str(),
     354              NewResourceManager::getInstance()->mainGlobalPath().c_str(),
    357355              this->configFileName.c_str(),
    358356              CONFIG_SECTION_GENERAL,
     
    363361      return(-1);
    364362    delete gui;
    365     ResourceManager::getInstance()->setDataDir(Preferences::getInstance()->getString(CONFIG_SECTION_GENERAL, CONFIG_NAME_DATADIR, ""));
    366   }
    367 
    368   NewResourceManager::getInstance()->setMainGlobalPath(dataPath);
    369   if (!NewResourceManager::getInstance()->checkFileInMainPath(File(DEFAULT_DATA_DIR_CHECKFILE)))
    370     exit(-1);
    371 
     363    NewResourceManager::getInstance()->setMainGlobalPath(Preferences::getInstance()->getString(CONFIG_SECTION_GENERAL, CONFIG_NAME_DATADIR, ""));
     364  }
     365
     366  ResourceManager::getInstance()->setDataDir(dataPath);
    372367
    373368  //! @todo this is a hack and should be loadable
Note: See TracChangeset for help on using the changeset viewer.