diff options
author | Nicola Mettifogo | 2007-11-01 15:58:33 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-11-01 15:58:33 +0000 |
commit | 06f38474a587104f8aac0a3f0c55a19c05b03005 (patch) | |
tree | 4712dfd135f033a16508c72b33a15d15a415db33 /engines/parallaction/callables_ns.cpp | |
parent | c7f315b32c27f3956707e21e66dde9c7b12b7e23 (diff) | |
download | scummvm-rg350-06f38474a587104f8aac0a3f0c55a19c05b03005.tar.gz scummvm-rg350-06f38474a587104f8aac0a3f0c55a19c05b03005.tar.bz2 scummvm-rg350-06f38474a587104f8aac0a3f0c55a19c05b03005.zip |
Consolidated game data cleanup in a single routine to location switches more reliable, especially on savegames and on game start.
svn-id: r29357
Diffstat (limited to 'engines/parallaction/callables_ns.cpp')
-rw-r--r-- | engines/parallaction/callables_ns.cpp | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/engines/parallaction/callables_ns.cpp b/engines/parallaction/callables_ns.cpp index f35c986671..d258276838 100644 --- a/engines/parallaction/callables_ns.cpp +++ b/engines/parallaction/callables_ns.cpp @@ -438,24 +438,7 @@ void Parallaction_ns::_c_finito(void *parm) { _engineFlags |= kEngineChangeLocation; } - // this code saves main character animation from being removed from the following code - _animations.remove(&_char._ani); - _locationNames[0][0] = '\0'; - _numLocations = 0; - _commandFlags = 0; - - // this flag tells freeZones to unconditionally remove *all* Zones - _engineFlags |= kEngineQuit; - - freeZones(); - freeAnimations(); - - // this dangerous flag can now be cleared - _engineFlags &= ~kEngineQuit; - - // main character animation is restored - _animations.push_front(&_char._ani); - _score = 0; + cleanupGame(); return; } @@ -550,6 +533,9 @@ void Parallaction_ns::_c_endIntro(void *parm) { _engineFlags &= ~kEngineBlockInput; selectCharacterForNewLocation(); _engineFlags |= kEngineChangeLocation; + + cleanupGame(); + } else { waitUntilLeftClick(); } |