aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJoseph-Eugene Winzer2019-05-26 18:15:45 +0200
committerJoseph-Eugene Winzer2019-05-28 02:24:42 +0200
commit7c3b128661d4131001c2a5940796c527ab710817 (patch)
treee10c2e14863a67a77bf2be74034f5670bcf9ac21 /engines
parent6da729171cfd509c168c37bfd0216101691dc3fd (diff)
downloadscummvm-rg350-7c3b128661d4131001c2a5940796c527ab710817.tar.gz
scummvm-rg350-7c3b128661d4131001c2a5940796c527ab710817.tar.bz2
scummvm-rg350-7c3b128661d4131001c2a5940796c527ab710817.zip
SUPERNOVA: Removes optional parameter for getKeyInput()
It doesn't serve a purpose anymore. The parameter was used to keep waiting for key input if it was a 'non text editing' event, like pressing the shift modifier key. The only place it was used was for text input when interacting with the computer in ShipSleepCabin.
Diffstat (limited to 'engines')
-rw-r--r--engines/supernova/state.cpp24
-rw-r--r--engines/supernova/state.h2
2 files changed, 4 insertions, 22 deletions
diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp
index 8d54bd7d61..6600613a35 100644
--- a/engines/supernova/state.cpp
+++ b/engines/supernova/state.cpp
@@ -1579,29 +1579,11 @@ void GameManager::drawInventory() {
}
}
-uint16 GameManager::getKeyInput(bool blockForPrintChar) {
+int GameManager::getKeyInput() {
while (!_vm->shouldQuit()) {
updateEvents();
if (_keyPressed) {
- if (blockForPrintChar) {
- if (Common::isPrint(_key.keycode) ||
- _key.keycode == Common::KEYCODE_BACKSPACE ||
- _key.keycode == Common::KEYCODE_DELETE ||
- _key.keycode == Common::KEYCODE_RETURN ||
- _key.keycode == Common::KEYCODE_SPACE ||
- _key.keycode == Common::KEYCODE_ESCAPE ||
- _key.keycode == Common::KEYCODE_UP ||
- _key.keycode == Common::KEYCODE_DOWN ||
- _key.keycode == Common::KEYCODE_LEFT ||
- _key.keycode == Common::KEYCODE_RIGHT) {
- if (_key.flags & Common::KBD_SHIFT)
- return toupper(_key.ascii);
- else
- return tolower(_key.ascii);
- }
- } else {
- return _key.ascii;
- }
+ return _key.ascii;
}
g_system->updateScreen();
g_system->delayMillis(_vm->_delay);
@@ -1805,7 +1787,7 @@ void GameManager::edit(Common::String &input, int x, int y, uint length) {
_vm->renderBox(_vm->_screen->getTextCursorPos().x, y - 1, 1, 9, kColorWhite99);
}
- getKeyInput(true);
+ getKeyInput();
if (_vm->shouldQuit())
break;
switch (_key.keycode) {
diff --git a/engines/supernova/state.h b/engines/supernova/state.h
index c0446705f0..c1712b4149 100644
--- a/engines/supernova/state.h
+++ b/engines/supernova/state.h
@@ -192,7 +192,7 @@ public:
bool airless();
void shock();
Common::EventType getMouseInput();
- uint16 getKeyInput(bool blockForPrintChar = false);
+ int getKeyInput();
void getInput();
void wait(int ticks);
void waitOnInput(int ticks);