diff options
author | Robert Göffringmann | 2004-01-04 17:19:17 +0000 |
---|---|---|
committer | Robert Göffringmann | 2004-01-04 17:19:17 +0000 |
commit | 4ca49386ed933533efaed857ee4a94ce0570494b (patch) | |
tree | a09a26ca31ca7f61a3e48189f0ca18f9ff2fa32d /sword1 | |
parent | 92561301ac3886fc75f8fc287b4878f98733d9eb (diff) | |
download | scummvm-rg350-4ca49386ed933533efaed857ee4a94ce0570494b.tar.gz scummvm-rg350-4ca49386ed933533efaed857ee4a94ce0570494b.tar.bz2 scummvm-rg350-4ca49386ed933533efaed857ee4a94ce0570494b.zip |
fixed cd changing code
svn-id: r12145
Diffstat (limited to 'sword1')
-rw-r--r-- | sword1/sword1.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/sword1/sword1.cpp b/sword1/sword1.cpp index d86cf1dc1e..9ee4c9102e 100644 --- a/sword1/sword1.cpp +++ b/sword1/sword1.cpp @@ -1085,16 +1085,24 @@ void SwordEngine::go(void) { void SwordEngine::checkCd(void) { uint8 needCd = _cdList[SwordLogic::_scriptVars[NEW_SCREEN]]; - if ((needCd == 0) && (_systemVars.currentCD == 0)) - needCd = 1; - if (needCd != _systemVars.currentCD) { - _systemVars.currentCD = needCd; - if (_systemVars.runningFromCd) { + if (needCd == 0) { + if (_systemVars.currentCD == 0) + needCd = 1; + else + needCd = _systemVars.currentCD; + } + if (_systemVars.runningFromCd) { + if (!_systemVars.currentCD) { + _systemVars.currentCD = needCd; + _control->askForCd(); + } else if (_systemVars.currentCD != needCd) { _music->startMusic(0, 0); _sound->closeCowSystem(); + _systemVars.currentCD = needCd; _control->askForCd(); } - } + } else + _systemVars.currentCD = needCd; } uint8 SwordEngine::mainLoop(void) { |