[Scummvm-cvs-logs] scummvm master -> f6c710e5b33b72723c4983bc498a4127497d772e

dreammaster dreammaster at scummvm.org
Thu Jun 18 14:31:02 CEST 2015


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

Summary:
f6c710e5b3 SHERLOCK: RT: Create pullNPCPaths to call each NPC's pullNPCPath method


Commit: f6c710e5b33b72723c4983bc498a4127497d772e
    https://github.com/scummvm/scummvm/commit/f6c710e5b33b72723c4983bc498a4127497d772e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-06-18T08:29:57-04:00

Commit Message:
SHERLOCK: RT: Create pullNPCPaths to call each NPC's pullNPCPath method

Changed paths:
    engines/sherlock/talk.cpp
    engines/sherlock/tattoo/tattoo_people.cpp
    engines/sherlock/tattoo/tattoo_people.h



diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp
index 9983a30..050d319 100644
--- a/engines/sherlock/talk.cpp
+++ b/engines/sherlock/talk.cpp
@@ -202,7 +202,9 @@ void Talk::talkTo(const Common::String &filename) {
 	if (IS_SERRATED_SCALPEL) {
 		// Restore any pressed button
 		if (!ui._windowOpen && savedMode != STD_MODE)
-			((Scalpel::ScalpelUserInterface *)_vm->_ui)->restoreButton((int)(savedMode - 1));
+			static_cast<Scalpel::ScalpelUserInterface *>(_vm->_ui)->restoreButton((int)(savedMode - 1));
+	} else {
+		static_cast<Tattoo::TattooPeople *>(_vm->_people)->pullNPCPaths();
 	}
 
 	// Clear the ui counter so that anything displayed on the info line
@@ -1118,6 +1120,9 @@ void Talk::doScript(const Common::String &script) {
 		pullSequence();
 		if (_speaker >= 0 && _speaker < SPEAKER_REMOVE)
 			people.clearTalking();
+
+		if (IS_ROSE_TATTOO)
+			static_cast<Tattoo::TattooPeople *>(_vm->_people)->pullNPCPaths();
 	}
 }
 
diff --git a/engines/sherlock/tattoo/tattoo_people.cpp b/engines/sherlock/tattoo/tattoo_people.cpp
index 3895f43..217064f 100644
--- a/engines/sherlock/tattoo/tattoo_people.cpp
+++ b/engines/sherlock/tattoo/tattoo_people.cpp
@@ -1239,6 +1239,17 @@ bool TattooPeople::loadWalk() {
 	return result;
 }
 
+
+void TattooPeople::pullNPCPaths() {
+	for (int idx = 1; idx < MAX_CHARACTERS; ++idx) {
+		TattooPerson &p = (*this)[idx];
+		if (p._npcMoved) {
+			while (!p._pathStack.empty())
+				p.pullNPCPath();
+		}
+	}
+}
+
 } // End of namespace Tattoo
 
 } // End of namespace Sherlock
diff --git a/engines/sherlock/tattoo/tattoo_people.h b/engines/sherlock/tattoo/tattoo_people.h
index 1abf2d5..6883b9d 100644
--- a/engines/sherlock/tattoo/tattoo_people.h
+++ b/engines/sherlock/tattoo/tattoo_people.h
@@ -222,6 +222,10 @@ public:
 	 */
 	void setListenSequence(int speaker, int sequenceNum);
 
+	/**
+	 * Restore any saved NPC walk path data from any of the NPCs
+	 */
+	void pullNPCPaths();
 
 	/**
 	 * Finds the scene background object corresponding to a specified speaker






More information about the Scummvm-git-logs mailing list