aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/parser/vocabulary.cpp
diff options
context:
space:
mode:
authorMax Horn2010-02-13 17:42:49 +0000
committerMax Horn2010-02-13 17:42:49 +0000
commitac4d325e0d61b649026a5f5414f749697b285ccc (patch)
treec58f62596d050be62e98180c0255e7998a9a62e4 /engines/sci/parser/vocabulary.cpp
parent24fd77eb242c4d90e8c3a3b0bcc5f0c48a4dc77f (diff)
downloadscummvm-rg350-ac4d325e0d61b649026a5f5414f749697b285ccc.tar.gz
scummvm-rg350-ac4d325e0d61b649026a5f5414f749697b285ccc.tar.bz2
scummvm-rg350-ac4d325e0d61b649026a5f5414f749697b285ccc.zip
SCI: Add global g_sci pointer to the active SciEngine instance
svn-id: r48046
Diffstat (limited to 'engines/sci/parser/vocabulary.cpp')
-rw-r--r--engines/sci/parser/vocabulary.cpp8
1 files changed, 4 insertions, 4 deletions
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;