aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2006-01-27 00:50:27 +0000
committerTravis Howell2006-01-27 00:50:27 +0000
commit0ce3f9ff35eca3eedb8bc7f90b01eb05994407b3 (patch)
treea183bda32d01c8d2ef4afa3697e1dfdefcff0b9d
parente370d8525419c8b9e47b423384b1169602cc6bb4 (diff)
downloadscummvm-rg350-0ce3f9ff35eca3eedb8bc7f90b01eb05994407b3.tar.gz
scummvm-rg350-0ce3f9ff35eca3eedb8bc7f90b01eb05994407b3.tar.bz2
scummvm-rg350-0ce3f9ff35eca3eedb8bc7f90b01eb05994407b3.zip
Resource modified status always cleared when nuked.
svn-id: r20203
-rw-r--r--scumm/resource.cpp7
-rw-r--r--scumm/script_v100he.cpp6
-rw-r--r--scumm/script_v7he.cpp1
-rw-r--r--scumm/scumm.h1
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);