aboutsummaryrefslogtreecommitdiff
path: root/sword2
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-01-01 13:46:42 +0000
committerTorbjörn Andersson2006-01-01 13:46:42 +0000
commitf3a6427cd4f923ce927c41d3671e7ba78503a2ad (patch)
tree1a494081136d545cc53a37df4934934cd5e40951 /sword2
parentfd27c9e26755a53e41f32dee11f88fe2b96c6189 (diff)
downloadscummvm-rg350-f3a6427cd4f923ce927c41d3671e7ba78503a2ad.tar.gz
scummvm-rg350-f3a6427cd4f923ce927c41d3671e7ba78503a2ad.tar.bz2
scummvm-rg350-f3a6427cd4f923ce927c41d3671e7ba78503a2ad.zip
Hopefully fixed the missing speech bug reported on the forum, once and for
all. svn-id: r19879
Diffstat (limited to 'sword2')
-rw-r--r--sword2/resman.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/sword2/resman.cpp b/sword2/resman.cpp
index c92b989d0e..cf454b3fec 100644
--- a/sword2/resman.cpp
+++ b/sword2/resman.cpp
@@ -145,10 +145,24 @@ ResourceManager::ResourceManager(Sword2Engine *vm) {
for (i = 0; i < _totalClusters; i++) {
file.read(cdInf[i].clusterName, sizeof(cdInf[i].clusterName));
+
cdInf[i].cd = file.readByte();
if (file.ioFailed())
error("Cannot read cd.inf");
+
+ // It has been reported that there are two different versions
+ // of the cd.inf file: One where all clusters on CD also have
+ // the LOCAL_CACHE bit set. This bit is no longer used. To
+ // avoid future problems, let's normalize the flag once and for
+ // all here.
+
+ if (cdInf[i].cd & LOCAL_PERM)
+ cdInf[i].cd = LOCAL_PERM;
+ else if (cdInf[i].cd & CD2)
+ cdInf[i].cd = CD2;
+ else
+ cdInf[i].cd = CD1;
}
file.close();