[Scummvm-cvs-logs] SF.net SVN: scummvm: [29240] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sun Oct 21 17:26:07 CEST 2007
Revision: 29240
http://scummvm.svn.sourceforge.net/scummvm/?rev=29240&view=rev
Author: peres001
Date: 2007-10-21 08:26:07 -0700 (Sun, 21 Oct 2007)
Log Message:
-----------
Fixed parseLocation, so that it only tries to parse scripts when they aren't already loaded. This fixes bugs like #1816899, caused by the wrong data archive being selected in the Disk object.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/parallaction_ns.cpp
scummvm/trunk/engines/parallaction/parser_ns.cpp
Modified: scummvm/trunk/engines/parallaction/parallaction_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction_ns.cpp 2007-10-21 13:10:36 UTC (rev 29239)
+++ scummvm/trunk/engines/parallaction/parallaction_ns.cpp 2007-10-21 15:26:07 UTC (rev 29240)
@@ -369,6 +369,11 @@
_soundMan->playCharacterMusic(_char.getBaseName());
+ // The original engine used to reload 'common' only on loadgames. We are reloading here since 'common'
+ // contains character specific stuff. This causes crashes like bug #1816899, because parseLocation tries
+ // to reload scripts but the data archive selected is occasionally wrong. This has been solved by having
+ // parseLocation only load scripts when they aren't already loaded - which it should have done since the
+ // beginning nevertheless.
if (!(getFeatures() & GF_DEMO))
parseLocation("common");
}
Modified: scummvm/trunk/engines/parallaction/parser_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parser_ns.cpp 2007-10-21 13:10:36 UTC (rev 29239)
+++ scummvm/trunk/engines/parallaction/parser_ns.cpp 2007-10-21 15:26:07 UTC (rev 29240)
@@ -988,8 +988,9 @@
// this loads animation scripts
AnimationList::iterator it = _animations.begin();
for ( ; it != _animations.end(); it++) {
- if ((*it)->_scriptName)
+ if (((*it)->_scriptName) && ((*it)->_program == 0)) {
loadProgram(*it, (*it)->_scriptName);
+ }
}
debugC(1, kDebugParser, "parseLocation('%s') done", filename);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list