[Scummvm-git-logs] scummvm master -> a3ff687d3b53b81d412d5bb157834e643cea3532
sev-
noreply at scummvm.org
Wed Jan 25 23:13:03 UTC 2023
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:
e71317d054 DIRECTOR: Enhance printed Cast info, show full path when it is specified
a3ff687d3b DIRECTOR: Properly load external sound cast members
Commit: e71317d0542425e308bbb08b1d7ada72523993a9
https://github.com/scummvm/scummvm/commit/e71317d0542425e308bbb08b1d7ada72523993a9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-01-26T00:12:50+01:00
Commit Message:
DIRECTOR: Enhance printed Cast info, show full path when it is specified
Changed paths:
engines/director/cast.cpp
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 65ea9d08dc7..e0bbc9f8e9e 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -1535,6 +1535,10 @@ Common::String Cast::formatCastSummary(int castId = -1) {
*it, castTypeToString(castMember->_type).c_str(),
castMemberInfo ? castMemberInfo->name.c_str() : ""
);
+
+ if (castMemberInfo && !castMemberInfo->fileName.empty())
+ result += ", filename=\"" + castMemberInfo->directory + g_director->_dirSeparator + castMemberInfo->fileName + "\"";
+
if (!info.empty()) {
result += ", ";
result += info;
Commit: a3ff687d3b53b81d412d5bb157834e643cea3532
https://github.com/scummvm/scummvm/commit/a3ff687d3b53b81d412d5bb157834e643cea3532
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-01-26T00:12:55+01:00
Commit Message:
DIRECTOR: Properly load external sound cast members
Changed paths:
engines/director/cast.cpp
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index e0bbc9f8e9e..82dd3dadb42 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -765,29 +765,29 @@ void Cast::loadSoundData(int key, SoundCastMember *soundCast) {
sndData = _castArchive->getResource(tag, sndId);
}
- if (sndData != nullptr) {
- if (sndData->size() == 0) {
- // audio file is linked, load from the filesystem
- Common::String filename = _castsInfo[key]->fileName;
+ if (sndData == nullptr || sndData->size() == 0) {
+ // audio file is linked, load from the filesystem
+ Common::String filename = _castsInfo[key]->fileName;
- if (!_castsInfo[key]->directory.empty())
- filename = _castsInfo[key]->directory + g_director->_dirSeparator + _castsInfo[key]->fileName;
+ if (!_castsInfo[key]->directory.empty())
+ filename = _castsInfo[key]->directory + g_director->_dirSeparator + _castsInfo[key]->fileName;
- AudioFileDecoder *audio = new AudioFileDecoder(filename);
- soundCast->_audio = audio;
- } else {
- SNDDecoder *audio = new SNDDecoder();
- audio->loadStream(*sndData);
- soundCast->_audio = audio;
- soundCast->_size = sndData->size();
- if (_version < kFileVer400) {
- // The looping flag wasn't added to sound cast members until D4.
- // In older versions, always loop sounds that contain a loop start and end.
- soundCast->_looping = audio->hasLoopBounds();
- }
+ warning("Filename is: %s", filename.c_str());
+
+ AudioFileDecoder *audio = new AudioFileDecoder(filename);
+ soundCast->_audio = audio;
+ } else {
+ SNDDecoder *audio = new SNDDecoder();
+ audio->loadStream(*sndData);
+ soundCast->_audio = audio;
+ soundCast->_size = sndData->size();
+ if (_version < kFileVer400) {
+ // The looping flag wasn't added to sound cast members until D4.
+ // In older versions, always loop sounds that contain a loop start and end.
+ soundCast->_looping = audio->hasLoopBounds();
}
- delete sndData;
}
+ delete sndData;
}
void Cast::loadCastMemberData() {
More information about the Scummvm-git-logs
mailing list