diff options
author | Max Horn | 2006-09-09 18:20:28 +0000 |
---|---|---|
committer | Max Horn | 2006-09-09 18:20:28 +0000 |
commit | 94bd9ef05de9d14ab3fd8895a6fcf681b59646b4 (patch) | |
tree | 1d5dca6ec6b4f1d1c9f9c45217ac18c6ac695915 /engines/scumm/scumm.h | |
parent | b3ee442693d6947a99921055add45eea55d5471b (diff) | |
download | scummvm-rg350-94bd9ef05de9d14ab3fd8895a6fcf681b59646b4.tar.gz scummvm-rg350-94bd9ef05de9d14ab3fd8895a6fcf681b59646b4.tar.bz2 scummvm-rg350-94bd9ef05de9d14ab3fd8895a6fcf681b59646b4.zip |
Moved allocResTypeData from ScummEngine to ResourceManager; removed friend declarations from ResourceManager, and performed other minor tweaks
svn-id: r23856
Diffstat (limited to 'engines/scumm/scumm.h')
-rw-r--r-- | engines/scumm/scumm.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index d1baf2b770..d9ae984bda 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -350,8 +350,8 @@ enum ResTypes { * a 'class', at least until somebody gets around to OOfying this more. */ class ResourceManager { - friend class ScummDebugger; - friend class ScummEngine; + //friend class ScummDebugger; + //friend class ScummEngine; protected: ScummEngine *_vm; @@ -369,18 +369,23 @@ public: uint32 *roomoffs[rtNumTypes]; uint32 *globsize[rtNumTypes]; +protected: uint32 _allocatedSize; uint32 _maxHeapThreshold, _minHeapThreshold; byte _expireCounter; public: ResourceManager(ScummEngine *vm); + ~ResourceManager(); - byte *createResource(int type, int index, uint32 size); - void nukeResource(int type, int i); + void setHeapThreshold(int min, int max); + void allocResTypeData(int id, uint32 tag, int num, const char *name, int mode); void freeResources(); + byte *createResource(int type, int index, uint32 size); + void nukeResource(int type, int i); + bool isResourceLoaded(int type, int index) const; void lock(int type, int i); @@ -390,14 +395,16 @@ public: void setModified(int type, int i); bool isModified(int type, int i) const; + void increaseExpireCounter(); void setResourceCounter(int type, int index, byte flag); void increaseResourceCounter(); void resourceStats(); - void expireResources(uint32 size); - -protected: + +//protected: bool validateResource(const char *str, int type, int index) const; +protected: + void expireResources(uint32 size); }; /** @@ -770,7 +777,7 @@ protected: void loadPtrToResource(int type, int i, const byte *ptr); virtual void readResTypeList(int id, const char *name); - void allocResTypeData(int id, uint32 tag, int num, const char *name, int mode); +// void allocResTypeData(int id, uint32 tag, int num, const char *name, int mode); // byte *createResource(int type, int index, uint32 size); int loadResource(int type, int i); // void nukeResource(int type, int i); |