aboutsummaryrefslogtreecommitdiff
path: root/resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'resource.cpp')
-rw-r--r--resource.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/resource.cpp b/resource.cpp
index d89df0abeb..6cb4366eb4 100644
--- a/resource.cpp
+++ b/resource.cpp
@@ -652,12 +652,12 @@ byte *Scumm::getStringAddress(int i)
return b;
}
-byte *Scumm::getStringAddressVar(int i)
-{
+
+
+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]);
@@ -665,7 +665,6 @@ byte *Scumm::getStringAddressVar(int i)
return ((ArrayHeader *)addr)->data;
return(addr);
-
}
void Scumm::setResourceCounter(int type, int idx, byte flag)
@@ -1163,16 +1162,27 @@ void Scumm::allocateArrays()
}
+
+
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) {
@@ -1214,3 +1224,4 @@ uint16 newTag2Old(uint32 oldTag)
}
}
+