[Scummvm-cvs-logs] CVS: scummvm/scumm resource.cpp,1.339.2.11,1.339.2.12 script_v100he.cpp,2.173.2.8,2.173.2.9 script_v7he.cpp,2.166.2.9,2.166.2.10 scumm.h,1.647.2.16,1.647.2.17

kirben kirben at users.sourceforge.net
Thu Jan 26 16:52:01 CET 2006


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30612/scumm

Modified Files:
      Tag: branch-0-8-0
	resource.cpp script_v100he.cpp script_v7he.cpp scumm.h 
Log Message:

Resource modified status always cleared when nuked.


Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.339.2.11
retrieving revision 1.339.2.12
diff -u -d -r1.339.2.11 -r1.339.2.12
--- resource.cpp	27 Jan 2006 00:34:42 -0000	1.339.2.11
+++ resource.cpp	27 Jan 2006 00:50:55 -0000	1.339.2.12
@@ -926,6 +926,7 @@
 		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);
 	}
@@ -1001,12 +1002,6 @@
 	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;

Index: script_v100he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v100he.cpp,v
retrieving revision 2.173.2.8
retrieving revision 2.173.2.9
diff -u -d -r2.173.2.8 -r2.173.2.9
--- script_v100he.cpp	27 Jan 2006 00:34:42 -0000	2.173.2.8
+++ script_v100he.cpp	27 Jan 2006 00:50:55 -0000	2.173.2.9
@@ -1117,12 +1117,10 @@
 		}
 		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:

Index: script_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v7he.cpp,v
retrieving revision 2.166.2.9
retrieving revision 2.166.2.10
diff -u -d -r2.166.2.9 -r2.166.2.10
--- script_v7he.cpp	27 Jan 2006 00:34:42 -0000	2.166.2.9
+++ script_v7he.cpp	27 Jan 2006 00:50:55 -0000	2.166.2.10
@@ -631,7 +631,6 @@
 		break;
 	case 192:
 		resid = pop();
-		res.setUnModified(rtImage, resid);
 		res.nukeResource(rtImage, resid);
 		break;
 	case 201:

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.647.2.16
retrieving revision 1.647.2.17
diff -u -d -r1.647.2.16 -r1.647.2.17
--- scumm.h	27 Jan 2006 00:34:42 -0000	1.647.2.16
+++ scumm.h	27 Jan 2006 00:50:55 -0000	1.647.2.17
@@ -352,7 +352,6 @@
 	void unlock(int type, int i);
 
 	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);





More information about the Scummvm-git-logs mailing list