diff options
| author | Max Horn | 2008-09-01 20:21:30 +0000 |
|---|---|---|
| committer | Max Horn | 2008-09-01 20:21:30 +0000 |
| commit | f2b26c5615dd743ea99568920428a0a562bc94d3 (patch) | |
| tree | 743684f667e2c26ee892f02e1211fe76c7d3b180 /engines/sword1/control.cpp | |
| parent | 5013b01e7414910648bc8cc6c413c97a8160092d (diff) | |
| parent | 852bc9dbb750b9995d31e70f4158c97d3758c46f (diff) | |
| download | scummvm-rg350-f2b26c5615dd743ea99568920428a0a562bc94d3.tar.gz scummvm-rg350-f2b26c5615dd743ea99568920428a0a562bc94d3.tar.bz2 scummvm-rg350-f2b26c5615dd743ea99568920428a0a562bc94d3.zip | |
Merging more of the GSoC 2008 RTL branch: SWORD1
svn-id: r34255
Diffstat (limited to 'engines/sword1/control.cpp')
| -rw-r--r-- | engines/sword1/control.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp index 980e0b4f9f..d0808d3ece 100644 --- a/engines/sword1/control.cpp +++ b/engines/sword1/control.cpp @@ -215,7 +215,7 @@ void Control::askForCd(void) { notAccepted = false; } } - } while (notAccepted && (!SwordEngine::_systemVars.engineQuit)); + } while (notAccepted && (!g_engine->quit())); _resMan->resClose(fontId); free(_screenBuf); @@ -317,7 +317,7 @@ uint8 Control::runPanel(void) { } delay(1000 / 12); newMode = getClicks(mode, &retVal); - } while ((newMode != BUTTON_DONE) && (retVal == 0) && (!SwordEngine::_systemVars.engineQuit)); + } while ((newMode != BUTTON_DONE) && (retVal == 0) && (!g_engine->quit())); if (SwordEngine::_systemVars.controlPanelMode == CP_NORMAL) { uint8 volL, volR; @@ -425,7 +425,7 @@ uint8 Control::handleButtonClick(uint8 id, uint8 mode, uint8 *retVal) { _buttons[5]->setSelected(SwordEngine::_systemVars.showText); } else if (id == BUTTON_QUIT) { if (getConfirm(_lStrings[STR_QUIT])) - SwordEngine::_systemVars.engineQuit = true; + g_engine->quitGame(); return mode; } break; @@ -703,7 +703,7 @@ void Control::handleSaveKey(Common::KeyState kbd) { bool Control::saveToFile(void) { if ((_selectedSavegame == 255) || !strlen((char*)_saveNames[_selectedSavegame])) return false; // no saveslot selected or no name entered - saveGameToFile(_selectedSavegame); + saveGameToFile(_numSaves); writeSavegameDescriptions(); return true; } @@ -741,6 +741,7 @@ void Control::readSavegameDescriptions(void) { curFileNum++; } while ((ch != 255) && (!inf->eos())); _saveFiles = curFileNum; + _numSaves = _saveFiles; } delete inf; } @@ -1091,9 +1092,6 @@ void Control::delay(uint32 msecs) { _mouseDown = false; _mouseState |= BS1_WHEEL_DOWN; break; - case Common::EVENT_QUIT: - SwordEngine::_systemVars.engineQuit = true; - break; default: break; } |
