From 849f383169d57b0dee7b33ab0c2166007b50b8c2 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 27 Jan 2015 07:14:55 +0100 Subject: MADE: Initialize some variables, remove a useless variable --- engines/made/script.cpp | 5 +++++ engines/made/script.h | 1 - engines/made/scriptfuncs.cpp | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'engines/made') diff --git a/engines/made/script.cpp b/engines/made/script.cpp index 20fa026a40..f9f7acffde 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -122,6 +122,11 @@ ScriptInterpreter::ScriptInterpreter(MadeEngine *vm) : _vm(vm) { _functions = new ScriptFunctions(_vm); _functions->setupExternalsTable(); + _localStackPos = 0; + _runningScriptObjectIndex = 0; + _codeBase = nullptr; + _codeIp = nullptr; + #undef COMMAND } diff --git a/engines/made/script.h b/engines/made/script.h index bf75bc0875..f28425d13b 100644 --- a/engines/made/script.h +++ b/engines/made/script.h @@ -84,7 +84,6 @@ protected: int16 _localStackPos; int16 _runningScriptObjectIndex; byte *_codeBase, *_codeIp; - bool _terminated; ScriptFunctions *_functions; diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index efa765c7eb..bcc08e0dcc 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -42,6 +42,8 @@ ScriptFunctions::ScriptFunctions(MadeEngine *vm) : _vm(vm), _soundStarted(false) _pcSpeaker2 = new Audio::PCSpeaker(); _vm->_system->getMixer()->playStream(Audio::Mixer::kMusicSoundType, &_pcSpeakerHandle1, _pcSpeaker1); _vm->_system->getMixer()->playStream(Audio::Mixer::kMusicSoundType, &_pcSpeakerHandle2, _pcSpeaker2); + _soundResource = nullptr; + _musicRes = nullptr; } ScriptFunctions::~ScriptFunctions() { -- cgit v1.2.3