mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
Fix regression in SCI1/1.1 wave sound from r46660. I knew it was a bad omen to have that revision number :P
svn-id: r46664
This commit is contained in:
parent
538806af19
commit
fedd4f1076
@ -193,7 +193,7 @@ ResourceSource *ResourceManager::getVolume(ResourceSource *map, int volume_nr) {
|
||||
|
||||
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 @@ void ResourceManager::processPatch(ResourceSource *source, ResourceType restype,
|
||||
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 @@ void ResourceManager::readWaveAudioPatches() {
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ public:
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user