diff options
Diffstat (limited to 'resource.cpp')
-rw-r--r-- | resource.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/resource.cpp b/resource.cpp index 5edf1e1776..2d33eaad13 100644 --- a/resource.cpp +++ b/resource.cpp @@ -652,6 +652,22 @@ byte *Scumm::getStringAddress(int i) return b; } +byte *Scumm::getStringAddressVar(int i) +{ + byte *addr; + + addr=getResourceAddress(rtString,_vars[i]); + + if(addr==NULL) + error("NULL string var %d slot %d",i,_vars[i]); + + if (_features & GF_NEW_OPCODES) + return ((ArrayHeader *)addr)->data; + + return(addr); + +} + void Scumm::setResourceCounter(int type, int idx, byte flag) { res.flags[type][idx] &= ~RF_USAGE; @@ -1149,6 +1165,17 @@ void Scumm::allocateArrays() allocResTypeData(rtMatrix, MKID('NONE'), 10, "boxes", 0); } + +uint32 Scumm::isGlobInMemory(int type, int index) +{ + validateResource("isGlobInMemory",type,index); + + if(res.address[type][index]==NULL) + return(0); + + return(1); +} + uint16 newTag2Old(uint32 oldTag) { switch (oldTag) { @@ -1189,3 +1216,4 @@ uint16 newTag2Old(uint32 oldTag) return (0); } } + |