Changeset 5386 for trunk/src/kernel32/cvtcursor.cpp
- Timestamp:
- Mar 27, 2001, 6:18:26 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/cvtcursor.cpp
r2802 r5386 1 /* $Id: cvtcursor.cpp,v 1.1 0 2000-02-16 14:25:37sandervl Exp $ */1 /* $Id: cvtcursor.cpp,v 1.11 2001-03-27 16:18:26 sandervl Exp $ */ 2 2 3 3 /* … … 37 37 WINBITMAPINFOHEADER *bmpHdr = (WINBITMAPINFOHEADER *)(curHdr+1); 38 38 int bwsize, colorsize, rgbsize, cursorsize; 39 ULONG biSizeImage; 39 40 40 41 bwsize = (bmpHdr->biWidth*(bmpHdr->biHeight/2))/8; … … 65 66 } 66 67 if(bmpHdr->biSizeImage == 0 && bmpHdr->biCompression == 0) { 67 bmpHdr->biSizeImage = bwsize + colorsize; 68 } 68 biSizeImage = bwsize + colorsize; 69 } 70 else biSizeImage = bmpHdr->biSizeImage; 69 71 70 72 //SvL: 28-09-'98: cllngenu.dll has an incorrect size in the header 71 if(bmpHdr->biSizeImage < colorsize) { 72 bmpHdr->biSizeImage = colorsize; 73 } 73 if(biSizeImage < colorsize) { 74 biSizeImage = colorsize; 75 } 76 74 77 if(bmpHdr->biBitCount > 1) { 75 78 //And mask, xor mask (0) + color image 76 79 cursorsize = 2*sizeof(BITMAPFILEHEADER2) + 2*sizeof(RGB2) + 77 rgbsize + 2*bwsize + b mpHdr->biSizeImage;80 rgbsize + 2*bwsize + biSizeImage; 78 81 } 79 82 else { … … 95 98 BITMAPFILEHEADER2 *cursorhdr, *cursorhdr2; 96 99 int i, bwsize, bmpsize, cursorsize, rgbsize, colorsize; 100 ULONG biSizeImage; 97 101 98 102 dprintf(("ConvertCursor: Cursor size %d", size)); … … 124 128 } 125 129 if(bmpHdr->biSizeImage == 0 && bmpHdr->biCompression == 0) { 126 bmpHdr->biSizeImage = bwsize + colorsize; 127 } 130 biSizeImage = bwsize + colorsize; 131 } 132 else biSizeImage = bmpHdr->biSizeImage; 128 133 129 134 //SvL: 28-09-'98: cllngenu.dll has an incorrect size in the header 130 if(bmpHdr->biSizeImage < colorsize) { 131 bmpHdr->biSizeImage = colorsize; 132 } 135 if(biSizeImage < colorsize) { 136 biSizeImage = colorsize; 137 } 138 133 139 if(bmpHdr->biBitCount == 1) { 134 140 //And + xor mask … … 138 144 //And mask, xor mask (0) + color image 139 145 cursorsize = 2*sizeof(BITMAPFILEHEADER2) + 2*sizeof(RGB2) + 140 rgbsize + 2*bwsize + b mpHdr->biSizeImage;146 rgbsize + 2*bwsize + biSizeImage; 141 147 } 142 148 … … 170 176 cursorhdr->bmp2.ulCompression = BCA_UNCOMP; 171 177 cursorhdr->bmp2.ulColorEncoding = BCE_RGB; 172 dprintf2(("Cursor size : %d", b mpHdr->biSizeImage));178 dprintf2(("Cursor size : %d", biSizeImage)); 173 179 dprintf2(("Cursor Width : %d", bmpHdr->biWidth)); 174 180 //height for both the XOR and AND bitmap (color & BW)
Note:
See TracChangeset
for help on using the changeset viewer.