aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/core/view_item.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/titanic/core/view_item.cpp b/engines/titanic/core/view_item.cpp
index 5f51cfc931..3355dcb074 100644
--- a/engines/titanic/core/view_item.cpp
+++ b/engines/titanic/core/view_item.cpp
@@ -391,10 +391,15 @@ bool CViewItem::VirtualKeyCharMsg(CVirtualKeyCharMsg *msg) {
}
CursorId CViewItem::getLinkCursor(CLinkItem *link) {
- Common::Point pt(link->_bounds.left, link->_bounds.top);
- Common::Array<CGameObject *> gameObjects;
+ // Pick the center of the link's region as a check point
+ Common::Point pt((link->_bounds.left + link->_bounds.right) / 2,
+ (link->_bounds.top + link->_bounds.bottom) / 2);
+ if (link->_bounds.isEmpty())
+ // Bridge doorway link has an empty bounds, so workaround it
+ pt = Common::Point(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2);
// Scan for a restricted object covering the link
+ Common::Array<CGameObject *> gameObjects;
for (CTreeItem *treeItem = scan(this); treeItem; treeItem = treeItem->scan(this)) {
CGameObject *gameObject = dynamic_cast<CGameObject *>(treeItem);
if (gameObject) {