From ac4d325e0d61b649026a5f5414f749697b285ccc Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 13 Feb 2010 17:42:49 +0000 Subject: SCI: Add global g_sci pointer to the active SciEngine instance svn-id: r48046 --- engines/sci/parser/vocabulary.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/sci/parser/vocabulary.cpp') diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp index 2cf47f00c3..00448f5d51 100644 --- a/engines/sci/parser/vocabulary.cpp +++ b/engines/sci/parser/vocabulary.cpp @@ -448,7 +448,7 @@ bool Vocabulary::tokenizeString(ResultWordList &retval, const char *sentence, ch void Vocabulary::printSuffixes() const { char word_buf[256], alt_buf[256]; - Console *con = ((SciEngine *)g_engine)->getSciDebugger(); + Console *con = g_sci->getSciDebugger(); int i = 0; for (SuffixList::const_iterator suf = _parserSuffixes.begin(); suf != _parserSuffixes.end(); ++suf) { @@ -463,7 +463,7 @@ void Vocabulary::printSuffixes() const { } void Vocabulary::printParserWords() const { - Console *con = ((SciEngine *)g_engine)->getSciDebugger(); + Console *con = g_sci->getSciDebugger(); int j = 0; for (WordMap::iterator i = _parserWords.begin(); i != _parserWords.end(); ++i) { @@ -570,7 +570,7 @@ void Vocabulary::synonymizeTokens(ResultWordList &words) { } void Vocabulary::printParserNodes(int num) { - Console *con = ((SciEngine *)g_engine)->getSciDebugger(); + Console *con = g_sci->getSciDebugger(); for (int i = 0; i < num; i++) { con->DebugPrintf(" Node %03x: ", i); @@ -584,7 +584,7 @@ void Vocabulary::printParserNodes(int num) { int Vocabulary::parseNodes(int *i, int *pos, int type, int nr, int argc, const char **argv) { int nextToken = 0, nextValue = 0, newPos = 0, oldPos = 0; - Console *con = ((SciEngine *)g_engine)->getSciDebugger(); + Console *con = g_sci->getSciDebugger(); if (type == kParseNil) return 0; -- cgit v1.2.3