26 #ifndef SAGA2_HRESMGR_H 27 #define SAGA2_HRESMGR_H 29 #include "common/file.h" 34 #define USE_MEMORY_MAPPED_FILES 0 40 typedef uint32 hResID;
43 #define BAD_ID ((hResID)0xFFFFFFFFL) 44 #define NATURAL_SIZE ((hResID)0xFFFFFFFFL) 76 return ((size & 0xFF000000L) != 0L);
80 return ((offset & (1L << 31)) != 0L);
84 return (offset & 0x0FFFFFFFL);
87 return (size & 0x00FFFFFF);
125 uint32 size(hResID
id);
127 uint32 count(hResID
id);
128 bool seek(hResID
id);
130 uint32 readbytes(
void *buffer, uint32 size);
132 inline size_t bytesleft() {
136 bool read(
void *buffer, uint32 size);
137 bool skip(uint32 amount);
138 bool get(hResID id,
void *buffer, uint32 size);
139 uint32 getSize(hResID
id,
const char desc[]);
142 void releaseIndexData();
156 uint32 _firstGroupOffset;
169 #define HRES_ID MKTAG('H','R','E','S')
Definition: hresmgr.h:152