[Scummvm-cvs-logs] SF.net SVN: scummvm:[46664] scummvm/trunk/engines/sci
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Mon Dec 28 00:35:23 CET 2009
Revision: 46664
http://scummvm.svn.sourceforge.net/scummvm/?rev=46664&view=rev
Author: mthreepwood
Date: 2009-12-27 23:35:22 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
Fix regression in SCI1/1.1 wave sound from r46660. I knew it was a bad omen to have that revision number :P
Modified Paths:
--------------
scummvm/trunk/engines/sci/resource.cpp
scummvm/trunk/engines/sci/resource.h
Modified: scummvm/trunk/engines/sci/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/resource.cpp 2009-12-27 22:55:37 UTC (rev 46663)
+++ scummvm/trunk/engines/sci/resource.cpp 2009-12-27 23:35:22 UTC (rev 46664)
@@ -193,7 +193,7 @@
bool ResourceManager::loadPatch(Resource *res, Common::File &file) {
// We assume that the resource type matches res->type
- file.seek(res->file_offset, SEEK_SET);
+ file.seek(res->file_offset + 2, SEEK_SET);
res->data = new byte[res->size];
@@ -944,7 +944,7 @@
newrsc->source = source;
newrsc->size = fsize - patch_data_offset - 2;
newrsc->headerSize = patch_data_offset;
- newrsc->file_offset = 2;
+ newrsc->file_offset = 0;
debugC(1, kDebugLevelResMan, "Patching %s - OK", source->location_name.c_str());
}
@@ -1034,7 +1034,7 @@
newrsc->source = psrcPatch;
newrsc->size = fileSize;
newrsc->headerSize = 0;
- newrsc->file_offset = 0; // No patch header
+ newrsc->file_offset = -2; // Use -2 to signal there's no patch header
debugC(1, kDebugLevelResMan, "Patching %s - OK", psrcPatch->location_name.c_str());
}
}
Modified: scummvm/trunk/engines/sci/resource.h
===================================================================
--- scummvm/trunk/engines/sci/resource.h 2009-12-27 22:55:37 UTC (rev 46663)
+++ scummvm/trunk/engines/sci/resource.h 2009-12-27 23:35:22 UTC (rev 46664)
@@ -204,7 +204,7 @@
byte *header;
uint32 headerSize;
protected:
- uint32 file_offset; /**< Offset in file */
+ int32 file_offset; /**< Offset in file */
ResourceStatus status;
uint16 lockers; /**< Number of places where this resource was locked */
ResourceSource *source;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list