Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5308 in orxonox.OLD for trunk/src/util/resource_manager.h


Ignore:
Timestamp:
Oct 8, 2005, 12:32:52 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: Fixed a reversive BUG in the ResourceManager:
Since resources, that depend on each other are loaded left tgo right they must be unlinked right to left… this cost me 3 hours.
What a luck i found this :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/resource_manager.h

    r5306 r5308  
    6666{
    6767  BaseObject*       pointer;           //!< Pointer to the Resource.
    68   int               count;             //!< How many times this Resource has been loaded.
     68  unsigned int      count;             //!< How many times this Resource has been loaded.
    6969
    7070  char*             name;              //!< Name of the Resource.
     
    8585//! The ResourceManager is a class, that decides if a file/resource should be loaded
    8686/**
    87    If a file/resource was already loaded the resourceManager will
    88    return a void pointer to the desired resource.
    89    Otherwise it will instruct the corresponding resource-loader to load,
    90    and receive the pointer to it.
    91 
    92    It does it by looking, if a desired file has already been loaded.
    93 */
     87 * If a file/resource was already loaded the resourceManager will
     88 * return a pointer to the desired resource.
     89 * Otherwise it will instruct the corresponding resource-loader to load,
     90 * and receive the pointer to it.
     91 *
     92 * It does it by looking, if a desired file has already been loaded.
     93 * There is also the possibility to check for some variables
     94 */
    9495class ResourceManager : public BaseObject
    9596{
     
    101102  bool setDataDir(const char* dataDir);
    102103  /** @returns the Name of the data directory */
    103   inline const char* getDataDir() const {return this->dataDir;}
     104  inline const char* getDataDir() const { return this->dataDir; };
    104105
    105106  bool checkDataDir(const char* fileInside);
     
    135136  static ResourceManager*  singletonRef;       //!< singleton Reference
    136137
     138  char*                    dataDir;            //!< The Data Directory, where all relevant Data is stored.
    137139  tList<Resource>*         resourceList;       //!< The List of Resources, that has already been loaded.
    138   char*                    dataDir;            //!< The Data Directory, where all relevant Data is stored.
    139140  tList<char>*             imageDirs;          //!< A list of directories in which images are stored.
    140141
Note: See TracChangeset for help on using the changeset viewer.