[dx30] MayPayne fix :-)

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

 



FYI With this fix MayPayne is starting to be playable. Looks fine as
long as you dont change weapon (Fancy doing it all with the pistol?).
You have to wait with a black screen during some of the movie sections
though. Someone really is going to have to start looking at the Quartz
stuff again sometime. (Can anyone produce stubs of ALL the com objects
it supplies automatically?)

Changelog

Supply the correct box on the screen to be processed during the clear
call, using opengl coordinates, not directx coordinates.

Jason
--- dlls/d3d8/device.dx29	2003-05-15 18:07:32.000000000 +0100
+++ dlls/d3d8/device.c	2003-05-15 18:34:58.000000000 +0100
@@ -2088,23 +2088,25 @@
             /* Note gl uses lower left, width/height */
             TRACE("(%p) %p Rect=(%ld,%ld)->(%ld,%ld) glRect=(%ld,%ld), len=%ld, hei=%ld\n", This, curRect,
                   curRect->x1, curRect->y1, curRect->x2, curRect->y2,
-                  curRect->x1, curRect->y2, curRect->x2 - curRect->x1, curRect->y2 - curRect->y1);
-            glScissor(curRect->x1, curRect->y2, curRect->x2 - curRect->x1, curRect->y2 - curRect->y1);
+                  curRect->x1, (This->PresentParms.BackBufferHeight - curRect->y2), 
+                  curRect->x2 - curRect->x1, curRect->y2 - curRect->y1);
+            glScissor(curRect->x1, (This->PresentParms.BackBufferHeight - curRect->y2), 
+                      curRect->x2 - curRect->x1, curRect->y2 - curRect->y1);
             checkGLcall("glScissor");
         }
 
         /* Clear the whole screen */
         if (Flags & D3DCLEAR_STENCIL) {	
-	    glGetIntegerv(GL_STENCIL_CLEAR_VALUE, &old_stencil_clear_value);
+            glGetIntegerv(GL_STENCIL_CLEAR_VALUE, &old_stencil_clear_value);
             glClearStencil(Stencil);
             checkGLcall("glClearStencil");
             glMask = glMask | GL_STENCIL_BUFFER_BIT;
         }
 
         if (Flags & D3DCLEAR_ZBUFFER) {
-	    glGetBooleanv(GL_DEPTH_WRITEMASK, &old_ztest);
-	    glDepthMask(GL_TRUE); 
-	    glGetFloatv(GL_DEPTH_CLEAR_VALUE, &old_z_clear_value);
+            glGetBooleanv(GL_DEPTH_WRITEMASK, &old_ztest);
+            glDepthMask(GL_TRUE); 
+            glGetFloatv(GL_DEPTH_CLEAR_VALUE, &old_z_clear_value);
             glClearDepth(Z);
             checkGLcall("glClearDepth");
             glMask = glMask | GL_DEPTH_BUFFER_BIT;
@@ -2112,7 +2114,7 @@
 
         if (Flags & D3DCLEAR_TARGET) {
             TRACE("Clearing screen with glClear to color %lx\n", Color);
-	    glGetFloatv(GL_COLOR_CLEAR_VALUE, old_color_clear_value);
+            glGetFloatv(GL_COLOR_CLEAR_VALUE, old_color_clear_value);
             glClearColor(((Color >> 16) & 0xFF) / 255.0, 
 			 ((Color >>  8) & 0xFF) / 255.0,
                          ((Color >>  0) & 0xFF) / 255.0, 
@@ -2124,19 +2126,19 @@
         glClear(glMask);
         checkGLcall("glClear");
 
-	if (Flags & D3DCLEAR_STENCIL) {
-	  glClearStencil(old_stencil_clear_value);
-	}    
-	if (Flags & D3DCLEAR_ZBUFFER) {
-	  glDepthMask(old_ztest);
-	  glClearDepth(old_z_clear_value);
-	}
-	if (Flags & D3DCLEAR_TARGET) {
-	  glClearColor(old_color_clear_value[0], 
-		       old_color_clear_value[1],
-		       old_color_clear_value[2], 
-		       old_color_clear_value[3]);
-	}
+        if (Flags & D3DCLEAR_STENCIL) {
+            glClearStencil(old_stencil_clear_value);
+        }    
+        if (Flags & D3DCLEAR_ZBUFFER) {
+            glDepthMask(old_ztest);
+            glClearDepth(old_z_clear_value);
+        }
+        if (Flags & D3DCLEAR_TARGET) {
+            glClearColor(old_color_clear_value[0], 
+                         old_color_clear_value[1],
+                         old_color_clear_value[2], 
+                         old_color_clear_value[3]);
+        }
 
         if (curRect) curRect = curRect + sizeof(D3DRECT);
     }

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

  Powered by Linux