ddraw patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



dlls/ddraw
mesa.c, gl_private.h, gl_api.h:
set_render_state: add support for D3DRENDERSTATE_LINEPATTERN


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
? patch.diff
Index: dlls/ddraw/gl_api.h
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/gl_api.h,v
retrieving revision 1.3
diff -u -r1.3 gl_api.h
--- dlls/ddraw/gl_api.h	16 Jun 2003 19:41:34 -0000	1.3
+++ dlls/ddraw/gl_api.h	24 Jul 2003 16:55:23 -0000
@@ -67,6 +67,7 @@
 GL_API_FUNCTION(glLightModelfv)
 GL_API_FUNCTION(glLightModeli)
 GL_API_FUNCTION(glLightfv)
+GL_API_FUNCTION(glLineStipple)
 GL_API_FUNCTION(glLoadIdentity)
 GL_API_FUNCTION(glLoadMatrixf)
 GL_API_FUNCTION(glMaterialf)
Index: dlls/ddraw/gl_private.h
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/gl_private.h,v
retrieving revision 1.3
diff -u -r1.3 gl_private.h
--- dlls/ddraw/gl_private.h	16 Jun 2003 19:41:34 -0000	1.3
+++ dlls/ddraw/gl_private.h	24 Jul 2003 16:55:23 -0000
@@ -92,6 +92,7 @@
 #define glLightModelfv pglLightModelfv
 #define glLightModeli pglLightModeli
 #define glLightfv pglLightfv
+#define glLineStipple pglLineStipple
 #define glLoadIdentity pglLoadIdentity
 #define glLoadMatrixf pglLoadMatrixf
 #define glMaterialf pglMaterialf
Index: dlls/ddraw/mesa.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/mesa.c,v
retrieving revision 1.54
diff -u -r1.54 mesa.c
--- dlls/ddraw/mesa.c	11 Jul 2003 03:50:43 -0000	1.54
+++ dlls/ddraw/mesa.c	24 Jul 2003 16:55:26 -0000
@@ -200,6 +200,25 @@
 		}
 	        break;
 
+	    case D3DRENDERSTATE_LINEPATTERN: {
+		D3DLINEPATTERN pattern;
+		#ifdef WORDS_BIGENDIAN
+			pattern.wRepeatFactor = *((WORD*)&pattern + 2);
+			pattern.wLinePattern = *((WORD*)&pattern);
+		#else
+			pattern.wRepeatFactor = *((WORD*)&pattern);
+			pattern.wLinePattern = *((WORD*)&pattern + 2);
+		#endif
+		if(pattern.wRepeatFactor) {
+			glEnable(GL_LINE_STIPPLE);
+			FIXME("implement wRepeatFactor parameter for glLineStipple\n");
+			glLineStipple(1, pattern.wLinePattern);
+		} else {
+			glDisable(GL_LINE_STIPPLE);
+		}
+		break;
+		}
+
 	    case D3DRENDERSTATE_ZWRITEENABLE:     /* 14 */
 	        if ((dwRenderState != FALSE) && (glThis->depth_mask == FALSE))
 		    glDepthMask(GL_TRUE);
