aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/resource.cpp15
-rw-r--r--scumm/script_v6.cpp1
-rw-r--r--scumm/script_v6he.cpp1
-rw-r--r--scumm/scumm.h1
4 files changed, 13 insertions, 5 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index 0debcace46..a233c045ca 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -507,10 +507,9 @@ void ScummEngine::readResTypeList(int id, uint32 tag, const char *name) {
}
if (_heversion >= 70) {
- // FIXME: these are related to globs
-
- //_fileHandle.read(_globSize, num);
- _fileHandle.seek(4 * num, SEEK_CUR);
+ for (i = 0; i < num; i++) {
+ res.globsize[id][i] = _fileHandle.readUint32LE();
+ }
}
}
}
@@ -534,6 +533,9 @@ void ScummEngine::allocResTypeData(int id, uint32 tag, int num, const char *name
res.roomno[id] = (byte *)calloc(num, sizeof(byte));
res.roomoffs[id] = (uint32 *)calloc(num, sizeof(uint32));
}
+
+ if (_heversion >= 70)
+ res.globsize[id] = (uint32 *)calloc(num, sizeof(uint32));
}
void ScummEngine::loadCharset(int no) {
@@ -569,7 +571,7 @@ void ScummEngine::ensureResourceLoaded(int type, int i) {
debugC(DEBUG_RESOURCE, "ensureResourceLoaded(%s,%d)", resTypeFromId(type), i);
- if (type == rtRoom && i > 0x7F && _version < 7) {
+ if ((type == rtRoom || _heversion >= 70) && i > 0x7F && _version < 7) {
i = _resourceMapper[i & 0x7F];
}
@@ -1959,6 +1961,9 @@ void ScummEngine::freeResources() {
free(res.flags[i]);
free(res.roomno[i]);
free(res.roomoffs[i]);
+
+ if (_heversion >= 70)
+ free(res.globsize[i]);
}
}
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 9fd153823b..5b6c5ba6df 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -1995,6 +1995,7 @@ void ScummEngine_v6::o6_verbOps() {
case 139: // SO_VERB_IMAGE_IN_ROOM
b = pop();
a = pop();
+
if (slot && a != vs->imgindex) {
setVerbObject(b, a, slot);
vs->type = kImageVerbType;
diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp
index 1db4957bc2..065da9541b 100644
--- a/scumm/script_v6he.cpp
+++ b/scumm/script_v6he.cpp
@@ -555,6 +555,7 @@ void ScummEngine_v6he::o6_actorOps() {
switch (b) {
case 30:
+ // _heversion >= 70
k = pop();
j = pop();
i = pop();
diff --git a/scumm/scumm.h b/scumm/scumm.h
index f51ef67e33..383a3d415f 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -351,6 +351,7 @@ protected:
byte *flags[rtNumTypes];
byte *roomno[rtNumTypes];
uint32 *roomoffs[rtNumTypes];
+ uint32 *globsize[rtNumTypes];
} res;
VirtualMachineState vm;