- Timestamp:
- Aug 4, 1999, 11:25:26 PM (26 years ago)
- Location:
- trunk/src/ddraw
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ddraw/OS2DDRAW.CPP
r352 r416 355 355 if(rc != DD_OK) 356 356 { 357 WriteLog("Error createing Surface ");357 WriteLog("Error createing Surface\n\n"); 358 358 *lplpDD = NULL; 359 359 delete newsurf; … … 362 362 *lplpDD = (IDirectDrawSurface *)newsurf; 363 363 364 WriteLog("New Surface created at %08X\n\n", newsurf); 364 365 return(rc); 365 366 } … … 395 396 if(rc != DD_OK) 396 397 { 397 WriteLog("Error createing Surface ");398 WriteLog("Error createing Surface\n\n"); 398 399 *lplpDD = NULL; 399 400 delete newsurf; … … 401 402 else 402 403 *lplpDD = (IDirectDrawSurface4 *)newsurf; 404 405 WriteLog("New Surface created at %08X\n\n", newsurf); 403 406 404 407 return(rc); … … 1190 1193 DWORD dwFlags) 1191 1194 { 1195 ULONG rc; 1192 1196 OS2IDirectDraw *me = (OS2IDirectDraw *)This; 1193 1197 … … 1198 1202 me->screenheight = dwHeight; 1199 1203 me->screenbpp = dwBPP; 1204 if(me->screenbpp!=me->dCaps.ulDepth) 1205 { 1206 rc = DiveOpen( &me->hDiveColorConv, 1207 FALSE, 1208 0); 1209 WriteLog("Screen in different mode than requested, open addional DIVE instance(rc=%X)\n\n",rc); 1210 1211 } 1200 1212 // _interrupt(3); 1201 1213 return(DD_OK); … … 1206 1218 DWORD dwBPP) 1207 1219 { 1220 ULONG rc; 1208 1221 OS2IDirectDraw *me = (OS2IDirectDraw *)This; 1209 1222 … … 1214 1227 me->screenheight = dwHeight; 1215 1228 me->screenbpp = dwBPP; 1229 if(me->screenbpp!=me->dCaps.ulDepth) 1230 { 1231 rc = DiveOpen( &me->hDiveColorConv, 1232 FALSE, 1233 0); 1234 WriteLog("Screen in different mode than requested, open addional DIVE instance(rc=%X)\n\n",rc); 1235 1236 } 1216 1237 // _interrupt(3); 1217 1238 return(DD_OK); -
trunk/src/ddraw/OS2SURFACE.CPP
r405 r416 296 296 297 297 hDive = lpDirectDraw->GetDiveInstance(); 298 hDiveCC = lpDirectDraw->GetCCDiveInstance(); 298 299 surfaceType = DDSCAPS_OFFSCREENPLAIN; 299 300 memcpy((char *)&DDSurfaceDesc, (char *)lpDDSurfaceDesc, sizeof(DDSURFACEDESC2)); … … 1076 1077 SETUP_BLITTER sBlt; 1077 1078 ULONG ulDN1, ulDN2; 1078 1079 ULONG rc; 1079 1080 ulDN1 = ulDN2 = 0; 1080 1081 … … 1103 1104 sBlt.ulNumDstRects = DIVE_FULLY_VISIBLE; 1104 1105 1105 DiveAllocImageBuffer( hDiveCC, 1106 &ulDN1, 1107 sBlt.fccSrcColorFormat, 1108 width, 1109 height, 1110 dwPitchFB, 1111 (PBYTE)pFrameBuffer); 1112 DiveAllocImageBuffer( hDiveCC, 1113 &ulDN2, 1114 sBlt.fccDstColorFormat, 1115 width, 1116 height, 1117 dwPitchDB, 1118 (PBYTE)pDiveBuffer); 1119 DiveSetupBlitter(hDiveCC,&sBlt); 1120 DiveBlitImage(hDiveCC,ulDN1,ulDN2); 1121 DiveFreeImageBuffer(hDiveCC,ulDN1); 1122 DiveFreeImageBuffer(hDiveCC,ulDN2); 1106 rc = DiveAllocImageBuffer( hDiveCC, 1107 &ulDN1, 1108 sBlt.fccSrcColorFormat, 1109 width, 1110 height, 1111 dwPitchFB, 1112 (PBYTE)pFrameBuffer); 1113 WriteLog("AllocDiveSrc Buffer rc= %X\n",rc); 1114 1115 rc = DiveAllocImageBuffer( hDiveCC, 1116 &ulDN2, 1117 sBlt.fccDstColorFormat, 1118 width, 1119 height, 1120 dwPitchDB, 1121 (PBYTE)pDiveBuffer); 1122 WriteLog("AllocDiveDst Buffer rc= %Xd\n",rc); 1123 1124 rc = DiveSetupBlitter( hDiveCC, 1125 &sBlt); 1126 WriteLog("SetupBlitter rc= %X\n",rc); 1127 1128 rc = DiveBlitImage( hDiveCC, 1129 ulDN1, 1130 ulDN2); 1131 1132 WriteLog("Blit rc= %X\n",rc); 1133 1134 rc = DiveFreeImageBuffer( hDiveCC, 1135 ulDN1); 1136 WriteLog("Free Src rc= %X\n",rc); 1137 1138 rc = DiveFreeImageBuffer( hDiveCC, 1139 ulDN2); 1140 1141 WriteLog("Free dst rc= %X\n",rc); 1142 1123 1143 } 1124 1144 //****************************************************************************** … … 1582 1602 #ifdef DEBUG 1583 1603 if ( (NULL!=lpDestRect)&& (NULL!=lpSrcRect)) 1584 WriteLog("SurfBlt4 to (%d,%d)(%d,%d) from (%d,%d)(%d,%d)\n", lpDestRect->left, lpDestRect->top, 1585 lpDestRect->right, lpDestRect->bottom, lpSrcRect->left, lpSrcRect->top, 1586 lpSrcRect->right, lpSrcRect->bottom); 1604 WriteLog("SurfBlt4 to (%d,%d)(%d,%d) at %08X from (%d,%d)(%d,%d) at %08X\n", lpDestRect->left, lpDestRect->top, 1605 lpDestRect->right, lpDestRect->bottom, dest, lpSrcRect->left, lpSrcRect->top, 1606 lpSrcRect->right, lpSrcRect->bottom, src); 1607 1608 _dump_DDBLT(dwFlags); 1587 1609 #endif 1588 1610 … … 1647 1669 if(dwFlags & DDBLT_COLORFILL) 1648 1670 { 1671 WriteLog("ColorFill\n"); 1649 1672 if((NULL==lpDDBltFx)||(lpDDBltFx->dwSize!=sizeof(DDBLTFX)) ) 1650 1673 return DDERR_INVALIDPARAMS; … … 1660 1683 if (dwFlags & DDBLT_DEPTHFILL) 1661 1684 { 1685 WriteLog("DepthFill\n"); 1662 1686 #ifdef USE_OPENGL 1663 1687 GLboolean ztest; … … 1788 1812 { 1789 1813 // Stretching not supported 1814 WriteLog("No stretched blits\n"); 1815 1790 1816 return DDERR_NOSTRETCHHW; 1791 1817 } … … 1793 1819 if (dest->DDSurfaceDesc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) 1794 1820 { 1821 WriteLog("Dest is Primary Surface\n"); 1795 1822 if(src->DDSurfaceDesc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) 1796 1823 { 1797 1824 // special Type 1 : Bliting between parts of the screen 1825 1826 WriteLog("Src is Primary Surface\n"); 1798 1827 1799 1828 if( *pIRectDest == *pIRectSrc) … … 2414 2443 char *pBltPos, *pSrcPos; 2415 2444 DWORD dwDestColor, dwSrcColor, BlitWidth, BlitHeight,x,y; 2416 #ifdef DEBUG 2417 WriteLog("SurfBltFast (%d, %d)\n",dwX,dwY); 2445 2446 #ifdef DEBUG 2447 WriteLog("SurfBltFast4 %08X at(%d/%d) onto %08X with flags %08X\n",src, dwX,dwY, dest, dwTrans); 2418 2448 #endif 2419 2449 … … 2422 2452 (dwX>dest->width) || 2423 2453 (dwY>dest->height)) 2454 { 2455 WriteLog("Invalid Parameters %08X, %d %d", lpDDSrcSurface ,dest->width , dest->height); 2424 2456 return DDERR_INVALIDPARAMS; 2457 } 2425 2458 2426 2459 if (NULL!=lpSrcRect) … … 2449 2482 if(dwTrans & DDBLTFAST_NOCOLORKEY) 2450 2483 { 2484 WriteLog("Solid Blit"); 2451 2485 #ifdef USE_ASM 2452 BltRec(pBltPos, pSrcPos, BlitWidth, BlitHeight,2453 dest->dwPitchDB,2454 src->dwPitchDB);2486 BltRec(pBltPos, pSrcPos, BlitWidth, BlitHeight, 2487 dest->dwPitchDB, 2488 src->dwPitchDB); 2455 2489 #else 2456 // Solid Blit2457 while(1)2458 {2459 memcpy(pBltPos,pSrcPos,BlitWidth);2460 pBltPos += dest->dwPitchDB;2461 pSrcPos += src->dwPitchDB;2462 if(! (--BlitHeight))2463 break;2464 }2490 // Solid Blit 2491 while(1) 2492 { 2493 memcpy(pBltPos,pSrcPos,BlitWidth); 2494 pBltPos += dest->dwPitchDB; 2495 pSrcPos += src->dwPitchDB; 2496 if(! (--BlitHeight)) 2497 break; 2498 } 2465 2499 #endif 2466 2500 … … 2468 2502 else 2469 2503 { 2504 WriteLog("TransBlit"); 2505 2470 2506 if(dwTrans & DDBLTFAST_SRCCOLORKEY) 2471 2507 { … … 3627 3663 3628 3664 #ifdef DEBUG 3629 WriteLog("SurfLock4 % d%08X %d %d\n", (int)lpRect, (int)lpSurfaceDesc, dwFlags, hEvent);3665 WriteLog("SurfLock4 %08X %08X %d %d\n", (int)lpRect, (int)lpSurfaceDesc, dwFlags, hEvent); 3630 3666 #endif 3631 3667 … … 3652 3688 { 3653 3689 // If anything is locked we can't locke the complete surface 3654 WriteLog("Surface has locked Rectangles, and we want to complete lock it ");3690 WriteLog("Surface has locked Rectangles, and we want to complete lock it\n"); 3655 3691 Found = TRUE; 3656 3692 } … … 3660 3696 // be locked so check for this 3661 3697 3662 WriteLog("Surface has locked Rectangles, check if the overlap ");3698 WriteLog("Surface has locked Rectangles, check if the overlap\n"); 3663 3699 3664 3700 i=0; … … 3683 3719 delete pIRectNew; 3684 3720 #ifdef DEBUG 3685 WriteLog("SurfLock4: Surface already locked\n ");3721 WriteLog("SurfLock4: Surface already locked\n\n"); 3686 3722 #endif 3687 3723 return(DDERR_SURFACEBUSY); … … 3697 3733 (lpRect->left * (lpSurfaceDesc->ddpfPixelFormat.dwRGBBitCount>>3))); 3698 3734 #ifdef DEBUG 3699 WriteLog("SurfLock4 %08X (x,y) = (%d,%d)\n ", lpSurfaceDesc->lpSurface, lpRect->top, lpRect->left);3735 WriteLog("SurfLock4 %08X (x,y) = (%d,%d)\n\n", lpSurfaceDesc->lpSurface, lpRect->top, lpRect->left); 3700 3736 #endif 3701 3737 } … … 3703 3739 { 3704 3740 #ifdef DEBUG 3705 WriteLog("SurfLock4 %08X \n ", lpSurfaceDesc->lpSurface);3741 WriteLog("SurfLock4 %08X \n\n", lpSurfaceDesc->lpSurface); 3706 3742 #endif 3707 3743 }
Note:
See TracChangeset
for help on using the changeset viewer.