aboutsummaryrefslogtreecommitdiff
path: root/scumm/saveload.cpp
diff options
context:
space:
mode:
authorTravis Howell2004-02-20 01:31:29 +0000
committerTravis Howell2004-02-20 01:31:29 +0000
commit83935dd920d9bc44a36c9af46998d4761cf0b60a (patch)
tree48a656358c6b82f534e0252cc83593096e499d40 /scumm/saveload.cpp
parent9f073e44c7fd7be0ff8d4c8f55995a8407dfc6da (diff)
downloadscummvm-rg350-83935dd920d9bc44a36c9af46998d4761cf0b60a.tar.gz
scummvm-rg350-83935dd920d9bc44a36c9af46998d4761cf0b60a.tar.bz2
scummvm-rg350-83935dd920d9bc44a36c9af46998d4761cf0b60a.zip
Revert recent change that breaks temporary saves (No music or even crashes)
svn-id: r12938
Diffstat (limited to 'scumm/saveload.cpp')
-rw-r--r--scumm/saveload.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index e9b08f7827..57cf5730cc 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -657,18 +657,6 @@ void ScummEngine::saveOrLoad(Serializer *s, uint32 savegameVersion) {
// Save all resource.
int type, idx;
-
- if (s->isLoading()) {
- // When loading, start by deleting old non-permanent resources (an
- // exception is made for buffer/temp resources, they are going to be
- // deleted later on anyway).
- for (type = rtFirst; type <= rtLast; type++) {
- if (res.mode[type] != 1 && type != rtTemp && type != rtBuffer)
- for (idx = 1; idx < res.num[type]; idx++)
- nukeResource(type, idx);
- }
- }
-
if (savegameVersion >= VER(26)) {
// New, more robust resource save/load system. This stores the type
// and index of each resource. Thus if we increase e.g. the maximum
@@ -701,9 +689,10 @@ void ScummEngine::saveOrLoad(Serializer *s, uint32 savegameVersion) {
// with index 0, and breaks whenever we change the limit on a given
// resource type.
for (type = rtFirst; type <= rtLast; type++)
- if (res.mode[type] != 1 && type != rtTemp && type != rtBuffer)
+ if (res.mode[type] != 1)
for (idx = 1; idx < res.num[type]; idx++)
- saveLoadResource(s, type, idx);
+ if (type != rtTemp && type != rtBuffer)
+ saveLoadResource(s, type, idx);
}
s->saveLoadArrayOf(_objectOwnerTable, _numGlobalObjects, sizeof(_objectOwnerTable[0]), sleByte);