- Timestamp:
- Jun 8, 2001, 1:03:33 PM (24 years ago)
- Location:
- trunk/src/gdi32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/dibitmap.cpp
r5901 r5931 1 /* $Id: dibitmap.cpp,v 1.2 0 2001-06-03 14:52:47sandervl Exp $ */1 /* $Id: dibitmap.cpp,v 1.21 2001-06-08 11:03:32 sandervl Exp $ */ 2 2 3 3 /* … … 286 286 void *lpvBits, PBITMAPINFO lpbi, UINT uUsage) 287 287 { 288 int rc;288 int nrlines; 289 289 290 290 dprintf(("GDI32: GetDIBits %x %x %d %d %x %x (biBitCount %d) %d", hdc, hBitmap, uStartScan, cScanLines, lpvBits, lpbi, lpbi->bmiHeader.biBitCount, uUsage)); 291 291 292 #if 1 //def OPEN32293 292 //SvL: WGSS screws up the DC if it's a memory DC 294 293 // TODO: Fix in WGSS 295 294 HDC hdcMem = CreateCompatibleDC(0); 296 #endif 297 rc= O32_GetDIBits(hdcMem, hBitmap, uStartScan, cScanLines, lpvBits, lpbi, uUsage);298 #if 1 //def OPEN32 295 296 nrlines = O32_GetDIBits(hdcMem, hBitmap, uStartScan, cScanLines, lpvBits, lpbi, uUsage); 297 299 298 DeleteDC(hdcMem); 300 #endif301 299 302 300 // set proper color masks … … 314 312 break; 315 313 } 316 if( lpvBits && lpbi->bmiHeader.biBitCount == 16 && ((DWORD*)(lpbi->bmiColors))[1] == 0x3E0)314 if(nrlines && lpvBits && lpbi->bmiHeader.biBitCount == 16 && ((DWORD*)(lpbi->bmiColors))[1] == 0x3E0) 317 315 {//RGB 555? 318 316 dprintf(("RGB 565->555 conversion required")); 319 317 320 318 int imgsize = CalcBitmapSize(lpbi->bmiHeader.biBitCount, 321 lpbi->bmiHeader.biWidth, lpbi->bmiHeader.biHeight);319 lpbi->bmiHeader.biWidth, nrlines); 322 320 323 321 if(CPUFeatures & CPUID_MMX) { … … 330 328 //as 0 signals failure 331 329 if(lpvBits == NULL) { 332 rc= cScanLines;333 } 334 dprintf(("GDI32: GetDIBits return rc %d", rc));335 return rc;330 nrlines = cScanLines; 331 } 332 dprintf(("GDI32: GetDIBits returned %d", nrlines)); 333 return nrlines; 336 334 } 337 335 //****************************************************************************** -
trunk/src/gdi32/dibsect.cpp
r5901 r5931 1 /* $Id: dibsect.cpp,v 1.5 3 2001-06-03 14:52:47sandervl Exp $ */1 /* $Id: dibsect.cpp,v 1.54 2001-06-08 11:03:33 sandervl Exp $ */ 2 2 3 3 /* … … 590 590 else bitmapBits = bmpBits; 591 591 592 switch(Rop) { 593 case 0xcc0020: /* SRCCOPY */ 594 Rop = ROP_SRCCOPY; 595 break; 596 case 0xee0086: /* SRCPAINT */ 597 Rop = ROP_SRCPAINT; 598 break; 599 case 0x8800c6: /* SRCAND */ 600 Rop = ROP_SRCAND; 601 break; 602 case 0x660046: /* SRCINVERT */ 603 Rop = ROP_SRCINVERT; 604 break; 605 case 0x440328: /* SRCERASE */ 606 Rop = ROP_SRCERASE; 607 break; 608 case 0x330008: /* NOTSRCCOPY */ 609 Rop = ROP_NOTSRCCOPY; 610 break; 611 case 0x1100a6: /* NOTSRCERASE */ 612 Rop = ROP_NOTSRCERASE; 613 break; 614 case 0xc000ca: /* MERGECOPY */ 615 Rop = ROP_MERGECOPY; 616 break; 617 case 0xbb0226: /* MERGEPAINT */ 618 Rop = ROP_MERGEPAINT; 619 break; 620 case 0xf00021: /* PATCOPY */ 621 Rop = ROP_PATCOPY; 622 break; 623 case 0xfb0a09: /* PATPAINT */ 624 Rop = ROP_PATPAINT; 625 break; 626 case 0x5a0049: /* PATINVERT */ 627 Rop = ROP_PATINVERT; 628 break; 629 case 0x550009: /* DSTINVERT */ 630 Rop = ROP_DSTINVERT; 631 break; 632 case 0x000042: /* BLACKNESS */ 633 Rop = ROP_ZERO; 634 break; 635 case 0xff0062: /* WHITENESS */ 636 Rop = ROP_ONE; 637 break; 638 default: 639 Rop = ROP_SRCCOPY; 640 break; 641 } 592 //Translate ROP 593 Rop = Rop >> 16; 642 594 643 595 //SvL: Optimize this.. (don't convert entire bitmap if only a part will be blitted to the dc) -
trunk/src/gdi32/oslibgdi.cpp
r2802 r5931 1 /* $Id: oslibgdi.cpp,v 1. 6 2000-02-16 14:18:11sandervl Exp $ */1 /* $Id: oslibgdi.cpp,v 1.7 2001-06-08 11:03:33 sandervl Exp $ */ 2 2 3 3 /* … … 23 23 #include "dbglocal.h" 24 24 25 #if 0 25 26 //****************************************************************************** 26 27 //****************************************************************************** … … 70 71 //****************************************************************************** 71 72 //****************************************************************************** 73 #endif
Note:
See TracChangeset
for help on using the changeset viewer.