[Scummvm-cvs-logs] SF.net SVN: scummvm:[40663] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Mon May 18 00:44:59 CEST 2009


Revision: 40663
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40663&view=rev
Author:   lordhoto
Date:     2009-05-17 22:44:58 +0000 (Sun, 17 May 2009)

Log Message:
-----------
- Cleanup
- LoL: fix memory leak

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/lol.cpp
    scummvm/trunk/engines/kyra/saveload_lok.cpp

Modified: scummvm/trunk/engines/kyra/lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/lol.cpp	2009-05-17 22:41:09 UTC (rev 40662)
+++ scummvm/trunk/engines/kyra/lol.cpp	2009-05-17 22:44:58 UTC (rev 40663)
@@ -400,6 +400,9 @@
 	delete[] _defaultLegendData;
 	delete[] _mapCursorOverlay;
 	delete[] _mapOverlay;
+
+	for (Common::Array<const SpellProc*>::iterator i = _spellProcs.begin(); i != _spellProcs.end(); ++i)
+		delete *i;
 	_spellProcs.clear();
 }
 
@@ -544,6 +547,8 @@
 	if (!_flags.isDemo && !_res->loadFileList("FILEDATA.FDT"))
 		error("Couldn't load file list: 'FILEDATA.FDT'");
 
+	// Usually fonts etc. would be setup by the prologue code, if we skip
+	// the prologue code we need to setup them manually here.
 	if (_gameToLoad != -1)
 		preInit();
 

Modified: scummvm/trunk/engines/kyra/saveload_lok.cpp
===================================================================
--- scummvm/trunk/engines/kyra/saveload_lok.cpp	2009-05-17 22:41:09 UTC (rev 40662)
+++ scummvm/trunk/engines/kyra/saveload_lok.cpp	2009-05-17 22:44:58 UTC (rev 40663)
@@ -162,7 +162,7 @@
 		// In the first version when this entry was introduced,
 		// it wasn't made sure that _curSfxFile was initialized
 		// so if it's out of bounds we just set it to 0.
-		if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) {
+		if (_flags.platform == Common::kPlatformFMTowns) {
 			if (_curSfxFile >= _soundData->fileListLen || _curSfxFile < 0)
 				_curSfxFile = 0;
 			_sound->loadSoundFile(_curSfxFile);


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