From 659a4b8b14a8379cb672b5953ac79f69a9ec5f48 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Wed, 31 Oct 2012 04:39:36 +0000 Subject: TONY: Remove further unused code from Input class. --- engines/tony/input.cpp | 19 ------------------- engines/tony/input.h | 5 ----- 2 files changed, 24 deletions(-) (limited to 'engines') diff --git a/engines/tony/input.cpp b/engines/tony/input.cpp index a01208eee1..553a3f7a68 100644 --- a/engines/tony/input.cpp +++ b/engines/tony/input.cpp @@ -33,21 +33,14 @@ namespace Tony { RMInput::RMInput() { // Setup mouse fields - _clampMouse = false; _mousePos.set(0, 0); - _leftButton = _rightButton = false; _leftClickMouse = _leftReleaseMouse = false; _rightClickMouse = _rightReleaseMouse = false; - Common::fill((byte *)&_event, (byte *)&_event + sizeof(Common::Event), 0); - // Setup keyboard fields Common::fill(&_keyDown[0], &_keyDown[350], 0); } -RMInput::~RMInput() { -} - void RMInput::poll() { _leftClickMouse = _leftReleaseMouse = _rightClickMouse = _rightReleaseMouse = false; @@ -62,16 +55,12 @@ void RMInput::poll() { _mousePos.set(_event.mouse.x, _event.mouse.y); if (_event.type == Common::EVENT_LBUTTONDOWN) { - _leftButton = true; _leftClickMouse = true; } else if (_event.type == Common::EVENT_LBUTTONUP) { - _leftButton = false; _leftReleaseMouse = true; } else if (_event.type == Common::EVENT_RBUTTONDOWN) { - _rightButton = true; _rightClickMouse = true; } else if (_event.type == Common::EVENT_RBUTTONUP) { - _rightButton = false; _rightReleaseMouse = true; } else continue; @@ -130,10 +119,6 @@ bool RMInput::mouseRightClicked() { return _rightClickMouse; } -bool RMInput::mouseBothClicked() { - return _leftClickMouse && _rightClickMouse; -} - bool RMInput::mouseLeftReleased() { return _leftReleaseMouse; } @@ -142,8 +127,4 @@ bool RMInput::mouseRightReleased() { return _rightReleaseMouse; } -bool RMInput::mouseBothReleased() { - return _leftReleaseMouse && _rightReleaseMouse; -} - } // End of namespace Tony diff --git a/engines/tony/input.h b/engines/tony/input.h index 5d84b98096..1672747efc 100644 --- a/engines/tony/input.h +++ b/engines/tony/input.h @@ -40,8 +40,6 @@ private: // Mouse related fields RMPoint _mousePos; - bool _clampMouse; - bool _leftButton, _rightButton; bool _leftClickMouse, _leftReleaseMouse, _rightClickMouse, _rightReleaseMouse; // Keyboard related fields @@ -49,7 +47,6 @@ private: public: RMInput(); - ~RMInput(); /** * Polling (must be performed once per frame) @@ -66,10 +63,8 @@ public: */ bool mouseLeftClicked(); bool mouseRightClicked(); - bool mouseBothClicked(); bool mouseLeftReleased(); bool mouseRightReleased(); - bool mouseBothReleased(); /** * Returns true if the given key is pressed -- cgit v1.2.3