[Scummvm-cvs-logs] CVS: scummvm/scumm resource.cpp,1.332,1.333
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Sun Aug 14 13:47:50 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20530
Modified Files:
resource.cpp
Log Message:
If I understand cyx correctly, this is the proper fix for bug #1253171,
even though I thought it looked a bit hackish when I proposed it.
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.332
retrieving revision 1.333
diff -u -d -r1.332 -r1.333
--- resource.cpp 14 Aug 2005 01:41:52 -0000 1.332
+++ resource.cpp 14 Aug 2005 20:46:02 -0000 1.333
@@ -793,6 +793,16 @@
if (!validateResource("allocating", type, idx))
return NULL;
+
+ if (_vm->_version <= 2) {
+ // Nuking and reloading a resource can be harmful in some
+ // cases. For instance, Zak tries to reload the intro music
+ // while it's playing. See bug #1253171.
+
+ if (address[type][idx] && (type == rtSound || type == rtScript || type == rtCostume))
+ return address[type][idx] + sizeof(MemBlkHeader);
+ }
+
nukeResource(type, idx);
expireResources(size);
More information about the Scummvm-git-logs
mailing list