[Scummvm-git-logs] scummvm master -> 513fffe950bbe979bd8052ce3438e954ed09b81f
bluegr
noreply at scummvm.org
Mon Nov 22 17:38:44 UTC 2021
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:
4c11b57ca0 BACKEND: Make it possible to check for other audio track numbers than 1
513fffe950 SCUMM: Check for the appropriate audio tracks for indyzak and zakloom
Commit: 4c11b57ca006c33e04c907085f535e6fd3806871
https://github.com/scummvm/scummvm/commit/4c11b57ca006c33e04c907085f535e6fd3806871
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-11-22T19:38:40+02:00
Commit Message:
BACKEND: Make it possible to check for other audio track numbers than 1
Changed paths:
backends/audiocd/audiocd.h
backends/audiocd/default/default-audiocd.cpp
backends/audiocd/default/default-audiocd.h
diff --git a/backends/audiocd/audiocd.h b/backends/audiocd/audiocd.h
index 6270b801ab..54e65604b1 100644
--- a/backends/audiocd/audiocd.h
+++ b/backends/audiocd/audiocd.h
@@ -109,7 +109,7 @@ public:
* Checks whether the extracted audio cd tracks exists as files in
* the search paths.
*/
- virtual bool existExtractedCDAudioFiles() = 0;
+ virtual bool existExtractedCDAudioFiles(uint track) = 0;
};
#endif
diff --git a/backends/audiocd/default/default-audiocd.cpp b/backends/audiocd/default/default-audiocd.cpp
index 807c7bff7b..acc0b4e56c 100644
--- a/backends/audiocd/default/default-audiocd.cpp
+++ b/backends/audiocd/default/default-audiocd.cpp
@@ -64,7 +64,7 @@ void DefaultAudioCDManager::fillPotentialTrackNames(Common::Array<Common::String
trackNames.push_back(Common::String::format("track_%02d", track));
}
-bool DefaultAudioCDManager::existExtractedCDAudioFiles() {
+bool DefaultAudioCDManager::existExtractedCDAudioFiles(uint track) {
// keep this in sync with STREAM_FILEFORMATS
const char *extensions[] = {
#ifdef USE_VORBIS
@@ -82,7 +82,7 @@ bool DefaultAudioCDManager::existExtractedCDAudioFiles() {
};
Common::Array<Common::String> trackNames;
- fillPotentialTrackNames(trackNames, 1);
+ fillPotentialTrackNames(trackNames, track);
for (Common::Array<Common::String>::iterator i = trackNames.begin(); i != trackNames.end(); ++i) {
for (const char **ext = extensions; *ext; ++ext) {
diff --git a/backends/audiocd/default/default-audiocd.h b/backends/audiocd/default/default-audiocd.h
index 7451a15d04..40894ddc09 100644
--- a/backends/audiocd/default/default-audiocd.h
+++ b/backends/audiocd/default/default-audiocd.h
@@ -48,7 +48,7 @@ public:
virtual void setBalance(int8 balance);
virtual void update();
virtual Status getStatus() const; // Subclasses should override for better status results
- virtual bool existExtractedCDAudioFiles();
+ virtual bool existExtractedCDAudioFiles(uint track);
private:
void fillPotentialTrackNames(Common::Array<Common::String> &trackNames, int track) const;
Commit: 513fffe950bbe979bd8052ce3438e954ed09b81f
https://github.com/scummvm/scummvm/commit/513fffe950bbe979bd8052ce3438e954ed09b81f
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-11-22T19:38:40+02:00
Commit Message:
SCUMM: Check for the appropriate audio tracks for indyzak and zakloom
The FM Towns demos use audio tracks, but neither have a track 1. This
caused ScummVM to warn that the audio tracks had not been properly
ripped from the CD.
Changed paths:
engines/engine.cpp
engines/engine.h
engines/scumm/scumm.cpp
diff --git a/engines/engine.cpp b/engines/engine.cpp
index e60769a50a..bfaa53f3e0 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -486,8 +486,8 @@ void GUIErrorMessageFormat(Common::U32String fmt, ...) {
* @return true if audio files of the expected naming scheme are found, as long as ScummVM
* is also built with support to the respective audio format (eg. ogg, flac, mad/mp3)
*/
-bool Engine::existExtractedCDAudioFiles() {
- return g_system->getAudioCDManager()->existExtractedCDAudioFiles();
+bool Engine::existExtractedCDAudioFiles(uint track) {
+ return g_system->getAudioCDManager()->existExtractedCDAudioFiles(track);
}
/**
diff --git a/engines/engine.h b/engines/engine.h
index e0d124a4be..1a45553a41 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -602,7 +602,7 @@ public:
/**
* Check if extracted CD Audio files are found.
*/
- bool existExtractedCDAudioFiles();
+ bool existExtractedCDAudioFiles(uint track = 1);
/**
* On some systems, check whether the game appears to be run
* from the same CD drive, which also should play CD audio.
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 9c5d81ef2f..8f0ae01ef9 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1514,7 +1514,21 @@ void ScummEngine::setupScumm(const Common::String &macResourceFile) {
// On some systems it's not safe to run CD audio games from the CD.
if (_game.features & GF_AUDIOTRACKS && !Common::File::exists("CDDA.SOU")) {
- if (!existExtractedCDAudioFiles()
+ uint track;
+
+ // Usually we check if track 1 is present, but the FM Towns demos use
+ // different ones.
+
+ if (strcmp(_game.gameid, "indyzak") == 0) {
+ // Has only track 17 and 18
+ track = 17;
+ } else if (strcmp(_game.gameid, "zakloom") == 0) {
+ // Has only track 15 and 16
+ track = 15;
+ } else
+ track = 1;
+
+ if (!existExtractedCDAudioFiles(track)
&& !isDataAndCDAudioReadFromSameCD()) {
warnMissingExtractedCDAudio();
}
More information about the Scummvm-git-logs
mailing list