> Ok, now because I don't have really much time to spend on debugging
> (hope that will change soon), here is the full log with +ddraw debugmsg
> set on.

Could you try with the attached patch ? I really do not understand why the
game gave you negative values for the call to the BltFast method (it would
need a lot more debugging time to try to understand), but at least with this
patch Wine won't crash.

And it may even fix the game if these values only happen once :-)

                            Lionel

-- 
                 Lionel Ulmer - http://www.bbrox.org/
? END
? PATCH_DDRAW
? START
Index: dlls/ddraw/dsurface/dib.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/dsurface/dib.c,v
retrieving revision 1.17
diff -u -r1.17 dib.c
--- dlls/ddraw/dsurface/dib.c   18 Oct 2002 23:48:59 -0000      1.17
+++ dlls/ddraw/dsurface/dib.c   19 Oct 2002 08:51:40 -0000
@@ -802,14 +802,22 @@
     ddesc.dwSize = sizeof(ddesc);
     IDirectDrawSurface7_Lock(iface,NULL,&ddesc,DDLOCK_WRITEONLY,0);
 
-   if (!rsrc) {
+    if (!rsrc) {
           WARN("rsrc is NULL!\n");
           rsrc = &rsrc2;
           rsrc->left = rsrc->top = 0;
           rsrc->right = sdesc.dwWidth;
           rsrc->bottom = sdesc.dwHeight;
-   }
-
+    }
+    
+    if (((rsrc->left < 0) || (rsrc->left > sdesc.dwWidth)) ||  
+       ((rsrc->right < 0) || (rsrc->right > sdesc.dwWidth)) ||
+       ((rsrc->top < 0) || (rsrc->top > sdesc.dwHeight)) ||
+       ((rsrc->bottom < 0) || (rsrc->bottom > sdesc.dwHeight))) {
+        WARN("Negative values in blit rectangles. Unhandled for now.\n");
+       return DDERR_UNSUPPORTED;
+    }
+    
     bpp = GET_BPP(This->surface_desc);
     sbuf = (BYTE *)sdesc.lpSurface+(rsrc->top*sdesc.u1.lPitch)+rsrc->left*bpp;
     dbuf = (BYTE *)ddesc.lpSurface+(dsty*ddesc.u1.lPitch)+dstx* bpp;

Reply via email to