aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-10-08 08:22:26 -0400
committerPaul Gilbert2015-10-08 08:22:26 -0400
commita1057a3fe5277d560fde84b35f57828857f50948 (patch)
tree1083c047536c34929ae82d8ca06ea60853cf332d
parent3c6cf2b947a49df918c2f4d6a91e2f176ac39707 (diff)
downloadscummvm-rg350-a1057a3fe5277d560fde84b35f57828857f50948.tar.gz
scummvm-rg350-a1057a3fe5277d560fde84b35f57828857f50948.tar.bz2
scummvm-rg350-a1057a3fe5277d560fde84b35f57828857f50948.zip
SHERLOCK: SS: Move fixBadText from ScalpelJournal to ScalpelTalk
-rw-r--r--engines/sherlock/journal.cpp3
-rw-r--r--engines/sherlock/scalpel/scalpel_journal.cpp8
-rw-r--r--engines/sherlock/scalpel/scalpel_journal.h5
-rw-r--r--engines/sherlock/scalpel/scalpel_talk.cpp10
-rw-r--r--engines/sherlock/scalpel/scalpel_talk.h5
5 files changed, 16 insertions, 15 deletions
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp
index d5d029589b..e443b6f727 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 81db8556f4..5c2b8f77f3 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 2f64141bb2..c8e9c01739 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 64aac4e308..375b27bfad 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 a9a3753b64..3ba61dadc1 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);