aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/game.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-01 15:11:20 +0000
committerFilippos Karapetis2010-06-01 15:11:20 +0000
commit9c92bd1b810621bdaa779bd3354b10ad048c7924 (patch)
tree16a56f987b162ff3ca0f1f8ef0ec78e6a762f866 /engines/sci/engine/game.cpp
parente083c20da1aab0090a5fc3ea624c9810c63dad52 (diff)
downloadscummvm-rg350-9c92bd1b810621bdaa779bd3354b10ad048c7924.tar.gz
scummvm-rg350-9c92bd1b810621bdaa779bd3354b10ad048c7924.tar.bz2
scummvm-rg350-9c92bd1b810621bdaa779bd3354b10ad048c7924.zip
The parser vocabulary remains static throughout the game, thus it has been removed from the engine state
svn-id: r49373
Diffstat (limited to 'engines/sci/engine/game.cpp')
-rw-r--r--engines/sci/engine/game.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index 02e66f2142..03c3594f03 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -99,10 +99,12 @@ int game_init(EngineState *s) {
return 1;
}
- if (s->_voc) {
- s->_voc->parserIsValid = false; // Invalidate parser
- s->_voc->parser_event = NULL_REG; // Invalidate parser event
- s->_voc->parser_base = make_reg(s->_segMan->getSysStringsSegment(), SYS_STRING_PARSER_BASE);
+ // Reset parser
+ Vocabulary *voc = g_sci->getVocabulary();
+ if (voc) {
+ voc->parserIsValid = false; // Invalidate parser
+ voc->parser_event = NULL_REG; // Invalidate parser event
+ voc->parser_base = make_reg(s->_segMan->getSysStringsSegment(), SYS_STRING_PARSER_BASE);
}
// Initialize menu TODO: Actually this should be another init()