[Scummvm-cvs-logs] SF.net SVN: scummvm: [28918] scummvm/trunk/engines/saga

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Sep 16 06:22:52 CEST 2007


Revision: 28918
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28918&view=rev
Author:   thebluegr
Date:     2007-09-15 21:22:52 -0700 (Sat, 15 Sep 2007)

Log Message:
-----------
Script modules are now unloaded correctly when changing chapters in IHNM

Modified Paths:
--------------
    scummvm/trunk/engines/saga/scene.cpp
    scummvm/trunk/engines/saga/script.cpp
    scummvm/trunk/engines/saga/script.h

Modified: scummvm/trunk/engines/saga/scene.cpp
===================================================================
--- scummvm/trunk/engines/saga/scene.cpp	2007-09-16 04:06:49 UTC (rev 28917)
+++ scummvm/trunk/engines/saga/scene.cpp	2007-09-16 04:22:52 UTC (rev 28918)
@@ -611,15 +611,7 @@
 			_vm->_interface->setLeftPortrait(0);
 
 		_vm->_anim->freeCutawayList();
-		// FIXME: Freed script modules are not reloaded correctly when changing chapters.
-		// This is apparent when returning back to the character selection screen,
-		// where the scene script module is loaded incorrectly
-		// Don't free them for now, but free them on game exit, like ITE.
-		// This has no impact on the game itself (other than increased memory usage),
-		// as each chapter uses a different module slot
-		// TODO: Find out why the script modules are not loaded correctly when
-		// changing chapters and uncomment this again
-		//_vm->_script->freeModules();
+		_vm->_script->freeModules();
 
 		// deleteAllScenes();
 

Modified: scummvm/trunk/engines/saga/script.cpp
===================================================================
--- scummvm/trunk/engines/saga/script.cpp	2007-09-16 04:06:49 UTC (rev 28917)
+++ scummvm/trunk/engines/saga/script.cpp	2007-09-16 04:22:52 UTC (rev 28918)
@@ -204,6 +204,7 @@
 	for (i = 0; i < _modulesCount; i++) {
 		if (_modules[i].loaded) {
 			_modules[i].freeMem();
+			_modules[i].loaded = false;
 		}
 	}
 	_staticSize = 0;

Modified: scummvm/trunk/engines/saga/script.h
===================================================================
--- scummvm/trunk/engines/saga/script.h	2007-09-16 04:06:49 UTC (rev 28917)
+++ scummvm/trunk/engines/saga/script.h	2007-09-16 04:22:52 UTC (rev 28918)
@@ -237,7 +237,6 @@
 		voiceLUT.freeMem();
 		free(moduleBase);
 		free(entryPoints);
-		memset(this, 0x0, sizeof(*this));
 	}
 };
 


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