diff options
author | Filippos Karapetis | 2015-12-18 00:58:36 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:34:08 +0100 |
commit | 832d87e0bf1cb7dbfd2d3e7217b5d8fe0fefa8b7 (patch) | |
tree | cc12382c528993a4b07600acf24a86605781c620 /engines | |
parent | 318dc59382e014aaac5126b9e3b39ae2f6b0df0b (diff) | |
download | scummvm-rg350-832d87e0bf1cb7dbfd2d3e7217b5d8fe0fefa8b7.tar.gz scummvm-rg350-832d87e0bf1cb7dbfd2d3e7217b5d8fe0fefa8b7.tar.bz2 scummvm-rg350-832d87e0bf1cb7dbfd2d3e7217b5d8fe0fefa8b7.zip |
LAB: Use Common::Point in IntuiMessage
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lab/engine.cpp | 7 | ||||
-rw-r--r-- | engines/lab/eventman.h | 4 | ||||
-rw-r--r-- | engines/lab/interface.cpp | 5 | ||||
-rw-r--r-- | engines/lab/map.cpp | 4 | ||||
-rw-r--r-- | engines/lab/special.cpp | 5 |
5 files changed, 10 insertions, 15 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index 66d0f464ef..21849e1ec9 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -580,13 +580,8 @@ void LabEngine::mainGameLoop() { _graphics->screenUpdate(); } else { gotMessage = true; - - Common::Point curPos; - curPos.x = curMsg->_mouseX; - curPos.y = curMsg->_mouseY; - _followingCrumbs = false; - if (!fromCrumbs(curMsg->_msgClass, curMsg->_code, curMsg->_qualifier, curPos, curInv, curMsg, forceDraw, curMsg->_code, actionMode)) + if (!fromCrumbs(curMsg->_msgClass, curMsg->_code, curMsg->_qualifier, curMsg->_mouse, curInv, curMsg, forceDraw, curMsg->_code, actionMode)) break; } } diff --git a/engines/lab/eventman.h b/engines/lab/eventman.h index 20b4ddc29d..7b5f2dd204 100644 --- a/engines/lab/eventman.h +++ b/engines/lab/eventman.h @@ -53,8 +53,8 @@ enum MessageClasses { struct IntuiMessage { uint32 _msgClass; - uint16 _code, _qualifier, _mouseX, _mouseY; - uint32 _seconds, _micros; + uint16 _code, _qualifier; + Common::Point _mouse; }; diff --git a/engines/lab/interface.cpp b/engines/lab/interface.cpp index d14b2835e0..949db06520 100644 --- a/engines/lab/interface.cpp +++ b/engines/lab/interface.cpp @@ -145,8 +145,9 @@ IntuiMessage *EventManager::getMsg() { } else if (_leftClick || _rightClick) { message._msgClass = (_leftClick) ? kMessageLeftClick : kMessageRightClick; message._qualifier = 0; - message._mouseX = (!_vm->_isHiRes) ? (uint16)_mousePos.x / 2 : (uint16)_mousePos.x; - message._mouseY = (uint16)_mousePos.y; + message._mouse = _mousePos; + if (!_vm->_isHiRes) + message._mouse.x /= 2; _leftClick = _rightClick = false; return &message; } else if (keyPress(&message._code)) { diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp index 81068ed53e..0d8b89a4f3 100644 --- a/engines/lab/map.cpp +++ b/engines/lab/map.cpp @@ -473,8 +473,8 @@ void LabEngine::processMap(uint16 curRoom) { } else { uint32 msgClass = msg->_msgClass; uint16 msgCode = msg->_code; - uint16 mouseX = msg->_mouseX; - uint16 mouseY = msg->_mouseY; + uint16 mouseX = msg->_mouse.x; + uint16 mouseY = msg->_mouse.y; if ((msgClass == kMessageRightClick) || ((msgClass == kMessageRawKey) && (msgCode == Common::KEYCODE_ESCAPE))) return; diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index 820455a433..68fbcd47ae 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -274,7 +274,6 @@ void LabEngine::processJournal() { _music->updateMusic(); else { uint32 msgClass = msg->_msgClass; - uint16 qualifier = msg->_qualifier; uint16 buttonId = msg->_code; if ((msgClass == kMessageRightClick) || @@ -439,8 +438,8 @@ void LabEngine::processMonitor(char *ntext, TextFont *monitorFont, bool isIntera } else { uint32 msgClass = msg->_msgClass; uint16 qualifier = msg->_qualifier; - uint16 mouseX = msg->_mouseX; - uint16 mouseY = msg->_mouseY; + uint16 mouseX = msg->_mouse.x; + uint16 mouseY = msg->_mouse.y; uint16 code = msg->_code; if ((msgClass == kMessageRightClick) || |