Changeset 7084 for trunk/src/ddraw/OS2SURFACE.CPP
- Timestamp:
- Oct 17, 2001, 10:08:52 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ddraw/OS2SURFACE.CPP
r6982 r7084 1 /* $Id: OS2SURFACE.CPP,v 1.3 7 2001-10-10 14:40:45sandervl Exp $ */1 /* $Id: OS2SURFACE.CPP,v 1.38 2001-10-17 08:08:52 sandervl Exp $ */ 2 2 3 3 /* … … 2301 2301 delete pIRectDest; 2302 2302 2303 if (NULL!=lpSrcRect) 2304 { 2303 //src == NULL for colorfill 2304 if(src) 2305 { 2306 if (NULL!=lpSrcRect) 2307 { 2305 2308 #ifdef RA_HACK 2306 2309 // Same as for dest rectangle now for src … … 2353 2356 memcpy(&SrcRect,lpSrcRect,sizeof(RECT) ); 2354 2357 #endif 2355 }2356 else2357 {2358 } 2359 else 2360 { 2358 2361 pIRectSrc = new DDRectangle( 0, 0, src->width, src->height); 2359 2362 SrcRect.top = 0; … … 2361 2364 SrcRect.bottom = src->height; 2362 2365 SrcRect.right = src->width; 2363 }2364 2365 if(src->fLocked)2366 {2366 } 2367 2368 if(src->fLocked) 2369 { 2367 2370 if (NULL==lpSrcRect) 2368 2371 { … … 2395 2398 return(DDERR_SURFACEBUSY); 2396 2399 } 2397 } 2398 delete pIRectSrc; 2400 } 2401 delete pIRectSrc; 2402 } //if(src) 2399 2403 2400 2404 if(dest->diveBufNr == DIVE_BUFFER_SCREEN && … … 2530 2534 { 2531 2535 //TODO: This is not correct for stretching blits 2532 newsrc.left = SrcRect.left + (newdest.left - DestRect.left); 2533 newsrc.top = SrcRect.top + (newdest.top - DestRect.top); 2534 newsrc.right = newsrc.left + RECT_WIDTH(&newdest); 2535 newsrc.bottom = newsrc.top + RECT_HEIGHT(&newdest); 2536 2536 if(lpSrcRect) { 2537 newsrc.left = SrcRect.left + (newdest.left - DestRect.left); 2538 newsrc.top = SrcRect.top + (newdest.top - DestRect.top); 2539 newsrc.right = newsrc.left + RECT_WIDTH(&newdest); 2540 newsrc.bottom = newsrc.top + RECT_HEIGHT(&newdest); 2541 } 2537 2542 // DDSURFACEDESC2 surfdesc = {0}; 2538 2543 // SurfLock4(dest, &newdest, &surfdesc, 0, 0); 2539 2540 ret = SurfDoBlt(This, &newdest, lpDDSrcSurface, &newsrc, dwFlags, lpDDBltFx);2544 2545 ret = SurfDoBlt(This, &newdest, lpDDSrcSurface, (lpSrcRect) ? &newsrc : NULL, dwFlags, lpDDBltFx); 2541 2546 if(ret != DD_OK) { 2542 2547 break; … … 2560 2565 } 2561 2566 doblit: 2562 return SurfDoBlt(This, &DestRect, lpDDSrcSurface, &SrcRect, dwFlags, lpDDBltFx);2567 return SurfDoBlt(This, &DestRect, lpDDSrcSurface, (lpSrcRect) ? &SrcRect : NULL, dwFlags, lpDDBltFx); 2563 2568 } 2564 2569 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.