diff options
-rw-r--r-- | engines/titanic/core/view_item.cpp | 3 | ||||
-rw-r--r-- | engines/titanic/events.cpp | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/engines/titanic/core/view_item.cpp b/engines/titanic/core/view_item.cpp index 414cf302c0..8b6586f7f9 100644 --- a/engines/titanic/core/view_item.cpp +++ b/engines/titanic/core/view_item.cpp @@ -232,8 +232,7 @@ bool CViewItem::handleMouseMsg(CMouseMsg *msg, bool flag) { } Common::Array<CGameObject *> gameObjects; - CTreeItem *treeItem = scan(this); - while (treeItem) { + for (CTreeItem *treeItem = scan(this); treeItem; treeItem = treeItem->scan(this)) { CGameObject *gameObject = dynamic_cast<CGameObject *>(treeItem); if (gameObject) { if (gameObject->checkPoint(msg->_mousePos, 0, 1) && diff --git a/engines/titanic/events.cpp b/engines/titanic/events.cpp index 1f8ccce0dd..5202d7cb9c 100644 --- a/engines/titanic/events.cpp +++ b/engines/titanic/events.cpp @@ -102,8 +102,8 @@ uint32 Events::getTicksCount() const { return g_system->getMillis(); } -#define HANDLE_MESSAGE(method) if (_vm->_window->_inputAllowed) { \ - _vm->_window->_gameManager->_inputTranslator.leftButtonDown(_specialButtons, Point(_mousePos.x, _mousePos.y)); \ +#define HANDLE_MESSAGE(METHOD) if (_vm->_window->_inputAllowed) { \ + _vm->_window->_gameManager->_inputTranslator.METHOD(_specialButtons, Point(_mousePos.x, _mousePos.y)); \ _vm->_window->mouseChanged(); \ } |