aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/cycle.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2016-02-02 23:02:50 +0100
committerMartin Kiewitz2016-02-02 23:02:50 +0100
commit5f41a09701d25619fc51e077781e4204080b7d62 (patch)
tree7b221b6c15fb269c30559fa67bdef87b3af05962 /engines/agi/cycle.cpp
parentcdc6a2f3c309056bc40bff86547f6cd21f39b533 (diff)
downloadscummvm-rg350-5f41a09701d25619fc51e077781e4204080b7d62.tar.gz
scummvm-rg350-5f41a09701d25619fc51e077781e4204080b7d62.tar.bz2
scummvm-rg350-5f41a09701d25619fc51e077781e4204080b7d62.zip
AGI: Remove inputMode, not needed anyore
Diffstat (limited to 'engines/agi/cycle.cpp')
-rw-r--r--engines/agi/cycle.cpp42
1 files changed, 5 insertions, 37 deletions
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp
index 2591713272..e2b6e0a065 100644
--- a/engines/agi/cycle.cpp
+++ b/engines/agi/cycle.cpp
@@ -173,18 +173,6 @@ void AgiEngine::interpretCycle() {
//_gfx->doUpdate();
}
-void AgiEngine::newInputMode(InputMode mode) {
- //if (mode == INPUTMODE_MENU && !getflag(VM_FLAG_MENUS_WORK) && !(getFeatures() & GF_MENUS))
- // return;
-
- _oldMode = _game.inputMode;
- _game.inputMode = mode;
-}
-
-void AgiEngine::oldInputMode() {
- _game.inputMode = _oldMode;
-}
-
// If main_cycle returns false, don't process more events!
int AgiEngine::mainCycle(bool onlyCheckForEvents) {
uint16 key;
@@ -206,9 +194,7 @@ int AgiEngine::mainCycle(bool onlyCheckForEvents) {
setVar(VM_VAR_MOUSE_Y, _mouse.pos.y);
//}
- switch (_game.inputMode) {
- case INPUTMODE_NORMAL:
- case INPUTMODE_NONE:
+ if (!cycleInnerLoopIsActive()) {
// Click-to-walk mouse interface
if (_game.playerControl && (screenObjEgo->flags & fAdjEgoXY)) {
int toX = screenObjEgo->move_x;
@@ -231,9 +217,6 @@ int AgiEngine::mainCycle(bool onlyCheckForEvents) {
if (screenObjEgo->direction == 0)
inDestination(screenObjEgo);
}
- break;
- default:
- break;
}
keyAscii = key & 0xFF;
@@ -245,26 +228,12 @@ int AgiEngine::mainCycle(bool onlyCheckForEvents) {
if (!cycleInnerLoopIsActive()) {
// no inner loop active at the moment, regular processing
- switch (_game.inputMode) {
- case INPUTMODE_NORMAL:
- if (key) {
- if (!handleController(key)) {
- if ((key) && (_text->promptIsEnabled())) {
- _text->promptCharPress(key);
- }
- }
- }
- break;
- case INPUTMODE_NONE:
- if (key) {
- handleController(key);
- if (key) {
- _game.keypress = key;
+ if (key) {
+ if (!handleController(key)) {
+ if ((key) && (_text->promptIsEnabled())) {
+ _text->promptCharPress(key);
}
}
- break;
- default:
- break;
}
} else {
@@ -486,7 +455,6 @@ int AgiEngine::runGame() {
setVar(VM_VAR_FREE_PAGES, 180); // Set amount of free memory to realistic value
setVar(VM_VAR_MAX_INPUT_CHARACTERS, 38);
- _game.inputMode = INPUTMODE_NONE;
_text->promptDisable();
_game.state = STATE_RUNNING;