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

dreammaster dreammaster at scummvm.org
Thu Oct 8 14:22:52 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:
a1057a3fe5 SHERLOCK: SS: Move fixBadText from ScalpelJournal to ScalpelTalk


Commit: a1057a3fe5277d560fde84b35f57828857f50948
    https://github.com/scummvm/scummvm/commit/a1057a3fe5277d560fde84b35f57828857f50948
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-10-08T08:22:26-04:00

Commit Message:
SHERLOCK: SS: Move fixBadText from ScalpelJournal to ScalpelTalk

Changed paths:
    engines/sherlock/journal.cpp
    engines/sherlock/scalpel/scalpel_journal.cpp
    engines/sherlock/scalpel/scalpel_journal.h
    engines/sherlock/scalpel/scalpel_talk.cpp
    engines/sherlock/scalpel/scalpel_talk.h



diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp
index d5d0295..e443b6f 100644
--- a/engines/sherlock/journal.cpp
+++ b/engines/sherlock/journal.cpp
@@ -24,6 +24,7 @@
 #include "sherlock/scalpel/scalpel.h"
 #include "sherlock/scalpel/scalpel_fixed_text.h"
 #include "sherlock/scalpel/scalpel_journal.h"
+#include "sherlock/scalpel/scalpel_talk.h"
 #include "sherlock/tattoo/tattoo.h"
 #include "sherlock/tattoo/tattoo_fixed_text.h"
 #include "sherlock/tattoo/tattoo_journal.h"
@@ -526,7 +527,7 @@ void Journal::loadJournalFile(bool alreadyLoaded) {
 				journalString += people._characters[c]._name;
 
 			if (IS_SERRATED_SCALPEL && _vm->getLanguage() == Common::DE_DEU)
-				Scalpel::ScalpelJournal::skipBadText(replyP);
+				Scalpel::ScalpelTalk::skipBadText(replyP);
 
 			const byte *strP = replyP;
 			byte v;
diff --git a/engines/sherlock/scalpel/scalpel_journal.cpp b/engines/sherlock/scalpel/scalpel_journal.cpp
index 81db855..5c2b8f7 100644
--- a/engines/sherlock/scalpel/scalpel_journal.cpp
+++ b/engines/sherlock/scalpel/scalpel_journal.cpp
@@ -650,14 +650,6 @@ void ScalpelJournal::record(int converseNum, int statementNum, bool replyOnly) {
 		Journal::record(converseNum, statementNum, replyOnly);
 }
 
-void ScalpelJournal::skipBadText(const byte *&msgP) {
-	// WORKAROUND: Skip over bad text in the original game
-	const char *BAD_PHRASE1 = "Change Speaker to Sherlock Holmes ";
-	
-	if (!strncmp((const char *)msgP, BAD_PHRASE1, strlen(BAD_PHRASE1)))
-		msgP += strlen(BAD_PHRASE1);
-}
-
 } // End of namespace Scalpel
 
 } // End of namespace Sherlock
diff --git a/engines/sherlock/scalpel/scalpel_journal.h b/engines/sherlock/scalpel/scalpel_journal.h
index 2f64141..c8e9c01 100644
--- a/engines/sherlock/scalpel/scalpel_journal.h
+++ b/engines/sherlock/scalpel/scalpel_journal.h
@@ -71,11 +71,6 @@ public:
 	void drawInterface();
 
 	/**
-	 * Handles skipping over bad text in conversations
-	 */
-	static void skipBadText(const byte *&msgP);
-
-	/**
 	 * Handle events whilst the journal is being displayed
 	 */
 	bool handleEvents(int key);
diff --git a/engines/sherlock/scalpel/scalpel_talk.cpp b/engines/sherlock/scalpel/scalpel_talk.cpp
index 64aac4e..375b27b 100644
--- a/engines/sherlock/scalpel/scalpel_talk.cpp
+++ b/engines/sherlock/scalpel/scalpel_talk.cpp
@@ -191,7 +191,7 @@ void ScalpelTalk::talkInterface(const byte *&str) {
 	UserInterface &ui = *_vm->_ui;
 
 	if (_vm->getLanguage() == Common::DE_DEU)
-		ScalpelJournal::skipBadText(str);
+		skipBadText(str);
 
 	// If the window isn't yet open, draw the window before printing starts
 	if (!ui._windowOpen && _noTextYet) {
@@ -1013,6 +1013,14 @@ void ScalpelTalk::clearSequences() {
 	_sequenceStack.clear();
 }
 
+void ScalpelTalk::skipBadText(const byte *&msgP) {
+	// WORKAROUND: Skip over bad text in the original game
+	const char *BAD_PHRASE1 = "Change Speaker to Sherlock Holmes ";
+
+	if (!strncmp((const char *)msgP, BAD_PHRASE1, strlen(BAD_PHRASE1)))
+		msgP += strlen(BAD_PHRASE1);
+}
+
 } // End of namespace Scalpel
 
 } // End of namespace Sherlock
diff --git a/engines/sherlock/scalpel/scalpel_talk.h b/engines/sherlock/scalpel/scalpel_talk.h
index a9a3753..3ba61da 100644
--- a/engines/sherlock/scalpel/scalpel_talk.h
+++ b/engines/sherlock/scalpel/scalpel_talk.h
@@ -132,6 +132,11 @@ public:
 	bool talk3DOMovieTrigger(int subIndex);
 
 	/**
+	 * Handles skipping over bad text in conversations
+	 */
+	static void skipBadText(const byte *&msgP);
+
+	/**
 	 * Push the details of a passed object onto the saved sequences stack
 	 */
 	virtual void pushSequenceEntry(Object *obj);






More information about the Scummvm-git-logs mailing list