added getResourceSize method

svn-id: r9109
This commit is contained in:
Max Horn 2003-07-21 21:28:47 +00:00
parent 760bfb2245
commit 0b1b753797
2 changed files with 8 additions and 0 deletions

View File

@ -1269,6 +1269,13 @@ int Scumm::getResourceRoomNr(int type, int idx) {
return res.roomno[type][idx];
}
int Scumm::getResourceSize(int type, int idx) {
byte *ptr = getResourceAddress(type, idx);
MemBlkHeader *hdr = (MemBlkHeader *)(ptr - sizeof(MemBlkHeader));
return hdr->size;
}
byte *Scumm::getResourceAddress(int type, int idx) {
byte *ptr;

View File

@ -623,6 +623,7 @@ protected:
byte *createResource(int type, int index, uint32 size);
int loadResource(int type, int i);
void nukeResource(int type, int i);
int getResourceSize(int type, int idx);
public:
bool isGlobInMemory(int type, int index) const;