diff options
Diffstat (limited to 'engines/mortevielle/mouse.cpp')
-rw-r--r-- | engines/mortevielle/mouse.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/engines/mortevielle/mouse.cpp b/engines/mortevielle/mouse.cpp index 480b4381ef..d71934ad1a 100644 --- a/engines/mortevielle/mouse.cpp +++ b/engines/mortevielle/mouse.cpp @@ -33,6 +33,10 @@ namespace Mortevielle { +MouseHandler::MouseHandler(MortevielleEngine *vm) { + _vm = vm; +} + /** * Initialize the mouse * @remarks Originally called 'init_mouse' @@ -93,15 +97,13 @@ void MouseHandler::getMousePosition(int &x, int &y, bool &click) { * @remarks Originally called 'mov_mouse' */ void MouseHandler::moveMouse(bool &funct, char &key) { - bool p_key; - char in1, in2; int cx, cy; bool click; // Set defaults and check pending events funct = false; key = '\377'; - p_key = _vm->keyPressed(); + bool p_key = _vm->keyPressed(); // If mouse button clicked, return it if (_vm->getMouseClick()) @@ -112,7 +114,7 @@ void MouseHandler::moveMouse(bool &funct, char &key) { if (_vm->shouldQuit()) return; - in1 = _vm->getChar(); + char in1 = _vm->getChar(); getMousePosition(cx, cy, click); switch (toupper(in1)) { case '4': @@ -156,7 +158,7 @@ void MouseHandler::moveMouse(bool &funct, char &key) { p_key = _vm->keyPressed(); if (p_key) { - in2 = _vm->getChar(); + char in2 = _vm->getChar(); if ((in2 >= ';') && (in2 <= 'D')) { funct = true; @@ -264,8 +266,4 @@ bool MouseHandler::isMouseIn(Common::Rect r) { return false; } -void MouseHandler::setParent(MortevielleEngine *vm) { - _vm = vm; -} - } // End of namespace Mortevielle |