[Scummvm-git-logs] scummvm master -> 3874f454e0bdc9e76e47c7d7339a43fe61b0bdf3
csnover
csnover at users.noreply.github.com
Fri Aug 4 20:32:55 CEST 2017
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5412bda5ab SCI32: Fix loading audio resources from RESSCI.PAT
3874f454e0 SCI32: Always initialize RobotDecoder::_syncFrame
Commit: 5412bda5abf562760b1dc6c4e2d1aed57ecda27a
https://github.com/scummvm/scummvm/commit/5412bda5abf562760b1dc6c4e2d1aed57ecda27a
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-08-04T13:29:55-05:00
Commit Message:
SCI32: Fix loading audio resources from RESSCI.PAT
This is used by Lighthouse.
Changed paths:
engines/sci/resource.cpp
engines/sci/resource.h
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 019aaff..91cdfd2 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -678,7 +678,7 @@ int ResourceManager::addAppropriateSources() {
// SCI2.1 resource patches
if (Common::File::exists("resmap.pat") && Common::File::exists("ressci.pat")) {
// We add this resource with a map which surely won't exist
- addSource(new VolumeResourceSource("ressci.pat", addExternalMap("resmap.pat", 100), 100));
+ addSource(new VolumeResourceSource("ressci.pat", addExternalMap("resmap.pat", kResPatVolumeNumber), kResPatVolumeNumber));
}
}
#else
@@ -732,7 +732,7 @@ int ResourceManager::addAppropriateSourcesForDetection(const Common::FSList &fsl
#ifdef ENABLE_SCI32
// SCI2.1 resource patches
if (filename.contains("resmap.pat"))
- sci21PatchMap = addExternalMap(file, 100);
+ sci21PatchMap = addExternalMap(file, kResPatVolumeNumber);
if (filename.contains("ressci.pat"))
sci21PatchRes = file;
@@ -744,7 +744,7 @@ int ResourceManager::addAppropriateSourcesForDetection(const Common::FSList &fsl
#ifdef ENABLE_SCI32
if (sci21PatchMap && sci21PatchRes)
- addSource(new VolumeResourceSource(sci21PatchRes->getName(), sci21PatchMap, 100, sci21PatchRes));
+ addSource(new VolumeResourceSource(sci21PatchRes->getName(), sci21PatchMap, kResPatVolumeNumber, sci21PatchRes));
#endif
// Now find all the resource.0?? files
@@ -1913,7 +1913,13 @@ int ResourceManager::readResourceMapSCI1(ResourceSource *map) {
addSource(audioMap);
Common::String volumeName;
- if (resId.getNumber() == 65535) {
+ if (mapVolumeNr == kResPatVolumeNumber) {
+ if (resId.getNumber() == 65535) {
+ volumeName = "RESSCI.PAT";
+ } else {
+ volumeName = "RESAUD.001";
+ }
+ } else if (resId.getNumber() == 65535) {
volumeName = Common::String::format("RESSFX.%03d", mapVolumeNr);
} else {
volumeName = Common::String::format("RESAUD.%03d", mapVolumeNr);
diff --git a/engines/sci/resource.h b/engines/sci/resource.h
index bdf46ef..830fe99 100644
--- a/engines/sci/resource.h
+++ b/engines/sci/resource.h
@@ -43,6 +43,11 @@ class SeekableReadStream;
namespace Sci {
enum {
+#ifdef ENABLE_SCI32
+ // Hack to treat RESMAP.PAT/RESSCI.PAT as the highest volume
+ kResPatVolumeNumber = 100,
+#endif
+
kResourceHeaderSize = 2, ///< patch type + header size
/** The maximum allowed size for a compressed or decompressed resource */
Commit: 3874f454e0bdc9e76e47c7d7339a43fe61b0bdf3
https://github.com/scummvm/scummvm/commit/3874f454e0bdc9e76e47c7d7339a43fe61b0bdf3
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-08-04T13:30:02-05:00
Commit Message:
SCI32: Always initialize RobotDecoder::_syncFrame
This flag previously was only being initialized in Robot files
with audio. This means the flag was incorrectly carried to
Robots without audio, and if the first Robot played by the game
had no audio, it would be a garbage read. (This latter thing
happens at the beginning of Lighthouse.)
Changed paths:
engines/sci/video/robot_decoder.cpp
diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp
index 4d62b51..948f437 100644
--- a/engines/sci/video/robot_decoder.cpp
+++ b/engines/sci/video/robot_decoder.cpp
@@ -397,8 +397,6 @@ void RobotDecoder::initPlayback() {
}
void RobotDecoder::initAudio() {
- _syncFrame = true;
-
_audioRecordInterval = RobotAudioStream::kRobotSampleRate / _frameRate;
_expectedAudioBlockSize = _audioBlockSize - kAudioBlockHeaderSize;
@@ -539,6 +537,7 @@ void RobotDecoder::open(const GuiResourceId robotId, const reg_t plane, const in
initPlayback();
+ _syncFrame = true;
_audioBlockSize = _stream->readUint16();
_primerZeroCompressFlag = _stream->readSint16();
_stream->seek(2, SEEK_CUR); // unused
More information about the Scummvm-git-logs
mailing list