Skip to content

Commit

Permalink
DIRECTOR: Properly initialize class variables
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Aug 3, 2016
1 parent eb4ef6d commit df62619
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions engines/director/director.cpp
Expand Up @@ -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\
Expand All @@ -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);
Expand Down

0 comments on commit df62619

Please sign in to comment.