diff options
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/actor.cpp | 15 | ||||
-rw-r--r-- | engines/saga/interface.cpp | 16 | ||||
-rw-r--r-- | engines/saga/script.cpp | 19 | ||||
-rw-r--r-- | engines/saga/sfuncs.cpp | 8 |
4 files changed, 18 insertions, 40 deletions
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp index d8b115f9bd..8c45a2890e 100644 --- a/engines/saga/actor.cpp +++ b/engines/saga/actor.cpp @@ -1174,21 +1174,6 @@ void Actor::actorSpeech(uint16 actorId, const char **strings, int stringsCount, _activeSpeech.speechBox.right = _vm->getDisplayInfo().width - 10; } - // HACK for the compact disk in Ellen's chapter - // Once Ellen starts saying that "Something is different", bring the compact disk in the - // scene. After speaking with AM, the compact disk is visible. She always says this line - // when entering room 59, after speaking with AM, if the compact disk is not picked up yet - // Check Script::sfDropObject for the other part of this hack - if (_vm->getGameId() == GID_IHNM && _vm->_scene->currentChapterNumber() == 3 && - _vm->_scene->currentSceneNumber() == 59 && _activeSpeech.sampleResourceId == 286) { - for (ObjectDataArray::iterator obj = _objs.begin(); obj != _objs.end(); ++obj) { - if (obj->_id == 16385) { // the compact disk - obj->_sceneNumber = 59; - break; - } - } - } - } void Actor::nonActorSpeech(const Common::Rect &box, const char **strings, int stringsCount, int sampleResourceId, int speechFlags) { diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp index 9dcc8d9137..e6b196c4cd 100644 --- a/engines/saga/interface.cpp +++ b/engines/saga/interface.cpp @@ -2533,10 +2533,12 @@ void Interface::converseDisplayTextLines() { char bullet[2] = { (char)0xb7, 0 }; - Rect rect(8, _vm->getDisplayInfo().converseTextLines * _vm->getDisplayInfo().converseTextHeight); - Point textPoint; assert(_conversePanel.buttonsCount >= 6); + Rect rect(8, _vm->getDisplayInfo().converseTextLines * _vm->getDisplayInfo().converseTextHeight); + rect.moveTo(_conversePanel.x + _conversePanel.buttons[0].xOffset, _conversePanel.y + _conversePanel.buttons[0].yOffset); + + Point textPoint; if (_vm->getGameId() == GID_ITE) { bulletForegnd = kITEColorGreen; @@ -2547,13 +2549,11 @@ void Interface::converseDisplayTextLines() { bullet[0] = '>'; // different bullet in IHNM } - rect.moveTo(_conversePanel.x + _conversePanel.buttons[0].xOffset, - _conversePanel.y + _conversePanel.buttons[0].yOffset); - if (_vm->getGameId() == GID_ITE) - _vm->_gfx->drawRect(rect, kITEColorDarkGrey); //fill bullet place - else - _vm->_gfx->drawRect(rect, _vm->KnownColor2ColorId(kKnownColorBlack)); //fill bullet place + _vm->_gfx->drawRect(rect, kITEColorDarkGrey); // fill bullet place + else if (_vm->getGameId() == GID_IHNM) + // TODO: Add these to IHNM_DisplayInfo? + _vm->_gfx->drawRect(Common::Rect(118, 345, 603, 463), _vm->KnownColor2ColorId(kKnownColorBlack)); // fill converse rect for (int i = 0; i < _vm->getDisplayInfo().converseTextLines; i++) { relPos = _converseStartPos + i; diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp index 3cc6586432..7a84944b17 100644 --- a/engines/saga/script.cpp +++ b/engines/saga/script.cpp @@ -1709,15 +1709,16 @@ void Script::whichObject(const Point& mousePoint) { if (_vm->getGameId() == GID_IHNM && objectId == 8199) newRightButtonVerb = getVerbType(kVerbLookAt); - if ((_currentVerb == getVerbType(kVerbPickUp)) || - (_currentVerb == getVerbType(kVerbOpen)) || - (_currentVerb == getVerbType(kVerbClose)) || - ((_currentVerb == getVerbType(kVerbGive)) && !_firstObjectSet) || - ((_currentVerb == getVerbType(kVerbUse)) && !(actor->_flags & kFollower))) { - if (_vm->getGameId() == GID_ITE) { - objectId = ID_NOTHING; - newObjectId = ID_NOTHING; - } + bool actorIsFollower = (actor->_flags & kFollower); + bool actorCanBeUsed = (actor->_flags & kUsable); + + if ( _currentVerb == getVerbType(kVerbPickUp) || + _currentVerb == getVerbType(kVerbOpen) || + _currentVerb == getVerbType(kVerbClose) || + (_currentVerb == getVerbType(kVerbGive) && !_firstObjectSet) || + (_currentVerb == getVerbType(kVerbUse) && !_firstObjectSet && !(actorIsFollower || actorCanBeUsed))) { + objectId = ID_NOTHING; + newObjectId = ID_NOTHING; } } } diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp index 2175d8f40a..6456daeb02 100644 --- a/engines/saga/sfuncs.cpp +++ b/engines/saga/sfuncs.cpp @@ -704,14 +704,6 @@ void Script::sfDropObject(SCRIPTFUNC_PARAMS) { obj->_sceneNumber = _vm->_scene->currentSceneNumber(); - // HACK for the compact disk in Ellen's chapter - // Change the scene number of the compact disk so that it's not shown. It will be shown - // once Ellen says that there's something different (i.e. after speaking with AM) - // See Actor::actorSpeech for the other part of this hack - if (_vm->getGameId() == GID_IHNM && _vm->_scene->currentChapterNumber() == 3 && - _vm->_scene->currentSceneNumber() == 59 && obj->_id == 16385) - obj->_sceneNumber = -1; - if (_vm->getGameId() == GID_IHNM) { // Don't update _spriteListResourceId if spriteId is 0 and the object is not the // psychic profile. If spriteId == 0, the object's sprite is incorrectly reset. |