[Scummvm-cvs-logs] SF.net SVN: scummvm: [28916] scummvm/trunk/engines/lure/res.cpp

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Sun Sep 16 06:05:56 CEST 2007


Revision: 28916
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28916&view=rev
Author:   dreammaster
Date:     2007-09-15 21:05:56 -0700 (Sat, 15 Sep 2007)

Log Message:
-----------
Bugfix to keep language strings in memory across restarts

Modified Paths:
--------------
    scummvm/trunk/engines/lure/res.cpp

Modified: scummvm/trunk/engines/lure/res.cpp
===================================================================
--- scummvm/trunk/engines/lure/res.cpp	2007-09-16 04:04:49 UTC (rev 28915)
+++ scummvm/trunk/engines/lure/res.cpp	2007-09-16 04:05:56 UTC (rev 28916)
@@ -42,11 +42,19 @@
 Resources::Resources() {
 	int_resources = this;
 	reloadData();
+
+	// Load the string list
+	MemoryBlock *mb = Disk::getReference().getEntry(STRING_LIST_RESOURCE_ID);
+	_stringList.load(mb);
+	delete mb;
 }
 
 Resources::~Resources() {
 	// Free up any loaded data
 	freeData();
+
+	// Free up constant data
+	_stringList.clear();
 }
 
 void Resources::freeData() {
@@ -61,7 +69,6 @@
 	_randomActions.clear();
 	_indexedRoomExitHospots.clear();
 	_pausedList.clear();
-	_stringList.clear();
 	_actionsList.clear();
 	_coordinateList.clear();
 	_talkHeaders.clear();
@@ -324,11 +331,6 @@
 		indexedRec++;
 	}
 
-	// Load the string list
-	mb = d.getEntry(STRING_LIST_RESOURCE_ID);
-	_stringList.load(mb);
-	delete mb;
-
 	// Initialise delay list
 	_delayList.clear(true);
 


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