[Scummvm-cvs-logs] SF.net SVN: scummvm: [31671] scummvm/trunk/engines/kyra/kyra_v2.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Wed Apr 23 20:57:21 CEST 2008
Revision: 31671
http://scummvm.svn.sourceforge.net/scummvm/?rev=31671&view=rev
Author: lordhoto
Date: 2008-04-23 11:57:21 -0700 (Wed, 23 Apr 2008)
Log Message:
-----------
- Fixed possible memory leak.
- Corrected processNewShape implementation.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/kyra_v2.cpp
Modified: scummvm/trunk/engines/kyra/kyra_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.cpp 2008-04-23 18:22:06 UTC (rev 31670)
+++ scummvm/trunk/engines/kyra/kyra_v2.cpp 2008-04-23 18:57:21 UTC (rev 31671)
@@ -1255,7 +1255,7 @@
memset(&_temporaryScriptState, 0, sizeof(_temporaryScriptState));
if (!_scriptInterpreter->loadScript(filename, &_temporaryScriptData, &_opcodesTemporary))
- error("couldn't load temporary script '%s'", filename);
+ error("Couldn't load temporary script '%s'", filename);
_scriptInterpreter->initScript(&_temporaryScriptState, &_temporaryScriptData);
_scriptInterpreter->startScript(&_temporaryScriptState, 0);
@@ -1274,8 +1274,10 @@
fileData = _newShapeFiledata;
- if (!fileData)
+ if (!fileData) {
+ _scriptInterpreter->unloadScript(&_temporaryScriptData);
return;
+ }
if (newShapes)
_newShapeCount = initNewShapes(fileData);
@@ -1658,9 +1660,7 @@
uint32 delayEnd = _system->getMillis() + _newShapeDelay * _tickLength;
- while (!skipFlag() && _system->getMillis() < delayEnd) {
- // XXX skipFlag handling, unk1 seems to make a scene not skipable
-
+ while ((!skipFlag() || unk1) && _system->getMillis() < delayEnd) {
if (_chatText)
updateWithText();
else
@@ -1668,6 +1668,9 @@
delay(10);
}
+
+ if (skipFlag())
+ resetSkipFlag();
}
if (unk2) {
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