Changeset 5291 for trunk/src/ddraw/OS2SURFACE.CPP
- Timestamp:
- Mar 9, 2001, 11:48:48 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ddraw/OS2SURFACE.CPP
r4146 r5291 1 /* $Id: OS2SURFACE.CPP,v 1.2 7 2000-09-02 08:27:05 sandervlExp $ */1 /* $Id: OS2SURFACE.CPP,v 1.28 2001-03-09 22:48:47 mike Exp $ */ 2 2 3 3 /* … … 560 560 561 561 { 562 ULONG rc; 563 DWORD i; 564 DIVE_CAPS dCaps; 562 DWORD rc; 565 563 DDSURFACEDESC2 ComplexSurfaceDesc; 566 OS2IDirectDrawSurface *AttachedSurface;567 564 OS2IDirectDrawSurface *MipMapSurface; 568 565 … … 1402 1399 { 1403 1400 1404 int i,FillWidth, FillHeight, Top, Left;1401 int FillWidth, FillHeight, Top, Left; 1405 1402 DWORD *pPal24; 1406 1403 WORD *pPal16; … … 1666 1663 OS2IDirectDrawSurface::~OS2IDirectDrawSurface() 1667 1664 { 1668 OS2IDirectDrawSurface *AttachedSurface;1669 1670 1665 1671 1666 if(DDSurfaceDesc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) … … 1744 1739 1745 1740 lpDraw->Vtbl.Release(lpDraw); 1746 1747 } 1741 } 1742 1748 1743 //****************************************************************************** 1749 1744 //****************************************************************************** … … 2125 2120 OS2IDirectDrawSurface *src = (OS2IDirectDrawSurface *)lpDDSrcSurface; 2126 2121 2127 HRESULT rc; 2128 ULONG ulColor, *pColor; 2129 RECTL cliprect; 2130 2131 int x, y, i, j, BlitWidth, BlitHeight; 2122 int x, i, BlitWidth, BlitHeight; 2132 2123 PALETTEENTRY SysPal[257]; 2133 2124 PLOGPALETTE pLogPal = (PLOGPALETTE) SysPal; … … 2435 2426 dprintf(("DDRAW: Blitting with scaling\n Not supported.\n")); 2436 2427 2437 return DDERR_NOSTRETCHHW;2428 // return DDERR_NOSTRETCHHW; 2438 2429 } 2439 2430 … … 2678 2669 { 2679 2670 DWORD dwFx; 2680 DWORD dwSrcColor, dwDestColor;2681 2671 2682 2672 dwFlags &= ~DDBLT_DDFX; // remove the handled flag … … 3195 3185 RECTL SrcRect; 3196 3186 char *pBltPos, *pSrcPos; 3197 DWORD dwDestColor, dwSrcColor, BlitWidth, BlitHeight, x,y;3187 DWORD dwDestColor, dwSrcColor, BlitWidth, BlitHeight, x; 3198 3188 3199 3189 dprintf(("DDRAW: SurfBltFast4 %08X at(%d/%d) onto %08X with flags %08X\n",src, dwX,dwY, dest, dwTrans)); 3200 3190 3201 if( (NULL ==lpDDSrcSurface) ||3202 ( dwX<0) || (dwY<0) ||3203 (dwX >dest->width) ||3204 (dwY >dest->height))3191 if( (NULL == lpDDSrcSurface) || 3192 ((LONG)dwX < 0) || ((LONG)dwY < 0) || 3193 (dwX > dest->width) || 3194 (dwY > dest->height)) 3205 3195 { 3206 3196 dprintf(("DDRAW: Invalid Parameters %08X, %d %d", lpDDSrcSurface ,dest->width , dest->height)); … … 3208 3198 } 3209 3199 3210 if (NULL !=lpSrcRect)3200 if (NULL != lpSrcRect) 3211 3201 { 3212 3202 memcpy(&SrcRect,lpSrcRect,sizeof(RECTL) ); … … 3368 3358 { 3369 3359 case 1: 3370 if (CPUHasMMX())3371 while (BlitHeight--)3360 if (CPUHasMMX()) 3361 while (BlitHeight--) 3372 3362 { 3373 3363 BlitColorKey8MMX((PBYTE)pBltPos,(PBYTE)pSrcPos,dwSrcColor,BlitWidth); … … 3376 3366 } 3377 3367 else 3378 while (BlitHeight--)3368 while (BlitHeight--) 3379 3369 { 3380 3370 BlitColorKey8((PBYTE)pBltPos,(PBYTE)pSrcPos,dwSrcColor,BlitWidth); … … 3385 3375 case 2: 3386 3376 3387 if (CPUHasMMX())3377 if (CPUHasMMX()) 3388 3378 while(BlitHeight--) 3389 3379 { … … 3433 3423 else 3434 3424 { 3435 if (dwTrans & DDBLTFAST_DESTCOLORKEY)3425 if (dwTrans & DDBLTFAST_DESTCOLORKEY) 3436 3426 { 3437 3427 dprintf(("DDRAW: DestColorKey\n")); … … 3523 3513 // dest->Vtbl4->ChangeUniquenessValue(dest); 3524 3514 3525 return (DD_OK);3515 return DD_OK; 3526 3516 } 3527 3517 //****************************************************************************** … … 3801 3791 LPVOID Data; 3802 3792 char *pcrFB,*pcFB,*pcrDB,*pcDB; 3803 ULONG rc;3804 3793 3805 3794 dprintf(("DDRAW: SurfFlip4\n")); … … 3849 3838 } 3850 3839 3851 if (-1 != me->diveBufNr)3840 if (-1 != me->diveBufNr) 3852 3841 { 3853 3842 //dprintf(("DDRAW: DIVE Flipchain DiveBuffer #%d",FlipSurface->diveBufNr)); … … 3900 3889 me->pDiveBuffer = FlipSurface->pDiveBuffer; 3901 3890 3902 if (NULL==lpDDSurf)3903 { 3904 while (NULL!=FlipSurface->BackBuffer)3891 if (NULL==lpDDSurf) 3892 { 3893 while (NULL!=FlipSurface->BackBuffer) 3905 3894 { 3906 3895 FlipSurface->DDSurfaceDesc.lpSurface = FlipSurface->BackBuffer->DDSurfaceDesc.lpSurface; … … 3919 3908 } 3920 3909 3921 return(DD_OK); 3922 } 3910 return DD_OK; 3911 } 3912 3923 3913 //****************************************************************************** 3924 3914 //****************************************************************************** … … 4171 4161 BitmapInfo.bmiHead.biHeight = LockedSurfaceDesc.dwHeight; 4172 4162 BitmapInfo.bmiHead.biPlanes = 1; 4173 BitmapInfo.bmiHead.biBitCount = LockedSurfaceDesc.ddpfPixelFormat.dwRGBBitCount;4163 BitmapInfo.bmiHead.biBitCount = (WORD)LockedSurfaceDesc.ddpfPixelFormat.dwRGBBitCount; 4174 4164 memset(&bmihHdr, 0, sizeof(bmihHdr)); 4175 4165 bmihHdr.biSize = sizeof(BITMAPINFOHEADER); … … 4177 4167 bmihHdr.biHeight = LockedSurfaceDesc.dwHeight; 4178 4168 bmihHdr.biPlanes = 1; 4179 bmihHdr.biBitCount = LockedSurfaceDesc.ddpfPixelFormat.dwRGBBitCount;4169 bmihHdr.biBitCount = (WORD)LockedSurfaceDesc.ddpfPixelFormat.dwRGBBitCount; 4180 4170 #else 4181 4171 bmpSurface.bmType = 0; … … 4267 4257 BitmapInfo.bmiHead.biHeight = LockedSurfaceDesc.dwHeight; 4268 4258 BitmapInfo.bmiHead.biPlanes = 1; 4269 BitmapInfo.bmiHead.biBitCount = LockedSurfaceDesc.ddpfPixelFormat.dwRGBBitCount;4259 BitmapInfo.bmiHead.biBitCount = (WORD)LockedSurfaceDesc.ddpfPixelFormat.dwRGBBitCount; 4270 4260 4271 4261 switch(LockedSurfaceDesc.ddpfPixelFormat.dwRGBBitCount) … … 4504 4494 4505 4495 BOOL Found; 4506 ULONG nrScanLines;4507 char *pBuffer;4508 4496 DDRectangle *pIRectCurrent,*pIRectNew; 4509 static int times = 0;4510 4497 HRESULT rc; 4511 4498 … … 4619 4606 RGBQUAD bmiCols[256]; 4620 4607 } BitmapInfo; 4621 BITMAP bmpData; 4622 char szError[256]; 4623 int i,rc; 4608 // BITMAP bmpData; 4609 int rc; 4624 4610 4625 4611 dprintf(("DDRAW: SurfReleaseDC\n")); … … 5778 5764 DWORD dwTLineStart; // # DWORD in which the first transinfo is 5779 5765 DWORD dwTDWStart; // byte in which the firs transinfo is 5780 DWORD dwTrans; // current transparentvalue 5781 DWORD BlitWidth; 5766 5782 5767 dwTLineLen = 1 + ((pSrcDesc->dwWidth + 31) & ~31); 5783 5768 pdwTLine = (DWORD*)pAlpha + (dwTLineLen* lpSrcRect->top);
Note:
See TracChangeset
for help on using the changeset viewer.