mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-22 18:37:01 +00:00
added getResourceSize method
svn-id: r9109
This commit is contained in:
parent
760bfb2245
commit
0b1b753797
@ -1269,6 +1269,13 @@ int Scumm::getResourceRoomNr(int type, int idx) {
|
|||||||
return res.roomno[type][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 *Scumm::getResourceAddress(int type, int idx) {
|
||||||
byte *ptr;
|
byte *ptr;
|
||||||
|
|
||||||
|
@ -623,6 +623,7 @@ protected:
|
|||||||
byte *createResource(int type, int index, uint32 size);
|
byte *createResource(int type, int index, uint32 size);
|
||||||
int loadResource(int type, int i);
|
int loadResource(int type, int i);
|
||||||
void nukeResource(int type, int i);
|
void nukeResource(int type, int i);
|
||||||
|
int getResourceSize(int type, int idx);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool isGlobInMemory(int type, int index) const;
|
bool isGlobInMemory(int type, int index) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user