From 0ce3f9ff35eca3eedb8bc7f90b01eb05994407b3 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 27 Jan 2006 00:50:27 +0000 Subject: Resource modified status always cleared when nuked. svn-id: r20203 --- scumm/resource.cpp | 7 +------ scumm/script_v100he.cpp | 6 ++---- scumm/script_v7he.cpp | 1 - scumm/scumm.h | 1 - 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/scumm/resource.cpp b/scumm/resource.cpp index 5f232a8969..46b420a2d0 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -937,6 +937,7 @@ void ResourceManager::nukeResource(int type, int idx) { debugC(DEBUG_RESOURCE, "nukeResource(%s,%d)", resTypeFromId(type), idx); address[type][idx] = 0; flags[type][idx] = 0; + status[type][idx] &= ~RS_MODIFIED; _allocatedSize -= ((MemBlkHeader *)ptr)->size; free(ptr); } @@ -1018,12 +1019,6 @@ void ResourceManager::setModified(int type, int i) { status[type][i] |= RS_MODIFIED; } -void ResourceManager::setUnModified(int type, int i) { - if (!validateResource("Modified", type, i)) - return; - status[type][i] &= ~RS_MODIFIED; -} - bool ResourceManager::isModified(int type, int i) const { if (!validateResource("isModified", type, i)) return false; diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp index f1ede6f4b7..bfd24c9790 100644 --- a/scumm/script_v100he.cpp +++ b/scumm/script_v100he.cpp @@ -1119,12 +1119,10 @@ void ScummEngine_v100he::o100_resourceRoutines() { } break; case 133: - if (_heResType == rtCharset) { + if (_heResType == rtCharset) nukeCharset(_heResId); - } else { - res.setUnModified(_heResType, _heResId); + else res.nukeResource(_heResType, _heResId); - } break; case 134: case 135: diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp index a99ee1c95f..5fa56605d1 100644 --- a/scumm/script_v7he.cpp +++ b/scumm/script_v7he.cpp @@ -631,7 +631,6 @@ void ScummEngine_v70he::o70_resourceRoutines() { break; case 192: resid = pop(); - res.setUnModified(rtImage, resid); res.nukeResource(rtImage, resid); break; case 201: diff --git a/scumm/scumm.h b/scumm/scumm.h index 82278dc595..06fa8dcc0e 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -352,7 +352,6 @@ public: bool isLocked(int type, int i) const; void setModified(int type, int i); - void setUnModified(int type, int i); bool isModified(int type, int i) const; void setResourceCounter(int type, int index, byte flag); -- cgit v1.2.3