Changeset 2614 for trunk/src/gdi32/blit.cpp
- Timestamp:
- Feb 3, 2000, 7:59:36 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/blit.cpp
r2602 r2614 1 /* $Id: blit.cpp,v 1. 3 2000-02-03 10:23:24 dengertExp $ */1 /* $Id: blit.cpp,v 1.4 2000-02-03 18:59:04 sandervl Exp $ */ 2 2 3 3 /* … … 14 14 #include <stdarg.h> 15 15 #include <string.h> 16 #include <cpuhlp.h> 16 17 #include "misc.h" 17 18 #include "dibsect.h" 19 #include "rgbcvt.h" 18 20 19 21 static ULONG QueryPaletteSize(BITMAPINFOHEADER *pBHdr); … … 86 88 INT result, imgsize, palsize, height, width; 87 89 char *ptr; 88 ULONG compression = 0 ;90 ULONG compression = 0, iHeight; 89 91 WORD *newbits = 0; 90 92 … … 135 137 ((BITMAPINFO *)info)->bmiHeader.biCompression = 0; 136 138 compression = BI_BITFIELDS; 137 if(*(bitfields+1) == 0x3E0) {//RGB 555? 138 extern void _Optlink RGB555to565 (WORD *dest, WORD *src, ULONG num); 139 139 if(*(bitfields+1) == 0x3E0) 140 {//RGB 555? 140 141 newbits = (WORD *)malloc(imgsize); 141 RGB555to565 (newbits, (WORD *)bits, imgsize/sizeof(WORD)); 142 if(CPUFeatures & CPUID_MMX) { 143 RGB555to565MMX(newbits, (WORD *)bits, imgsize/sizeof(WORD)); 144 } 145 else RGB555to565(newbits, (WORD *)bits, imgsize/sizeof(WORD)); 142 146 bits = newbits; 143 147 } 144 148 } 145 149 146 if(info->bmiHeader.biHeight < 0) 150 iHeight = info->bmiHeader.biHeight; 151 if(info->bmiHeader.biHeight < 0) { 147 152 ((BITMAPINFO *)info)->bmiHeader.biHeight = -info->bmiHeader.biHeight; 148 153 } 149 154 result = O32_SetDIBitsToDevice(hdc, xDest, yDest, cx, cy, xSrc, ySrc, startscan, lines, (PVOID) bits, (PBITMAPINFO)info, coloruse); 150 155 //SvL: Wrong Open32 return value … … 159 164 if(newbits) free(newbits); 160 165 } 166 ((BITMAPINFO *)info)->bmiHeader.biHeight = iHeight; 161 167 return result; 162 168
Note:
See TracChangeset
for help on using the changeset viewer.