[Scummvm-cvs-logs] CVS: scummvm/scumm cursor.cpp,2.5,2.6 scumm.h,1.408,1.409

Eugene Sandulenko sev at users.sourceforge.net
Thu Jun 24 13:11:35 CEST 2004


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

Modified Files:
	cursor.cpp scumm.h 
Log Message:
Add grabCursorFromBuffer() function.


Index: cursor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/cursor.cpp,v
retrieving revision 2.5
retrieving revision 2.6
diff -u -d -r2.5 -r2.6
--- cursor.cpp	24 Jun 2004 12:32:19 -0000	2.5
+++ cursor.cpp	24 Jun 2004 20:09:36 -0000	2.6
@@ -306,4 +306,21 @@
 	updateCursor();
 }
 
+void ScummEngine::grabCursorFromBuffer(byte *ptr, int width, int height) {
+	uint size;
+	byte *dst;
+
+	size = width * height;
+	if (size > sizeof(_grabbedCursor))
+		error("grabCursor: grabbed cursor too big");
+
+	_cursor.width = width;
+	_cursor.height = height;
+	_cursor.animate = 0;
+
+	memcpy(_grabbedCursor, ptr, width * height);
+
+	updateCursor();
+}
+
 } // End of namespace Scumm

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.408
retrieving revision 1.409
diff -u -d -r1.408 -r1.409
--- scumm.h	24 Jun 2004 02:36:17 -0000	1.408
+++ scumm.h	24 Jun 2004 20:09:36 -0000	1.409
@@ -315,6 +315,7 @@
 	friend class SmushPlayer;
 	friend class Insane;
 	friend class CharsetRenderer;
+	friend class Win32ResExtractor;
 	
 	void errorString(const char *buf_input, char *buf_output);
 public:
@@ -925,6 +926,7 @@
 	void setCursorHotspot(int x, int y);
 	void grabCursor(int x, int y, int w, int h);
 	void grabCursor(byte *ptr, int width, int height);
+	void grabCursorFromBuffer(byte *ptr, int width, int height);
 	void makeCursorColorTransparent(int a);
 	void setupCursor();
 	void decompressDefaultCursor(int index);





More information about the Scummvm-git-logs mailing list