aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/callables_ns.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2007-11-01 15:58:33 +0000
committerNicola Mettifogo2007-11-01 15:58:33 +0000
commit06f38474a587104f8aac0a3f0c55a19c05b03005 (patch)
tree4712dfd135f033a16508c72b33a15d15a415db33 /engines/parallaction/callables_ns.cpp
parentc7f315b32c27f3956707e21e66dde9c7b12b7e23 (diff)
downloadscummvm-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.cpp22
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();
}