diff options
Diffstat (limited to 'engines/cge2')
-rw-r--r-- | engines/cge2/cge2_main.cpp | 2 | ||||
-rw-r--r-- | engines/cge2/events.cpp | 10 | ||||
-rw-r--r-- | engines/cge2/vga13h.h | 2 |
3 files changed, 6 insertions, 8 deletions
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp index f4b90d3e2d..c0b41e4756 100644 --- a/engines/cge2/cge2_main.cpp +++ b/engines/cge2/cge2_main.cpp @@ -869,7 +869,7 @@ void CGE2Engine::switchHero(int sex) { } #pragma argsused -void Sprite::touch(uint16 mask, int x, int y, Common::KeyCode keyCode) { +void Sprite::touch(uint16 mask, V2D pos, Common::KeyCode keyCode) { if ((mask & kEventAttn) != 0) return; diff --git a/engines/cge2/events.cpp b/engines/cge2/events.cpp index c3433dfb87..0c163a5454 100644 --- a/engines/cge2/events.cpp +++ b/engines/cge2/events.cpp @@ -189,7 +189,7 @@ void EventManager::handleEvents() { e._y -= _vm->_mouse->_siz.y; if (_vm->_mouse->_hold && e._spritePtr != _vm->_mouse->_hold) { _vm->_mouse->_hold->touch(e._mask | kEventAttn, - e._x - _vm->_mouse->_hold->_pos2D.x, e._y - _vm->_mouse->_hold->_pos2D.y, e._keyCode); + V2D(_vm, e._x - _vm->_mouse->_hold->_pos2D.x, e._y - _vm->_mouse->_hold->_pos2D.y), e._keyCode); } // update mouse cursor position if (e._mask & kMouseRoll) @@ -199,11 +199,9 @@ void EventManager::handleEvents() { // activate current touched SPRITE if (e._spritePtr) { if (e._mask & kEventKeyb) - e._spritePtr->touch(e._mask, _vm->_mouse->_point.x, _vm->_mouse->_point.y, e._keyCode); - else { - V2D temp = _vm->_mouse->_point - e._spritePtr->_pos2D; - e._spritePtr->touch(e._mask, temp.x, temp.y, e._keyCode); - } + e._spritePtr->touch(e._mask, _vm->_mouse->_point, e._keyCode); + else + e._spritePtr->touch(e._mask, _vm->_mouse->_point - e._spritePtr->_pos2D, e._keyCode); } else if (_vm->_sys) _vm->_sys->touch(e._mask, _vm->_mouse->_point, e._keyCode); diff --git a/engines/cge2/vga13h.h b/engines/cge2/vga13h.h index 359c20fc9f..32cf38df59 100644 --- a/engines/cge2/vga13h.h +++ b/engines/cge2/vga13h.h @@ -260,7 +260,7 @@ public: void step(int nr = -1); Seq *setSeq(Seq *seq); CommandHandler::Command *snList(Action type); - virtual void touch(uint16 mask, int x, int y, Common::KeyCode keyCode); + virtual void touch(uint16 mask, V2D pos, Common::KeyCode keyCode); virtual void tick(); virtual void setScene(int c); void clrHide() { if (_ext) _ext->_b0 = NULL; } |