From 4c74db446385611a158efcdab67a27107d8b20aa Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sat, 2 Aug 2008 23:11:31 +0000 Subject: add non-interactive lol demo svn-id: r33556 --- engines/kyra/kyra_hof.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'engines/kyra/kyra_hof.cpp') diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index d3de621707..27d905435f 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -251,7 +251,7 @@ int KyraEngine_HoF::init() { _abortIntroFlag = false; if (_sequenceStrings) { - for (int i = 0; i < 33; i++) + for (int i = 0; i < MIN(33, _sequenceStringsSize); i++) _sequenceStringsDuration[i] = (int) strlen(_sequenceStrings[i]) * 8; } @@ -278,7 +278,10 @@ int KyraEngine_HoF::go() { seq_showStarcraftLogo(); if (_flags.isDemo && !_flags.isTalkie) { - seq_playSequences(kSequenceDemoVirgin, kSequenceDemoFisher); + if (_flags.gameID == GI_LOL) + seq_playSequences(kSequenceLolDemoScene1, kSequenceLolDemoScene6); + else + seq_playSequences(kSequenceDemoVirgin, kSequenceDemoFisher); _menuChoice = 4; } else { seq_playSequences(kSequenceVirgin, kSequenceZanfaun); -- cgit v1.2.3 From e2e0b1393b1dc73850d216c2527e40b4b87e38ef Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 5 Aug 2008 12:13:01 +0000 Subject: Output errors on (some) missing files. svn-id: r33635 --- engines/kyra/kyra_hof.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'engines/kyra/kyra_hof.cpp') diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 27d905435f..08e13a54af 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -295,10 +295,12 @@ int KyraEngine_HoF::go() { if (_menuChoice != 4) { // load just the pak files needed for ingame _res->loadPakFile(StaticResource::staticDataFilename()); - if (_flags.platform == Common::kPlatformPC && _flags.isTalkie) - _res->loadFileList("FILEDATA.FDT"); - else + if (_flags.platform == Common::kPlatformPC && _flags.isTalkie) { + if (!_res->loadFileList("FILEDATA.FDT")) + error("couldn't load 'FILEDATA.FDT'"); + } else { _res->loadFileList(_ingamePakList, _ingamePakListSize); + } if (_flags.platform == Common::kPlatformPC98) _res->loadPakFile("AUDIO.PAK"); -- cgit v1.2.3 From 8268b5c210ee5fd7fa264ecd570c98b26b245d60 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 10 Aug 2008 00:17:56 +0000 Subject: Fixed crash in KyraEngine_HoF::pauseEngineIntern. svn-id: r33733 --- engines/kyra/kyra_hof.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'engines/kyra/kyra_hof.cpp') diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 08e13a54af..b642248665 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -196,14 +196,18 @@ void KyraEngine_HoF::pauseEngineIntern(bool pause) { _seqWsaChatTimeout += pausedTime; _seqWsaChatFrameTimeout += pausedTime; - for (int x = 0; x < 10; x++) { - if (_activeText[x].duration != -1) - _activeText[x].startTime += pausedTime; + if (_activeText) { + for (int x = 0; x < 10; x++) { + if (_activeText[x].duration != -1) + _activeText[x].startTime += pausedTime; + } } - for (int x = 0; x < 8; x++) { - if (_activeWSA[x].flags != -1) - _activeWSA[x].nextFrame += pausedTime; + if (_activeWSA) { + for (int x = 0; x < 8; x++) { + if (_activeWSA[x].flags != -1) + _activeWSA[x].nextFrame += pausedTime; + } } _nextIdleAnim += pausedTime; -- cgit v1.2.3 From f8355abdee1a85dd3cf387a7fcc74b18b43d2597 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 10 Aug 2008 01:28:00 +0000 Subject: Added fallback to text only mode when voice files are not found. svn-id: r33742 --- engines/kyra/kyra_hof.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'engines/kyra/kyra_hof.cpp') diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index b642248665..33a8af91f1 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -1510,15 +1510,19 @@ void KyraEngine_HoF::openTalkFile(int newFile) { _oldTalkFile = -1; } - if (newFile == 0) { + if (newFile == 0) strcpy(talkFilename, "ANYTALK.TLK"); - _res->loadPakFile(talkFilename); - } else { + else sprintf(talkFilename, "CH%dVOC.TLK", newFile); - _res->loadPakFile(talkFilename); - } _oldTalkFile = newFile; + + if (!_res->loadPakFile(talkFilename)) { + if (speechEnabled()) { + warning("Couldn't load file '%s' falling back to text only mode", talkFilename); + _configVoice = 0; + } + } } void KyraEngine_HoF::snd_playVoiceFile(int id) { @@ -1554,7 +1558,8 @@ void KyraEngine_HoF::playVoice(int high, int low) { if (!_flags.isTalkie) return; int vocFile = high * 10000 + low * 10; - snd_playVoiceFile(vocFile); + if (speechEnabled()) + snd_playVoiceFile(vocFile); } void KyraEngine_HoF::snd_playSoundEffect(int track, int volume) { -- cgit v1.2.3