diff options
author | Filippos Karapetis | 2007-08-26 03:22:52 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-08-26 03:22:52 +0000 |
commit | 5e8a4a1425f08388dd44787a50da445caf00301a (patch) | |
tree | 7ebfee3c0de03a64c0f0e36e81a626554dd1f1d4 | |
parent | d5e5477737208f6f235f1eea2aff6ea0ba28c7fb (diff) | |
download | scummvm-rg350-5e8a4a1425f08388dd44787a50da445caf00301a.tar.gz scummvm-rg350-5e8a4a1425f08388dd44787a50da445caf00301a.tar.bz2 scummvm-rg350-5e8a4a1425f08388dd44787a50da445caf00301a.zip |
The character selection screen shown when all the 5 protagonist chapters are completed is now functional
svn-id: r28742
-rw-r--r-- | engines/saga/interface.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp index 7bf9f3ed6b..00e76680fd 100644 --- a/engines/saga/interface.cpp +++ b/engines/saga/interface.cpp @@ -1468,11 +1468,22 @@ void Interface::handleOptionClick(const Point& mousePoint) { void Interface::handleChapterSelectionUpdate(const Point& mousePoint) { uint16 objectId; + int hitZoneIndex; + const HitZone * hitZone; // FIXME: Original handled more object types here. objectId = _vm->_actor->hitTest(mousePoint, true); + if (objectId == ID_NOTHING) { + hitZoneIndex = _vm->_scene->_objectMap->hitTest(mousePoint); + + if ((hitZoneIndex != -1)) { + hitZone = _vm->_scene->_objectMap->getHitZone(hitZoneIndex); + objectId = hitZone->getHitZoneId(); + } + } + if (objectId != _vm->_script->_pointerObject) { _vm->_script->_pointerObject = objectId; } @@ -1492,12 +1503,12 @@ void Interface::handleChapterSelectionClick(const Point& mousePoint) { switch (objectTypeId(obj)) { case kGameObjectHitZone: - hitZone = _vm->_scene->_actionMap->getHitZone(objectIdToIndex(obj)); + hitZone = _vm->_scene->_objectMap->getHitZone(objectIdToIndex(obj)); if (hitZone == NULL) return; - if (hitZone->getFlags() & kHitZoneExit) + if (hitZone->getFlags() & kHitZoneEnabled) script = hitZone->getScriptNumber(); break; |