From 9689dffca9d44ab0a94d01f8fbc38ef0178c67b5 Mon Sep 17 00:00:00 2001 From: Joseph-Eugene Winzer Date: Sun, 11 Mar 2018 21:47:30 +0100 Subject: [PATCH] SUPERNOVA: Removes mouseInput3() The function highlights dialog choices depending on the mouse position and loops till a mouse button is pressed. Since it is used in GameManager::dialog() only, inlining it seems reasonable, especially as the name was not descriptive in the first place. --- engines/supernova/state.cpp | 16 ++++++---------- engines/supernova/state.h | 1 - 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp index e41c85be151..8356fe32de9 100644 --- a/engines/supernova/state.cpp +++ b/engines/supernova/state.cpp @@ -1407,7 +1407,12 @@ int GameManager::dialog(int num, byte rowLength[6], StringID text[6], int number _currentSentence = -1; do { - mouseInput3(); + do { + _vm->updateEvents(); + mousePosDialog(_mouseX, _mouseY); + g_system->updateScreen(); + g_system->delayMillis(_vm->_delay); + } while (!_mouseClicked && !_vm->shouldQuit()); } while (_currentSentence == -1 && !_vm->shouldQuit()); _vm->renderBox(0, 138, 320, 62, kColorBlack); @@ -1540,15 +1545,6 @@ void GameManager::getInput() { } } -void GameManager::mouseInput3() { - do { - _vm->updateEvents(); - mousePosDialog(_mouseX, _mouseY); - g_system->updateScreen(); - g_system->delayMillis(_vm->_delay); - } while (!_mouseClicked && !_vm->shouldQuit()); -} - void GameManager::roomBrightness() { _roomBrightness = 255; if ((_currentRoom->getId() != OUTSIDE) && (_currentRoom->getId() < ROCKS) && _state._powerOff) diff --git a/engines/supernova/state.h b/engines/supernova/state.h index 7b95d46235c..f617bc0355d 100644 --- a/engines/supernova/state.h +++ b/engines/supernova/state.h @@ -184,7 +184,6 @@ public: Common::EventType getMouseInput(); uint16 getKeyInput(bool blockForPrintChar = false); void getInput(); - void mouseInput3(); void wait(int ticks); void waitOnInput(int ticks); bool waitOnInput(int ticks, Common::KeyCode &keycode);