mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
TONY: Remove further unused code from Input class.
This commit is contained in:
parent
535180dc7b
commit
659a4b8b14
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user