- Timestamp:
- Oct 25, 1999, 1:17:30 AM (26 years ago)
- Location:
- trunk/src/ddraw
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ddraw/OS2DDRAW.CPP
r913 r1434 446 446 if(newsurf == NULL) 447 447 { 448 rc = DDERR_OUTOFMEMORY;448 rc = DDERR_OUTOFMEMORY; 449 449 } 450 450 else -
trunk/src/ddraw/OS2PALETTE.CPP
r850 r1434 225 225 { 226 226 if(NULL!=((OS2IDirectDraw*)me->lpDraw)->pPrimSurf) 227 ((OS2IDirectDrawSurface*)((OS2IDirectDraw*)me->lpDraw)->pPrimSurf)->ColorConversion(NULL); ;227 ((OS2IDirectDrawSurface*)((OS2IDirectDraw*)me->lpDraw)->pPrimSurf)->ColorConversion(NULL); 228 228 } 229 229 return(DD_OK); -
trunk/src/ddraw/OS2SURFACE.CPP
r913 r1434 532 532 533 533 lpVtbl = &Vtbl; 534 lpVtbl2 = &Vtbl; 535 dwUnknownData = 0xDEADDEAD; 534 536 Vtbl.AddRef = SurfAddRef; 535 537 Vtbl.Release = SurfRelease; … … 818 820 819 821 BackBuffer = new OS2IDirectDrawSurface(lpDraw, &ComplexSurfaceDesc, TRUE, TRUE); 822 BackBuffer->Vtbl.AddRef((IDirectDrawSurface *)BackBuffer); 820 823 821 824 if (BackBuffer->GetLastError()==DD_OK) … … 1140 1143 1141 1144 BackBuffer = new OS2IDirectDrawSurface(lpDraw, &ComplexSurfaceDesc, TRUE, Mainchain); 1145 BackBuffer->Vtbl.AddRef((IDirectDrawSurface *)BackBuffer); 1146 1142 1147 if (BackBuffer->GetLastError()==DD_OK) 1143 1148 { … … 1172 1177 1173 1178 MipMapSurface = new OS2IDirectDrawSurface(lpDraw, &ComplexSurfaceDesc, TRUE); 1179 MipMapSurface->Vtbl.AddRef((IDirectDrawSurface *)MipMapSurface); 1174 1180 1175 1181 DPA_InsertPtr( DPA_SurfaceMipMaps, … … 1584 1590 for(x=0;x<width;x++) 1585 1591 { 1586 *((WORD*)pDLine) = pPal16[pSLine[x]]; 1592 *(((WORD*)pDLine)+x) = pPal16[pSLine[x]]; 1593 1587 1594 } 1588 1595 pSLine += dwPitchFB; … … 4473 4480 memset(&BitmapInfo,0, sizeof(BitmapInfo)); 4474 4481 BitmapInfo.bmiHead.biSize = sizeof(BITMAPINFOHEADER); 4482 /* 4475 4483 BitmapInfo.bmiHead.biWidth = me->DDSurfaceDesc.lPitch/ (me->DDSurfaceDesc.ddpfPixelFormat.dwRGBBitCount>>3); 4476 4484 BitmapInfo.bmiHead.biHeight = me->DDSurfaceDesc.dwHeight; 4477 4485 BitmapInfo.bmiHead.biPlanes = 1; 4478 4486 BitmapInfo.bmiHead.biBitCount = 0; // me->DDSurfaceDesc.ddpfPixelFormat.dwRGBBitCount; 4479 4487 */ 4480 4488 switch(me->DDSurfaceDesc.ddpfPixelFormat.dwRGBBitCount) 4481 4489 { … … 4485 4493 BitmapInfo.bmiHead.biCompression = BI_RGB; 4486 4494 //GetSystemPaletteEntries(me->hdcImage,0,255,(PPALETTEENTRY)&BitmapInfo.bmiCols[0]); 4487 rc = GetDIBits(hdc, me->hbmImage, 0, me->DDSurfaceDesc.dwHeight, 4488 NULL,(PBITMAPINFO)&BitmapInfo,DIB_PAL_COLORS); 4495 rc = GetDIBits( hdc, 4496 me->hbmImage, 4497 0, 4498 me->DDSurfaceDesc.dwHeight, 4499 NULL, 4500 (PBITMAPINFO)&BitmapInfo, 4501 DIB_RGB_COLORS); 4489 4502 WriteLog( "GetDIBits rc=%d\n Size :%d\n Width :%d\n Height :%d\n" 4490 " Planes :%d\n BitCount :%d\nLastEror = %d\n ",4503 " Planes :%d\n BitCount :%d\nLastEror = %d\nPixel[0,0] = 0x%02X\n", 4491 4504 rc, 4492 4505 BitmapInfo.bmiHead.biSize, … … 4495 4508 BitmapInfo.bmiHead.biPlanes, 4496 4509 BitmapInfo.bmiHead.biBitCount, 4497 GetLastError()); 4510 GetLastError(), 4511 ((char*)me->DDSurfaceDesc.lpSurface)[0]); 4498 4512 rc = GetDIBits( hdc, 4499 me->hbmImage, 0, 4513 me->hbmImage, 4514 0, 4500 4515 me->DDSurfaceDesc.dwHeight, 4501 4516 me->DDSurfaceDesc.lpSurface, 4502 4517 (PBITMAPINFO)&BitmapInfo, 4503 DIB_ PAL_COLORS);4504 WriteLog( "GetDIBits rc=%d\n LastEror = %d\n ",4518 DIB_RGB_COLORS); 4519 WriteLog( "GetDIBits rc=%d\n LastEror = %d\nPixel[0,0] = 0x%02X\n", 4505 4520 rc, 4506 GetLastError()); 4521 GetLastError(), 4522 ((char*)me->DDSurfaceDesc.lpSurface)[0]); 4507 4523 break; 4508 4524 case 16: -
trunk/src/ddraw/OS2SURFACE.H
r587 r1434 30 30 //this one has to go first! 31 31 IDirectDrawSurface4Vtbl *lpVtbl; 32 IDirectDrawSurface4Vtbl *lpVtbl2; // 2nd Vtable pointer An other MS assumtion see below 33 DWORD dwUnknownData; // Pointer to unknown data set to DEADDEAD to indicate that we can't handle this 32 34 IDirectDrawSurface2Vtbl Vtbl2; 33 35 IDirectDrawSurface3Vtbl Vtbl3;
Note:
See TracChangeset
for help on using the changeset viewer.