Changeset 21483 for trunk/src/ddraw/surfblit.cpp
- Timestamp:
- Nov 29, 2010, 2:07:07 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ddraw/surfblit.cpp
r21479 r21483 25 25 #include <fourcc.h> 26 26 27 #define CINTERFACE 27 #ifndef CINTERFACE 28 #define CINTERFACE 1 29 #endif 28 30 #include "ddraw2d.h" 29 31 #include "clipper.h" … … 196 198 197 199 //src == NULL for colorfill 198 if(src) 200 if(src) 199 201 { 200 202 if (NULL!=lpSrcRect) … … 259 261 SrcRect.right = src->width; 260 262 } 261 263 262 264 if(src->fLocked) 263 265 { … … 299 301 if(dest->diveBufNr == DIVE_BUFFER_SCREEN && 300 302 !(dwFlags & (DDBLT_COLORFILL|DDBLT_DEPTHFILL|DDBLT_ROP) ) && 301 dest->DDSurfaceDesc.ddpfPixelFormat.dwRGBBitCount > 8 && 303 dest->DDSurfaceDesc.ddpfPixelFormat.dwRGBBitCount > 8 && 302 304 src->DDSurfaceDesc.ddpfPixelFormat.dwRGBBitCount > 8) 303 305 { … … 311 313 if( (src->DDSurfaceDesc.dwHeight == srcheight && 312 314 src->DDSurfaceDesc.dwWidth == srcwidth) || 313 (srcwidth != destwidth && srcheight != destheight) ) 315 (srcwidth != destwidth && srcheight != destheight) ) 314 316 { 315 317 SETUP_BLITTER sBlt = {0}; … … 333 335 sBlt.pVisDstRects = NULL; 334 336 335 if(dest->lpClipper && dest->lpClipper->IsClipListChangedInt()) 337 if(dest->lpClipper && dest->lpClipper->IsClipListChangedInt()) 336 338 { 337 339 DWORD rgnsize; 338 if(ClipGetClipList((IDirectDrawClipper*)dest->lpClipper, NULL, NULL, &rgnsize) == DD_OK) 340 if(ClipGetClipList((IDirectDrawClipper*)dest->lpClipper, NULL, NULL, &rgnsize) == DD_OK) 339 341 { 340 342 LPRGNDATA lpRgnData = (LPRGNDATA)alloca(rgnsize); … … 343 345 goto dodiveblit; 344 346 } 345 if(ClipGetClipList((IDirectDrawClipper*)dest->lpClipper, NULL, lpRgnData, &rgnsize) == DD_OK) 347 if(ClipGetClipList((IDirectDrawClipper*)dest->lpClipper, NULL, lpRgnData, &rgnsize) == DD_OK) 346 348 { 347 349 OS2RECTL *pRectl = (OS2RECTL *)&lpRgnData->Buffer; … … 352 354 } 353 355 dprintf(("visible region")); 354 for(i=0;i<lpRgnData->rdh.nCount;i++) 356 for(i=0;i<lpRgnData->rdh.nCount;i++) 355 357 { 356 358 //win32 -> os2 coordinates (region data in screen coordinates) … … 413 415 //TODO: do we need to check the source for clipping information in case 414 416 // the app wants to copy from the frame buffer? 415 if(dest->lpClipper) 417 if(dest->lpClipper) 416 418 { 417 419 DWORD rgnsize; 418 if(ClipGetClipList((IDirectDrawClipper*)dest->lpClipper, NULL, NULL, &rgnsize) == DD_OK) 420 if(ClipGetClipList((IDirectDrawClipper*)dest->lpClipper, NULL, NULL, &rgnsize) == DD_OK) 419 421 { 420 422 LPRGNDATA lpRgnData = (LPRGNDATA)alloca(rgnsize); … … 423 425 goto doblit; 424 426 } 425 if(ClipGetClipList((IDirectDrawClipper*)dest->lpClipper, NULL, lpRgnData, &rgnsize) == DD_OK) 427 if(ClipGetClipList((IDirectDrawClipper*)dest->lpClipper, NULL, lpRgnData, &rgnsize) == DD_OK) 426 428 { 427 429 RECT newdest, newsrc; … … 431 433 QueryPerformanceCounter(&liStart); 432 434 #endif 433 for(i=0;i<lpRgnData->rdh.nCount;i++) 435 for(i=0;i<lpRgnData->rdh.nCount;i++) 434 436 { 435 437 dprintf(("Clip list %d (%d,%d)(%d,%d)", i, lpClipRect[i].left, lpClipRect[i].bottom, lpClipRect[i].right, lpClipRect[i].top)); 436 438 437 if(IntersectRect(&newdest, &DestRect, &lpClipRect[i]) == TRUE) 439 if(IntersectRect(&newdest, &DestRect, &lpClipRect[i]) == TRUE) 438 440 { 439 441 //TODO: This is not correct for stretching blits … … 446 448 // DDSURFACEDESC2 surfdesc = {0}; 447 449 // SurfLock4(dest, &newdest, &surfdesc, 0, 0); 448 450 449 451 ret = SurfDoBlt(This, &newdest, lpDDSrcSurface, (lpSrcRect) ? &newsrc : NULL, dwFlags, lpDDBltFx); 450 452 if(ret != DD_OK) {
Note:
See TracChangeset
for help on using the changeset viewer.