From b4b2e52df78fd309613d8df73f090b98e834969b Mon Sep 17 00:00:00 2001 From: Andrew Kurushin Date: Tue, 18 Jan 2005 15:01:21 +0000 Subject: another step in verb implementation: - objectMap responds to mouse move (but respond script not run well ?) loadStrings add some special count check - so all other LUT based resource should implement this technique svn-id: r16594 --- saga/interface.cpp | 78 ------------------------------------------------------ 1 file changed, 78 deletions(-) (limited to 'saga/interface.cpp') diff --git a/saga/interface.cpp b/saga/interface.cpp index 8bb72e9843..1b6aabece7 100644 --- a/saga/interface.cpp +++ b/saga/interface.cpp @@ -478,84 +478,6 @@ void Interface::handleCommandUpdate(SURFACE *ds, const Point& mousePoint) { } -int Interface::handlePlayfieldClick(SURFACE *ds, const Point& imousePt) { -// return SUCCESS; - - int objectNum; - uint16 object_flags = 0; - -// int script_num; - Location location; - - objectNum = _vm->_scene->_objectMap->hitTest(imousePt); - - if (objectNum == -1) { - // Player clicked on empty spot - walk here regardless of verb - location.fromScreenPoint(imousePt); - - _vm->_actor->actorWalkTo(ID_PROTAG, location); - return SUCCESS; - } - -// object_flags = _vm->_scene->_objectMap->getFlags(objectNum); - - if (object_flags & kHitZoneExit) { // FIXME. This is wrong -/* if ((script_num = _vm->_scene->_objectMap->getEPNum(objectNum)) != -1) { - // Set active verb in script module - _vm->_script->putWord(4, 4, I_VerbData[_activeVerb].s_verb); - - // Execute object script if present - if (script_num != 0) { - _vm->_script->SThreadExecute(_iThread, script_num); - } - }*/ - } else { - // Not a normal scene object - walk to it as if it weren't there - location.fromScreenPoint(imousePt); - - _vm->_actor->actorWalkTo(ID_PROTAG, location); - } - - return SUCCESS; -} - -int Interface::handlePlayfieldUpdate(SURFACE *ds, const Point& imousePt) { - return SUCCESS; - /* - const char *object_name; - int objectNum; - uint16 object_flags = 0; - - char new_status[STATUS_TEXT_LEN]; - - new_status[0] = 0; - - objectNum = _vm->_scene->_objectMap->hitTest(imousePt); - - if (objectNum == -1) { - // Cursor over nothing - just display current verb - setStatusText(I_VerbData[_activeVerb].verb_str); - return SUCCESS; - } - - object_flags = _vm->_scene->_objectMap->getFlags(objectNum); - object_name = _vm->_scene->_objectMap->getName(objectNum); - - if (object_flags & OBJECT_EXIT) { // FIXME. This is wrong - // Normal scene object - display as subject of verb - snprintf(new_status, STATUS_TEXT_LEN, "%s %s", I_VerbData[_activeVerb].verb_str, object_name); - } else { - // Not normal scene object - override verb as we can only - // walk to this object - snprintf(new_status, STATUS_TEXT_LEN, "%s %s", I_VerbData[I_VERB_WALKTO].verb_str, object_name); - } - - setStatusText(new_status); - - return SUCCESS; - */ -} - PanelButton *Interface::verbHitTest(const Point& mousePoint) { PanelButton *panelButton; Rect rect; -- cgit v1.2.3