@@ -921,16 +940,16 @@
         case CONVERT_PALETTED: {
 	    IDirectDrawPaletteImpl* pal = current_surface->palette;
 	    BYTE table[256][4];
-	    int i;
-	    int x, y;
+	    unsigned int x, y;
 	    BYTE *src = (BYTE *) (((BYTE *) src_d->lpSurface) + (bpp * rect->left) + (src_d->u1.lPitch * rect->top)), *dst;
-	    
+
 	    if (pal == NULL) {
 		/* Upload a black texture. The real one will be uploaded on palette change */
 		WARN("Palettized texture Loading with a NULL palette !\n");
 		memset(table, 0, 256 * 4);
 	    } else {
 		/* Get the surface's palette */
+		unsigned int i;
 		for (i = 0; i < 256; i++) {
 		    table[i][0] = pal->palents[i].peRed;
 		    table[i][1] = pal->palents[i].peGreen;
@@ -975,7 +994,7 @@
 	       Note2: when using color-keying + alpha, are the alpha bits part of the
 	              color-space or not ?
 	    */
-	    int x, y;
+	    unsigned int x, y;
 	    WORD *src = (WORD *) (((BYTE *) src_d->lpSurface) + (bpp * rect->left) + (src_d->u1.lPitch * rect->top)), *dst;
 	    
 	    if (*temp_buffer == NULL)
@@ -998,7 +1017,7 @@
 	
         case CONVERT_CK_5551: {
 	    /* Change the alpha value of the color-keyed pixels to emulate color-keying. */
-	    int x, y;
+	    unsigned int x, y;
 	    WORD *src = (WORD *) (((BYTE *) src_d->lpSurface) + (bpp * rect->left) + (src_d->u1.lPitch * rect->top)), *dst;
 	    
 	    if (*temp_buffer == NULL)
@@ -1021,7 +1040,7 @@
 	
         case CONVERT_CK_4444: {
 	    /* Change the alpha value of the color-keyed pixels to emulate color-keying. */
-	    int x, y;
+	    unsigned int x, y;
 	    WORD *src = (WORD *) (((BYTE *) src_d->lpSurface) + (bpp * rect->left) + (src_d->u1.lPitch * rect->top)), *dst;
 	    
 	    if (*temp_buffer == NULL)
@@ -1044,7 +1063,7 @@
 	
         case CONVERT_CK_4444_ARGB: {
 	    /* Move the four Alpha bits... */
-	    int x, y;
+	    unsigned int x, y;
 	    WORD *src = (WORD *) (((BYTE *) src_d->lpSurface) + (bpp * rect->left) + (src_d->u1.lPitch * rect->top)), *dst;
 	    
 	    if (*temp_buffer == NULL)
@@ -1066,7 +1085,7 @@
 	} break;
 	
         case CONVERT_CK_1555: {
-	    int x, y;
+	    unsigned int x, y;
 	    WORD *src = (WORD *) (((BYTE *) src_d->lpSurface) + (bpp * rect->left) + (src_d->u1.lPitch * rect->top)), *dst;
 	    
 	    if (*temp_buffer == NULL)
@@ -1089,7 +1108,7 @@
 	
         case CONVERT_555: {
 	    /* Converting the 0555 format in 5551 packed */
-	    int x, y;
+	    unsigned int x, y;
 	    WORD *src = (WORD *) (((BYTE *) src_d->lpSurface) + (bpp * rect->left) + (src_d->u1.lPitch * rect->top)), *dst;
 	    
 	    if (*temp_buffer == NULL)
@@ -1123,7 +1142,7 @@
 	
         case CONVERT_CK_RGB24: {
 	    /* This is a pain :-) */
-	    int x, y;
+	    unsigned int x, y;
 	    BYTE *src = (BYTE *) (((BYTE *) src_d->lpSurface) + (bpp * rect->left) + (src_d->u1.lPitch * rect->top));
 	    DWORD *dst;
 	    
@@ -1148,7 +1167,7 @@
 
         case CONVERT_CK_8888: {
 	    /* Just use the alpha component to handle color-keying... */
-	    int x, y;
+	    unsigned int x, y;
 	    DWORD *src = (DWORD *) (((BYTE *) src_d->lpSurface) + (bpp * rect->left) + (src_d->u1.lPitch * rect->top)), *dst;
 	    
 	    if (*temp_buffer == NULL)
@@ -1170,7 +1189,7 @@
 	} break;
 	
         case CONVERT_CK_8888_ARGB: {
-	    int x, y;
+	    unsigned int x, y;
 	    DWORD *src = (DWORD *) (((BYTE *) src_d->lpSurface) + (bpp * rect->left) + (src_d->u1.lPitch * rect->top)), *dst;
 	    
 	    if (*temp_buffer == NULL)
@@ -1193,7 +1212,7 @@
 	
         case CONVERT_RGB32_888: {
 	    /* Just add an alpha component and handle color-keying... */
-	    int x, y;
+	    unsigned int x, y;
 	    DWORD *src = (DWORD *) (((BYTE *) src_d->lpSurface) + (bpp * rect->left) + (src_d->u1.lPitch * rect->top)), *dst;
 	    
 	    if (*temp_buffer == NULL)

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux