TONY: Remove further unused code from Input class.

This commit is contained in:
D G Turner 2012-10-31 04:39:36 +00:00
parent 535180dc7b
commit 659a4b8b14
2 changed files with 0 additions and 24 deletions

View File

@ -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

View File

@ -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