From a73dcdf224ae88c7bcf73d754781052835af4cd0 Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Sun, 6 Mar 2016 13:36:35 +0100 Subject: ADL: Move functionality into base class --- engines/adl/hires1.cpp | 52 +------------------------------------------------- 1 file changed, 1 insertion(+), 51 deletions(-) (limited to 'engines/adl/hires1.cpp') diff --git a/engines/adl/hires1.cpp b/engines/adl/hires1.cpp index 91407808eb..11d576b217 100644 --- a/engines/adl/hires1.cpp +++ b/engines/adl/hires1.cpp @@ -312,9 +312,7 @@ void HiRes1Engine::restartGame() { printASCIIString("\r\r\r\r\r"); } -void HiRes1Engine::runGame() { - _display->setMode(DISPLAY_MODE_MIXED); - +void HiRes1Engine::loadData() { Common::File f; if (!f.open(IDS_HR1_MESSAGES)) @@ -385,54 +383,6 @@ void HiRes1Engine::runGame() { f.seek(IDI_HR1_OFS_NOUNS); loadNouns(f); - - printASCIIString("\r\r\r\r\r"); - - while (1) { - uint verb = 0, noun = 0; - - // When restoring from the launcher, we don't read - // input on the first iteration. This is needed to - // ensure that restoring from the launcher and - // restoring in-game brings us to the same game state. - // (Also see comment below.) - if (!_isRestoring) { - clearScreen(); - showRoom(); - - _canSaveNow = _canRestoreNow = true; - getInput(verb, noun); - _canSaveNow = _canRestoreNow = false; - - if (shouldQuit()) - return; - - if (!doOneCommand(_roomCommands, verb, noun)) - printMessage(IDI_HR1_MSG_DONT_UNDERSTAND); - } - - if (_isRestoring) { - // We restored from the GMM or launcher. As restoring - // with "RESTORE GAME" does not end command processing, - // we don't break it off here either. This essentially - // means that restoring a game will always run through - // the global commands and increase the move counter - // before the first user input. - printASCIIString("\r"); - _isRestoring = false; - verb = _restoreVerb; - noun = _restoreNoun; - } - - // Restarting does end command processing - if (_isRestarting) { - _isRestarting = false; - continue; - } - - doAllCommands(_globalCommands, verb, noun); - _state.moves++; - } } void HiRes1Engine::printMessage(uint idx, bool wait) { -- cgit v1.2.3