Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4091 in orxonox.OLD for orxonox/trunk/src/util


Ignore:
Timestamp:
May 6, 2005, 8:02:26 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: now All options get loaded in new style (be aware, quiting only works with ESCAPE, not q, but of corse you can change this now in the GUI

Location:
orxonox/trunk/src/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/resource_manager.cc

    r4033 r4091  
    9999      return false;
    100100    }
     101}
     102
     103/**
     104   \brief checks for the DataDirectory, by looking if
     105   \param fileInside is inisde??
     106*/
     107bool ResourceManager::checkDataDir(const char* fileInside)
     108{
     109  bool retVal;
     110  if (!isDir(this->dataDir))
     111    {
     112      PRINTF(1)("%s is not a directory\n", this->dataDir);
     113      return false;
     114    }
     115 
     116  char* testFile = new char[strlen(this->dataDir)+strlen(fileInside)+1];
     117  sprintf(testFile, "%s%s", this->dataDir, fileInside);
     118  retVal = isFile(testFile);
     119  delete testFile;
     120  return retVal;
    101121}
    102122
  • orxonox/trunk/src/util/resource_manager.h

    r4054 r4091  
    6565
    6666  bool setDataDir(const char* dataDir);
     67  /** \returns the Name of the data directory */
     68  const char*  getDataDir(void) {return this->dataDir;}
     69  bool checkDataDir(const char* fileInside);
    6770  bool addImageDir(char* imageDir);
    6871  void* load(const char* fileName, ResourcePriority prio = RP_NO,
Note: See TracChangeset for help on using the changeset viewer.