diff options
author | Paul Gilbert | 2007-09-16 04:05:56 +0000 |
---|---|---|
committer | Paul Gilbert | 2007-09-16 04:05:56 +0000 |
commit | 041bb546c652d301bc68630f309b623d89471bab (patch) | |
tree | 9dde36ebfaba5a8095fa6d4d524af581da4730fe | |
parent | f1e9fa1f5eb7c83ec9cd577ca018f29f77447575 (diff) | |
download | scummvm-rg350-041bb546c652d301bc68630f309b623d89471bab.tar.gz scummvm-rg350-041bb546c652d301bc68630f309b623d89471bab.tar.bz2 scummvm-rg350-041bb546c652d301bc68630f309b623d89471bab.zip |
Bugfix to keep language strings in memory across restarts
svn-id: r28916
-rw-r--r-- | engines/lure/res.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp index 419101a6ee..b0e99b5be5 100644 --- a/engines/lure/res.cpp +++ b/engines/lure/res.cpp @@ -42,11 +42,19 @@ Resources &Resources::getReference() { 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 @@ void Resources::freeData() { _randomActions.clear(); _indexedRoomExitHospots.clear(); _pausedList.clear(); - _stringList.clear(); _actionsList.clear(); _coordinateList.clear(); _talkHeaders.clear(); @@ -324,11 +331,6 @@ void Resources::reloadData() { indexedRec++; } - // Load the string list - mb = d.getEntry(STRING_LIST_RESOURCE_ID); - _stringList.load(mb); - delete mb; - // Initialise delay list _delayList.clear(true); |