aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2016-07-04 22:58:45 +0200
committerEugene Sandulenko2016-08-03 23:40:36 +0200
commitdf626193634fe4faf76b75658044d30e6e7bf3d3 (patch)
tree6b0fb6a7cfa916ba60b486080b93656ef826cb9c /engines
parenteb4ef6db565307d36fdcec52b66afceeb8c2a917 (diff)
downloadscummvm-rg350-df626193634fe4faf76b75658044d30e6e7bf3d3.tar.gz
scummvm-rg350-df626193634fe4faf76b75658044d30e6e7bf3d3.tar.bz2
scummvm-rg350-df626193634fe4faf76b75658044d30e6e7bf3d3.zip
DIRECTOR: Properly initialize class variables
Diffstat (limited to 'engines')
-rw-r--r--engines/director/director.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index d9e43124cd..a39894e50c 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -89,12 +89,28 @@ DirectorEngine::~DirectorEngine() {
Common::Error DirectorEngine::run() {
debug("Starting v%d Director game", getVersion());
+ _sharedCasts = nullptr;
+ _sharedSound = nullptr;
+ _sharedBMP = nullptr;
+ _sharedSTXT = nullptr;
+ _sharedDIB = nullptr;
+
+ _movies = nullptr;
+ _currentPalette = nullptr;
+
+ _macBinary = nullptr;
+ _soundManager = nullptr;
+
_lingo = new Lingo(this);
_soundManager = new DirectorSound();
-#if 1
+#if 0
+ _mainArchive = nullptr;
+ _currentScore = nullptr;
+
_lingo->addCode("--\n\
- -- repeat with x = 1 to 5\n\
+ --repeat with x = 1 to 5\n\
+ set x = 4\n\
if x = 1 then\n\
put 1\n\
else if x = 2 then\n\
@@ -104,7 +120,7 @@ Common::Error DirectorEngine::run() {
end if\n\
if x = 4 then put 4\n\
else put 5\n\
- -- end repeat\n\
+ --end repeat\n\
", kMovieScript, 2);
_lingo->executeScript(kMovieScript, 2);