From d02c35c8213b4994769d7f42ffb40c148ae991a8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 9 Oct 2005 01:18:26 +0000 Subject: (more) Proper implementation of ChapterSelection panel. Though not all functionality is implemented but it is enough for now. Lets select any character. svn-id: r18982 --- saga/interface.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'saga/interface.cpp') diff --git a/saga/interface.cpp b/saga/interface.cpp index c62adbdd11..383fcd573e 100644 --- a/saga/interface.cpp +++ b/saga/interface.cpp @@ -1215,7 +1215,27 @@ void Interface::handleOptionClick(const Point& mousePoint) { } void Interface::handleChapterSelectionUpdate(const Point& mousePoint) { - _vm->_script->whichObject(mousePoint); + uint16 objectId =ID_NOTHING; + int16 objectFlags; + uint16 newObjectId; + + // FIXME: Original handled more object types here. + + newObjectId = _vm->_actor->hitTest(mousePoint, true); + + if (newObjectId != ID_NOTHING) { + if (objectTypeId(newObjectId) == kGameObjectObject) { + objectId = newObjectId; + objectFlags = 0; + } else { + objectId = newObjectId; + objectFlags = kObjUseWith; + } + } + + if (objectId != _vm->_script->_pointerObject) { + _vm->_script->_pointerObject = objectId; + } } void Interface::handleChapterSelectionClick(const Point& mousePoint) { -- cgit v1.2.3