From d3860c573e1bea5825b9481e29570690895255ea Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 27 May 2014 00:01:59 +0200 Subject: MADS: Initialize some variables in MADSAction --- engines/mads/action.cpp | 8 ++++++++ engines/mads/action.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/engines/mads/action.cpp b/engines/mads/action.cpp index 4672ffa54c..1e09ce7421 100644 --- a/engines/mads/action.cpp +++ b/engines/mads/action.cpp @@ -65,6 +65,14 @@ MADSAction::MADSAction(MADSEngine *vm) : _vm(vm) { _savedFields._secondObjectSource = 0; _savedFields._articleNumber = PREP_NONE; _savedFields._lookFlag = false; + + _activeAction._verbId = VERB_NONE; + _activeAction._objectNameId = -1; + _activeAction._indirectObjectId = -1; + _savedFields._commandError = false; + _verbType = VERB_INIT; + _prepType = PREP_NONE; + _pickedWord = -1; } void MADSAction::clear() { diff --git a/engines/mads/action.h b/engines/mads/action.h index 3010226787..cfd5a3be3f 100644 --- a/engines/mads/action.h +++ b/engines/mads/action.h @@ -58,7 +58,7 @@ enum { VERB_WALKTO = 13 }; -enum VerbType { VERB_ONLY, VERB_THIS, VERB_THAT }; +enum VerbType { VERB_ONLY, VERB_THIS, VERB_THAT, VERB_INIT }; enum PrepType { PREP_NONE, PREP_WITH, PREP_TO, PREP_AT, PREP_FROM, PREP_ON, PREP_IN, -- cgit v1.2.3