diff options
author | Max Horn | 2010-10-24 01:53:01 +0000 |
---|---|---|
committer | Max Horn | 2010-10-24 01:53:01 +0000 |
commit | fa0151683c0cca507f3c16ab8b2ca91a4c4ae83a (patch) | |
tree | 06cd5eaa6e3e98d52965a6334930b43f18928b36 /engines/sword25/kernel/resmanager.h | |
parent | 48d15398e575bb9fa3e015126fa6087511ef9843 (diff) | |
download | scummvm-rg350-fa0151683c0cca507f3c16ab8b2ca91a4c4ae83a.tar.gz scummvm-rg350-fa0151683c0cca507f3c16ab8b2ca91a4c4ae83a.tar.bz2 scummvm-rg350-fa0151683c0cca507f3c16ab8b2ca91a4c4ae83a.zip |
SWORD25: Replace ResourceManager's hash table by a Common::HashMap
svn-id: r53759
Diffstat (limited to 'engines/sword25/kernel/resmanager.h')
-rw-r--r-- | engines/sword25/kernel/resmanager.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/sword25/kernel/resmanager.h b/engines/sword25/kernel/resmanager.h index 7f438bb709..f93206eac6 100644 --- a/engines/sword25/kernel/resmanager.h +++ b/engines/sword25/kernel/resmanager.h @@ -36,6 +36,8 @@ #define SWORD25_RESOURCEMANAGER_H #include "common/list.h" +#include "common/hashmap.h" +#include "common/hash-str.h" #include "sword25/kernel/common.h" @@ -137,10 +139,6 @@ private: {} virtual ~ResourceManager(); - enum { - HASH_TABLE_BUCKETS = 256 - }; - /** * Moves a resource to the top of the resource list * @param pResource The resource @@ -169,7 +167,6 @@ private: /** * Returns a pointer to a loaded resource. If any error occurs, NULL will be returned. * @param UniqueFileName The absolute path and filename - * Gibt einen Pointer auf die angeforderte Resource zurück, oder NULL, wenn die Resourcen nicht geladen ist. */ Resource *getResource(const Common::String &uniqueFileName) const; @@ -182,7 +179,8 @@ private: uint _maxMemoryUsage; Common::Array<ResourceService *> _resourceServices; Common::List<Resource *> _resources; - Common::List<Resource *> _resourceHashTable[HASH_TABLE_BUCKETS]; + typedef Common::HashMap<Common::String, Resource *> ResMap; + ResMap _resourceHashMap; bool _logCacheMiss; }; |