diff options
Diffstat (limited to 'engines/access/access.cpp')
-rw-r--r-- | engines/access/access.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp index 6ad1b22408..7f59ae7ad6 100644 --- a/engines/access/access.cpp +++ b/engines/access/access.cpp @@ -41,6 +41,7 @@ AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc) _events = nullptr; _files = nullptr; _inventory = nullptr; + _midi = nullptr; _player = nullptr; _room = nullptr; _screen = nullptr; @@ -92,6 +93,7 @@ AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc) _vidX = _vidY = 0; _cheatFl = false; _restartFl = false; + _printEnd = 0; } AccessEngine::~AccessEngine() { @@ -220,12 +222,13 @@ void AccessEngine::speakText(ASurface *s, const Common::String &msg) { _events->clearEvents(); while (!shouldQuit()) { _sound->freeSounds(); - Resource *sound = _sound->loadSound(_narateFile + 99, _sndSubFile); - _sound->_soundTable.push_back(SoundEntry(sound, 1)); + _sound->loadSoundTable(0, _narateFile + 99, _sndSubFile); _sound->playSound(0); - _scripts->cmdFreeSound(); - _events->pollEvents(); + while(_sound->isSFXPlaying() && !shouldQuit()) + _events->pollEvents(); + + _scripts->cmdFreeSound(); if (_events->isKeyMousePressed()) { _sndSubFile += soundsLeft; @@ -254,9 +257,11 @@ void AccessEngine::speakText(ASurface *s, const Common::String &msg) { Resource *res = _sound->loadSound(_narateFile + 99, _sndSubFile); _sound->_soundTable.push_back(SoundEntry(res, 1)); _sound->playSound(0); - _scripts->cmdFreeSound(); - _events->pollEvents(); + while(_sound->isSFXPlaying() && !shouldQuit()) + _events->pollEvents(); + + _scripts->cmdFreeSound(); if (_events->_leftButton) { _events->debounceLeft(); |