Changeset 5901 for trunk/src/gdi32/dibitmap.cpp
- Timestamp:
- Jun 3, 2001, 4:52:47 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/dibitmap.cpp
r5866 r5901 1 /* $Id: dibitmap.cpp,v 1. 19 2001-06-01 12:29:25sandervl Exp $ */1 /* $Id: dibitmap.cpp,v 1.20 2001-06-03 14:52:47 sandervl Exp $ */ 2 2 3 3 /* … … 15 15 #include <string.h> 16 16 #include <misc.h> 17 #include <cpuhlp.h> 17 18 #include <winuser32.h> 18 19 #include "dibsect.h" 20 #include "rgbcvt.h" 19 21 20 22 #define DBG_LOCALLOG DBG_dibitmap 21 23 #include "dbglocal.h" 24 25 ULONG CalcBitmapSize(ULONG cBits, LONG cx, LONG cy); 22 26 23 27 //****************************************************************************** … … 296 300 #endif 297 301 298 // set proper color masks !302 // set proper color masks 299 303 switch(lpbi->bmiHeader.biBitCount) { 300 304 case 16: //RGB 565 301 305 ((DWORD*)(lpbi->bmiColors))[0] = 0xF800; 302 ((DWORD*)(lpbi->bmiColors))[1] = 0x0 7E0;306 ((DWORD*)(lpbi->bmiColors))[1] = 0x03E0; 303 307 ((DWORD*)(lpbi->bmiColors))[2] = 0x001F; 304 308 break; … … 310 314 break; 311 315 } 316 if(lpvBits && lpbi->bmiHeader.biBitCount == 16 && ((DWORD*)(lpbi->bmiColors))[1] == 0x3E0) 317 {//RGB 555? 318 dprintf(("RGB 565->555 conversion required")); 319 320 int imgsize = CalcBitmapSize(lpbi->bmiHeader.biBitCount, 321 lpbi->bmiHeader.biWidth, lpbi->bmiHeader.biHeight); 322 323 if(CPUFeatures & CPUID_MMX) { 324 RGB565to555MMX((WORD *)lpvBits, (WORD *)lpvBits, imgsize/sizeof(WORD)); 325 } 326 else RGB565to555((WORD *)lpvBits, (WORD *)lpvBits, imgsize/sizeof(WORD)); 327 } 328 312 329 //WGSS/Open32 returns 0 when querying the bitmap info; must return nr of scanlines 313 330 //as 0 signals failure
Note:
See TracChangeset
for help on using the changeset viewer.