24 #ifndef SWORD2_RESMAN_H 25 #define SWORD2_RESMAN_H 31 #define MAX_MEM_CACHE (8 * 1024 * 1024) // we keep up to 8 megs of resource data files in memory 32 #define MAX_res_files 20 56 void removeFromCacheList(
Resource *res);
63 uint32 _totalResFiles;
64 uint32 _totalClusters;
68 uint16 *_resConvTable;
81 uint32 getNumResFiles() {
return _totalResFiles; }
82 uint32 getNumClusters() {
return _totalClusters; }
84 Resource *getResList() {
return _resList; }
86 byte *openResource(uint32 res,
bool dump =
false);
87 void closeResource(uint32 res);
89 bool checkValid(uint32 res);
90 uint32 fetchLen(uint32 res);
91 uint8 fetchType(byte *ptr);
92 uint8 fetchType(uint32 res) {
93 byte *ptr = openResource(res);
94 uint8 type = fetchType(ptr);
100 byte *fetchName(uint32 res, byte *buf =
nullptr) {
101 static byte tempbuf[NAME_LEN];
106 byte *ptr = openResource(res);
107 memcpy(buf, ptr + 10, NAME_LEN);
113 byte *fetchName(byte *ptr) {
118 void askForCD(
int cd);
129 void remove(
int res);
134 void killAll(
bool wantInfo);
135 void killAllObjects(
bool wantInfo);
Definition: animation.h:37
Definition: algorithm.h:29