diff options
| -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); |
