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.
This commit is contained in:
Torbjörn Andersson 2021-11-22 14:00:52 +01:00 committed by Filippos Karapetis
parent 4c11b57ca0
commit 513fffe950
3 changed files with 18 additions and 4 deletions

View File

@ -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);
}
/**

View File

@ -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.

View File

@ -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();
}