aboutsummaryrefslogtreecommitdiff
path: root/scumm/resource.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2004-09-18 23:48:48 +0000
committerEugene Sandulenko2004-09-18 23:48:48 +0000
commit4869c2f9c1fe850b57e520b7001e6eebd5a3bd14 (patch)
treed9ab4bce2466c4808f83244bd8ae4840f0468c70 /scumm/resource.cpp
parentc7ba97b18231ecbf440338bd5286385ab100dc04 (diff)
downloadscummvm-rg350-4869c2f9c1fe850b57e520b7001e6eebd5a3bd14.tar.gz
scummvm-rg350-4869c2f9c1fe850b57e520b7001e6eebd5a3bd14.tar.bz2
scummvm-rg350-4869c2f9c1fe850b57e520b7001e6eebd5a3bd14.zip
Revert last commit by Fingolfin "removed _heV7RoomIntOffsets".
res.roomoffs[rtRoom] has a nick _roomFileOffsets (by means of #define), and it gets overwritten in ScummEngine::readRoomsOffsets(). HE games actually stored those offsets in additional array. Removing it breaks all HE72+ games badly. svn-id: r15178
Diffstat (limited to 'scumm/resource.cpp')
-rw-r--r--scumm/resource.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index 3bcc41abdf..45e08eb28c 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -699,6 +699,9 @@ void ScummEngine::readResTypeList(int id, uint32 tag, const char *name) {
}
for (i = 0; i < num; i++) {
res.roomoffs[id][i] = _fileHandle.readUint32LE();
+
+ if (id == rtRoom && _heversion >= 70)
+ _heV7RoomIntOffsets[i] = res.roomoffs[id][i];
}
if (_heversion >= 70) {
@@ -730,6 +733,9 @@ void ScummEngine::allocResTypeData(int id, uint32 tag, int num, const char *name
if (_heversion >= 70) {
res.globsize[id] = (uint32 *)calloc(num, sizeof(uint32));
+
+ if (id == rtRoom)
+ _heV7RoomIntOffsets = (uint32 *)calloc(num, sizeof(uint32));
}
}
@@ -826,7 +832,7 @@ int ScummEngine::loadResource(int type, int idx) {
if (_version == 8)
fileOffs = 8;
else if (_heversion >= 70)
- fileOffs = res.roomoffs[type][idx];
+ fileOffs = _heV7RoomIntOffsets[idx];
else
fileOffs = 0;
} else {
@@ -2180,6 +2186,7 @@ void ScummEngine::freeResources() {
free(res.globsize[i]);
}
if (_heversion >= 70) {
+ free(_heV7RoomIntOffsets);
free(_heV7RoomOffsets);
}
}