aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/input.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2008-08-21 12:11:24 +0000
committerNicola Mettifogo2008-08-21 12:11:24 +0000
commit47b1a06e3b42da767e5d46529e763cd5e710d263 (patch)
treefb4d00d10918ac4b99bc2de5090add98c5cab6c5 /engines/parallaction/input.cpp
parent513f5ae150ad60bd899bae7ecae2435363e1d84d (diff)
downloadscummvm-rg350-47b1a06e3b42da767e5d46529e763cd5e710d263.tar.gz
scummvm-rg350-47b1a06e3b42da767e5d46529e763cd5e710d263.tar.bz2
scummvm-rg350-47b1a06e3b42da767e5d46529e763cd5e710d263.zip
Removed unused code and structures, and a bit of cleanup.
svn-id: r34080
Diffstat (limited to 'engines/parallaction/input.cpp')
-rw-r--r--engines/parallaction/input.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp
index 287618e803..e3c13bbbcb 100644
--- a/engines/parallaction/input.cpp
+++ b/engines/parallaction/input.cpp
@@ -127,7 +127,9 @@ void Input::waitForButtonEvent(uint32 buttonEventMask, int32 timeout) {
}
-void Input::updateGameInput() {
+int Input::updateGameInput() {
+
+ int event = kEvNone;
readInput();
@@ -141,25 +143,25 @@ void Input::updateGameInput() {
(_engineFlags & kEngineChangeLocation) == 0
);
- return;
+ return event;
}
if (_hasKeyPressEvent && (_vm->getFeatures() & GF_DEMO) == 0) {
- if (_keyPressed.keycode == Common::KEYCODE_l) _inputData._event = kEvLoadGame;
- if (_keyPressed.keycode == Common::KEYCODE_s) _inputData._event = kEvSaveGame;
+ if (_keyPressed.keycode == Common::KEYCODE_l) event = kEvLoadGame;
+ if (_keyPressed.keycode == Common::KEYCODE_s) event = kEvSaveGame;
}
- if (_inputData._event == kEvNone) {
- _inputData._mousePos = _mousePos;
+ if (event == kEvNone) {
translateGameInput();
}
+ return event;
}
-InputData* Input::updateInput() {
+int Input::updateInput() {
- _inputData._event = kEvNone;
+ int event = kEvNone;
switch (_inputMode) {
case kInputModeComment:
@@ -169,7 +171,7 @@ InputData* Input::updateInput() {
break;
case kInputModeGame:
- updateGameInput();
+ event = updateGameInput();
break;
case kInputModeInventory:
@@ -178,7 +180,7 @@ InputData* Input::updateInput() {
break;
}
- return &_inputData;
+ return event;
}
void Input::trackMouse(ZonePtr z) {
@@ -252,7 +254,6 @@ bool Input::translateGameInput() {
if ((_mouseButtons == kMouseLeftUp) && ((_activeItem._id != 0) || ((z->_type & 0xFFFF) == kZoneCommand))) {
- _inputData._zone = z;
if (z->_flags & kFlagsNoWalk) {
// character doesn't need to walk to take specified action
takeAction(z);