[Scummvm-cvs-logs] CVS: scummvm/scumm cursor.cpp,2.23,2.24 intern.h,2.324,2.325 saveload.cpp,1.189,1.190 saveload.h,1.47,1.48 scumm.h,1.524,1.525

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Thu Jan 6 07:58:09 CET 2005


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

Modified Files:
	cursor.cpp intern.h saveload.cpp saveload.h scumm.h 
Log Message:
Fixed bug #1093845 after discussing with Fingolfin.


Index: cursor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/cursor.cpp,v
retrieving revision 2.23
retrieving revision 2.24
diff -u -d -r2.23 -r2.24
--- cursor.cpp	1 Jan 2005 16:09:13 -0000	2.23
+++ cursor.cpp	6 Jan 2005 15:57:12 -0000	2.24
@@ -26,6 +26,7 @@
 #include "scumm/intern.h"
 #include "scumm/object.h"
 #include "scumm/resource_v7he.h"
+#include "scumm/saveload.h"
 #include "scumm/scumm.h"
 
 
@@ -395,4 +396,14 @@
 	updateCursor();
 }
 
+void ScummEngine_v5::saveOrLoadCursorImages(Serializer *s) {
+	const SaveLoadEntry cursorEntries[] = {
+		MKARRAY2(ScummEngine_v5, _cursorImages[0][0], sleUint16, 16, 4, (byte*)_cursorImages[1] - (byte*)_cursorImages[0], VER(44)),
+		MKARRAY(ScummEngine_v5, _cursorHotspots[0], sleByte, 8, VER(44)),
+		MKEND()
+	};
+
+	s->saveLoadEntries(this, cursorEntries);
+}
+
 } // End of namespace Scumm

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.324
retrieving revision 2.325
diff -u -d -r2.324 -r2.325
--- intern.h	1 Jan 2005 16:09:14 -0000	2.324
+++ intern.h	6 Jan 2005 15:57:12 -0000	2.325
@@ -76,6 +76,7 @@
 	void setBuiltinCursor(int index);
 	void redefineBuiltinCursorFromChar(int index, int chr);
 	void redefineBuiltinCursorHotspot(int index, int x, int y);
+	void saveOrLoadCursorImages(Serializer *s);
 
 	/* Version 5 script opcodes */
 	void o5_actorFollowCamera();

Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -d -r1.189 -r1.190
--- saveload.cpp	1 Jan 2005 16:09:15 -0000	1.189
+++ saveload.cpp	6 Jan 2005 15:57:12 -0000	1.190
@@ -877,6 +877,9 @@
 		_imuseDigital->saveOrLoad(s);
 	}
 
+	// This is probably only needed for Loom.
+	saveOrLoadCursorImages(s);
+
 	if (s->isLoading())
 		setupVolumes();
 }

Index: saveload.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- saveload.h	1 Jan 2005 16:09:15 -0000	1.47
+++ saveload.h	6 Jan 2005 15:57:12 -0000	1.48
@@ -32,11 +32,11 @@
 // Can be useful for other ports too :)
 
 #define VER(x) x
-#define CURRENT_VER 43
+#define CURRENT_VER 44
 
 // To work around a warning in GCC 3.2 (and 3.1 ?) regarding non-POD types,
 // we use a small trick: instead of 0 we use 42. Why? Well, it seems newer GCC
-// versions hae a heuristic built in to detect "offset-of" patterns - which is exactly
+// versions have a heuristic built in to detect "offset-of" patterns - which is exactly
 // what our OFFS macro does. Now, for non-POD types this is not really legal, because
 // member need not be at a fixed offset relative to the variable, even if they are in
 // current reality (many of our complex structs are non-POD; for an explanation of 

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.524
retrieving revision 1.525
diff -u -d -r1.524 -r1.525
--- scumm.h	1 Jan 2005 16:09:16 -0000	1.524
+++ scumm.h	6 Jan 2005 15:57:12 -0000	1.525
@@ -386,6 +386,7 @@
 	void updateCursor();
 	virtual void animateCursor() {}
 	void updatePalette();
+	virtual void saveOrLoadCursorImages(Serializer *s) {}
 
 	/**
 	 * Flag which signals that the SMUSH video playback should end now





More information about the Scummvm-git-logs mailing list