diff options
Diffstat (limited to 'engines/kyra/kyra_hof.cpp')
-rw-r--r-- | engines/kyra/kyra_hof.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 0722fb262b..2f8f2674e4 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -306,8 +306,10 @@ int KyraEngine_HoF::go() { _res->loadFileList(_ingamePakList, _ingamePakListSize); } - if (_flags.platform == Common::kPlatformPC98) + if (_flags.platform == Common::kPlatformPC98) { _res->loadPakFile("AUDIO.PAK"); + _sound->loadSoundFile("sound.dat"); + } } _menuDirectlyToLoad = (_menuChoice == 3) ? true : false; @@ -323,7 +325,7 @@ int KyraEngine_HoF::go() { seq_playSequences(kSequenceFunters, kSequenceFrash); } - return _eventMan->shouldRTL(); + return 0; } void KyraEngine_HoF::startup() { @@ -434,7 +436,7 @@ void KyraEngine_HoF::startup() { if (_gameToLoad == -1) { snd_playWanderScoreViaMap(52, 1); enterNewScene(_mainCharacter.sceneId, _mainCharacter.facing, 0, 0, 1); - saveGame(getSavegameFilename(0), "New Game"); + saveGame(getSavegameFilename(0), "New Game", 0); } else { loadGame(getSavegameFilename(_gameToLoad)); } @@ -452,8 +454,9 @@ void KyraEngine_HoF::startup() { void KyraEngine_HoF::runLoop() { _screen->updateScreen(); + _quitFlag = false; _runFlag = true; - while (!quit() && _runFlag) { + while (!_quitFlag && _runFlag) { if (_deathHandler >= 0) { removeHandItem(); delay(5); @@ -1577,10 +1580,14 @@ void KyraEngine_HoF::snd_playSoundEffect(int track, int volume) { int16 vocIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2]); if (vocIndex != -1) _sound->voicePlay(_ingameSoundList[vocIndex], true); - else if (_flags.platform != Common::kPlatformFMTowns) + else if (_flags.platform == Common::kPlatformPC) + KyraEngine_v1::snd_playSoundEffect(track); + // TODO ?? Maybe there is a way to let users select whether they want // voc, midi or adl sfx (even though it makes no sense to choose anything but voc). - KyraEngine_v1::snd_playSoundEffect(track); + // The PC-98 version has support for non-pcm sound effects, but only for tracks + // which also have voc files. The syntax would be: + // KyraEngine_v1::snd_playSoundEffect(vocIndex); } #pragma mark - @@ -1619,7 +1626,7 @@ void KyraEngine_HoF::loadInvWsa(const char *filename, int run, int delayTime, in _invWsa.timer = _system->getMillis(); if (run) { - while (_invWsa.running && !skipFlag() && !quit()) { + while (_invWsa.running && !skipFlag() && !_quitFlag) { update(); _system->delayMillis(10); } @@ -1993,7 +2000,7 @@ void KyraEngine_HoF::playTim(const char *filename) { return; _tim->resetFinishedFlag(); - while (!quit() && !_tim->finished()) { + while (!_quitFlag && !_tim->finished()) { _tim->exec(tim, 0); if (_chatText) updateWithText(); |