- Timestamp:
- Mar 27, 2001, 6:18:26 PM (24 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/KERNEL32.DEF
r5332 r5386 1 ; $Id: KERNEL32.DEF,v 1.9 8 2001-03-19 19:27:13sandervl Exp $1 ; $Id: KERNEL32.DEF,v 1.99 2001-03-27 16:18:26 sandervl Exp $ 2 2 3 3 ;Basis is Windows95 KERNEL32 … … 1146 1146 CPUFeatures @2005 NONAME 1147 1147 InitSystemAndRegistry__Fv @2006 NONAME 1148 _ConvertResourceToOS2@12 @2007 NONAME1149 _ConvertCursorToOS2@4 @2008 NONAME1150 _FreeOS2Resource@4 @2009 NONAME1151 1148 1152 1149 _InitializeTIB@4 @2010 NONAME -
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) -
trunk/src/kernel32/cvtcursorgrp.cpp
r3625 r5386 1 /* $Id: cvtcursorgrp.cpp,v 1.1 0 2000-05-28 16:45:12sandervl Exp $ */1 /* $Id: cvtcursorgrp.cpp,v 1.11 2001-03-27 16:18:26 sandervl Exp $ */ 2 2 3 3 /* … … 26 26 #include <winconst.h> 27 27 #include <wincursor.h> 28 #include <win\cursoricon.h> 28 29 #include <misc.h> 29 30 #include "cvtresource.h" … … 33 34 #include "dbglocal.h" 34 35 36 //CURSORICONFILEDIR 37 38 //****************************************************************************** 39 //****************************************************************************** 40 void * WIN32API ConvertCursorGroupToOS2(LPVOID ptr) 41 { 42 CURSORICONFILEDIR *chdr = (CURSORICONFILEDIR *)ptr; 43 int i, groupsize = 0, os2cursorsize; 44 BITMAPARRAYFILEHEADER2 *bafh, *orgbafh; 45 CursorComponent *cursorhdr; 46 void *os2cursor; 47 HRSRC hRes; 48 49 dprintf(("ConvertCursorGroup")); 50 dprintf(("Cursor Group type : %d", chdr->idType)); 51 dprintf(("Cursor Group count: %d", chdr->idCount)); 52 for(i=0;i<chdr->idCount;i++) { 53 dprintf2(("Cursor : %d", chdr->idEntries[i].dwDIBOffset)); 54 dprintf2(("Width : %d", (int)chdr->idEntries[i].bWidth)); 55 dprintf2(("Height : %d", (int)chdr->idEntries[i].bHeight)); 56 dprintf2(("Bits : %d", chdr->idEntries[i].bColorCount)); 57 dprintf2(("ResBytes: %d", chdr->idEntries[i].dwDIBSize)); 58 59 groupsize += chdr->idEntries[i].dwDIBSize; 60 } 61 bafh = (BITMAPARRAYFILEHEADER2 *)malloc(groupsize+chdr->idCount*sizeof(BITMAPARRAYFILEHEADER2)); 62 orgbafh = bafh; 63 64 rdir = (CursorResDir *)(chdr + 1); 65 for(i=0;i<chdr->idCount;i++) { 66 bafh->usType = BFT_BITMAPARRAY; 67 bafh->cbSize = sizeof(BITMAPARRAYFILEHEADER2); 68 bafh->cxDisplay = 0; 69 bafh->cyDisplay = 0; 70 hRes = FindResourceA(module->getInstanceHandle(), 71 (LPCSTR)rdir->wNameOrdinal, (LPSTR)NTRT_CURSOR); 72 73 if(hRes == NULL) { 74 dprintf(("Can't find cursor!")); 75 rdir++; 76 continue; 77 } 78 79 cursorhdr = (CursorComponent *)LockResource(LoadResource(module->getInstanceHandle(), hRes)); 80 os2cursor = ConvertCursor(cursorhdr, SizeofResource(module->getInstanceHandle(), hRes), &os2cursorsize, (int)bafh - (int)orgbafh + sizeof(BITMAPARRAYFILEHEADER2)-sizeof(BITMAPFILEHEADER2)); 81 82 if(os2cursor == NULL) { 83 dprintf(("Can't convert cursor!")); 84 rdir++; 85 continue; 86 } 87 88 if(i != chdr->cwCount -1) { 89 bafh->offNext = (int)&bafh->bfh2 - (int)orgbafh + os2cursorsize; 90 } 91 else bafh->offNext = 0; 92 93 memcpy((char *)&bafh->bfh2, os2cursor, os2cursorsize); 94 free(os2cursor); 95 96 bafh = (BITMAPARRAYFILEHEADER2 *)((int)&bafh->bfh2 + os2cursorsize); 97 98 rdir++; 99 } 100 return (void *)orgbafh; 101 } 35 102 //****************************************************************************** 36 103 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.