Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 13, 2005, 11:16:33 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/physics: merged the Trunk into the physics Branche again:
merged with command:
svn merge ../trunk physics -r 3953:HEAD
no important conflicts

Location:
orxonox/branches/physics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/physics

    • Property svn:externals
      •  

        old new  
        1 data http://svn.orxonox.ethz.ch/data
         1
  • orxonox/branches/physics/src/util/resource_manager.h

    r3953 r4178  
    1818
    1919//! An eumerator for different fileTypes the resourceManager supports \todo WAV, MP3, OGG support
    20 enum ResourceType {OBJ, PRIM, WAV, MP3, OGG, TTF, IMAGE};
     20enum ResourceType {OBJ,
     21                   PRIM,
     22                   WAV,
     23                   MP3,
     24                   OGG,
     25                   TTF,
     26                   IMAGE};
    2127//! An enumerator for different UNLOAD-types.
    2228/**
     
    2632   RP_GAME: will be unloaded at the end of the whole Game (when closing orxonox)
    2733*/
    28 enum ResourcePriority {RP_NO = 0, RP_LEVEL = 1, RP_CAMPAIGN = 2, RP_GAME = 3};
     34enum ResourcePriority {RP_NO = 0,
     35                       RP_LEVEL = 1,
     36                       RP_CAMPAIGN = 2,
     37                       RP_GAME = 3};
    2938
    3039//! A Struct that keeps track about A resource its name its Type, and so on
     
    6574
    6675  bool setDataDir(const char* dataDir);
     76  /** \returns the Name of the data directory */
     77  inline const char* getDataDir(void) const {return this->dataDir;}
     78
     79  bool checkDataDir(const char* fileInside);
    6780  bool addImageDir(char* imageDir);
    6881  void* load(const char* fileName, ResourcePriority prio = RP_NO,
     
    7386  bool unload(Resource* resource, ResourcePriority = RP_NO);
    7487  bool unloadAllByPriority(ResourcePriority prio);
     88
    7589  void debug(void);
     90
     91  // utility functions of this class
     92  static bool isDir(const char* directory);
     93  static bool isFile(const char* fileName);
     94  static bool touchFile(const char* fileName);
     95  static bool deleteFile(const char* fileName);
     96  static char* homeDirCheck(const char* fileName);
     97  static char* getFullName(const char* fileName);
    7698
    7799 private:
     
    87109  Resource* locateResourceByPointer(const void* pointer);
    88110 
    89   bool isDir(const char* directory);
    90   bool isFile(const char* directory);
    91 
    92111};
    93112
Note: See TracChangeset for help on using the changeset viewer.