diff options
| author | Torbjörn Andersson | 2004-05-09 13:32:04 +0000 |
|---|---|---|
| committer | Torbjörn Andersson | 2004-05-09 13:32:04 +0000 |
| commit | fc970b3c75fd64f399a4c22222d7e295825184c9 (patch) | |
| tree | 92998da511ba26705bbdc7cbe161e32bb9e031b6 /sword2/driver/_mouse.cpp | |
| parent | 577600537c2e3cfdacb4e53ccfdab7e06b55a0ed (diff) | |
| download | scummvm-rg350-fc970b3c75fd64f399a4c22222d7e295825184c9.tar.gz scummvm-rg350-fc970b3c75fd64f399a4c22222d7e295825184c9.tar.bz2 scummvm-rg350-fc970b3c75fd64f399a4c22222d7e295825184c9.zip | |
Removed the buffering of mouse and keyboard events. I don't think any of
our other engines do this, so there is little reason for BS2 to. I did add
a filtering mechanism so that mouse button releases and scroll wheeling is
ignored during normal gameplay, but I don't know if that was necessary
either.
Since this left little more than an empty husk where the Input class used
to be, I've eliminated that class and buried its remains in Sword2Engine.
svn-id: r13812
Diffstat (limited to 'sword2/driver/_mouse.cpp')
| -rw-r--r-- | sword2/driver/_mouse.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/sword2/driver/_mouse.cpp b/sword2/driver/_mouse.cpp index c4fe24a18a..223669a777 100644 --- a/sword2/driver/_mouse.cpp +++ b/sword2/driver/_mouse.cpp @@ -25,45 +25,6 @@ namespace Sword2 { #define MOUSEFLASHFRAME 6 -/** - * Logs the mouse button event passed in buttons. The button events were - * originaly defined as RD_LEFTBUTTONDOWN, RD_LEFTBUTTONUP, RD_RIGHTBUTTONDOWN - * and RD_RIGHTBUTTONUP. ScummVM adds RD_WHEELDOWN and RD_WHEELUP. - */ - -void Input::logMouseEvent(uint16 buttons) { - // We need to leave the one, which is the current event, alone! - if (_mouseBacklog == MAX_MOUSE_EVENTS - 1) - return; - - _mouseLog[(_mouseBacklog + _mouseLogPos) % MAX_MOUSE_EVENTS].buttons = buttons; - _mouseBacklog++; -} - -bool Input::checkForMouseEvents(void) { - return _mouseBacklog != 0; -} - -/** - * Get the next pending mouse event. - * @return a pointer to the mouse event, or NULL of there is none - */ - -MouseEvent *Input::mouseEvent(void) { - MouseEvent *me; - - if (_mouseBacklog) { - me = &_mouseLog[_mouseLogPos]; - if (++_mouseLogPos == MAX_MOUSE_EVENTS) - _mouseLogPos = 0; - - _mouseBacklog--; - return me; - } - - return NULL; -} - void Graphics::decompressMouse(byte *decomp, byte *comp, int width, int height, int pitch, int xOff, int yOff) { int32 size = width * height; int32 i = 0; |
