[Scummvm-git-logs] scummvm master -> ca8785fdbf8dd458ac27ca1865b871c0618ebf79

bluegr bluegr at gmail.com
Sun Aug 20 16:11:40 CEST 2017


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
06f934dc9f SAGA: Remove obsolete hack for the compact disk in Ellen's chapter
ca8785fdbf SAGA: Filter scene verbs on objects properly for IHNM. Fixes bug #9712


Commit: 06f934dc9f46a8fa4c88cdb56f6372320ad78aac
    https://github.com/scummvm/scummvm/commit/06f934dc9f46a8fa4c88cdb56f6372320ad78aac
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2017-08-20T17:10:32+03:00

Commit Message:
SAGA: Remove obsolete hack for the compact disk in Ellen's chapter

This has been added in commit 5624ba23d0 and is no longer needed.
The gem is shown correctly over the compact disk in that scene,
and the behavior is the same as the original

Changed paths:
    engines/saga/actor.cpp
    engines/saga/sfuncs.cpp


diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp
index d8b115f..8c45a28 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/sfuncs.cpp b/engines/saga/sfuncs.cpp
index 2175d8f..6456dae 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.


Commit: ca8785fdbf8dd458ac27ca1865b871c0618ebf79
    https://github.com/scummvm/scummvm/commit/ca8785fdbf8dd458ac27ca1865b871c0618ebf79
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2017-08-20T17:10:33+03:00

Commit Message:
SAGA: Filter scene verbs on objects properly for IHNM. Fixes bug #9712

The original check was incorrectly disabled for IHNM in commit
ab6fb8e9c3. The check has been enabled again, with an added condition
for actors that can be used, like the jukebox in Gorrister's

Changed paths:
    engines/saga/script.cpp


diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp
index 3cc6586..7a84944 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;
 						}
 				}
 			}





More information about the Scummvm-git-logs mailing list