[Scummvm-cvs-logs] CVS: scummvm/sword2 build_display.h,1.17,1.18

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Wed Apr 20 07:45:46 CEST 2005


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

Modified Files:
	build_display.h 
Log Message:
Replaced drawLine() with a shorter version described in Wikipedia. It uses 
a callback to plot each point so that it doesn't need to worry about how
the caller deals with screen dirtying, etc.

My plan is to move this function into a standard class. (That's why I used
the American spelling "color" instead of "colour".) I just haven't made up
my mind on which is the most appropriate one yet.


Index: build_display.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/build_display.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- build_display.h	11 Mar 2005 15:30:27 -0000	1.17
+++ build_display.h	20 Apr 2005 14:45:23 -0000	1.18
@@ -415,8 +415,9 @@
 
 	void buildDisplay();
 
-	void plotPoint(int16 x, int16 y, uint8 colour);
-	void drawLine(int16 x1, int16 y1, int16 x2, int16 y2, uint8 colour);
+	void plotPoint(int x, int y, uint8 colour);
+	void drawLine(int x0, int y0, int x1, int y1, uint8 colour);
+	void drawLine(int x0, int y0, int x1, int y1, int color, void (*plotProc)(int, int, int, void *), void *data);
 
 #ifdef BACKEND_8BIT
 	void plotYUV(byte *lut, int width, int height, byte *const *dat);





More information about the Scummvm-git-logs mailing list