28 #ifndef GOB_RESOURCES_H 29 #define GOB_RESOURCES_H 31 #include "common/str.h" 35 class SeekableReadStream;
44 Resource(byte *data, int32 size,
bool needFree =
true,
45 int16 width = 0, int16 height = 0);
48 byte *getData ()
const;
49 int32 getSize ()
const;
50 int16 getWidth ()
const;
51 int16 getHeight()
const;
70 byte *getData()
const;
71 int32 getSize()
const;
88 void unload(
bool del =
true);
90 bool isLoaded()
const;
92 Resource *getResource(uint16
id, int16 *width = 0, int16 *height = 0)
const;
93 TextItem *getTextItem(uint16
id)
const;
95 byte *getTexts()
const;
97 bool dumpResource(
const Resource &resource,
99 bool dumpResource(
const Resource &resource, uint16
id,
104 static const int kTOTResItemSize = 4 + 2 + 2 + 2;
105 static const int kTOTResTableSize = 2 + 1;
106 static const int kEXTResItemSize = 4 + 2 + 2 + 2;
107 static const int kEXTResTableSize = 2 + 1;
108 static const int kTOTTextTableSize = 2;
109 static const int kTOTTextItemSize = 2 + 2;
118 struct TOTResourceItem {
129 struct TOTResourceTable {
132 TOTResourceItem *items;
139 struct EXTResourceItem {
148 struct EXTResourceTable {
151 EXTResourceItem *items;
162 struct TOTTextTable {
191 TOTResourceTable *_totResourceTable;
192 EXTResourceTable *_extResourceTable;
193 TOTTextTable *_totTextTable;
195 bool loadTOTResourceTable();
196 bool loadEXTResourceTable();
201 byte *loadTOTLocTexts(
const Common::String &fileBase, int32 &size);
202 bool getLocTextFile(
char *locTextFile,
int language);
205 Resource *getTOTResource(uint16
id)
const;
206 Resource *getEXTResource(uint16
id)
const;
208 byte *getTOTData(TOTResourceItem &totItem)
const;
209 byte *getIMData(TOTResourceItem &totItem)
const;
210 byte *getEXTData(EXTResourceItem &extItem, uint32 &size)
const;
211 byte *getEXData(EXTResourceItem &extItem, uint32 &size)
const;
216 #endif // GOB_RESOURCES_H
Path
Definition: game.h:75
Definition: resources.h:65
Definition: algorithm.h:29
Definition: resources.h:82
Definition: resources.h:42