Changeset 1036 for trunk/src/kernel32
- Timestamp:
- Sep 25, 1999, 12:47:00 AM (26 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/cvtcursor.cpp
r816 r1036 1 /* $Id: cvtcursor.cpp,v 1. 3 1999-09-04 12:41:45sandervl Exp $ */1 /* $Id: cvtcursor.cpp,v 1.4 1999-09-24 22:47:00 sandervl Exp $ */ 2 2 3 3 /* … … 56 56 57 57 cursorhdr = (BITMAPFILEHEADER2 *)malloc(cursorsize); 58 memset(cursorhdr, 0, cursorsize); 58 59 cursorhdr->usType = BFT_POINTER; 59 60 cursorhdr->cbSize = sizeof(BITMAPFILEHEADER2); … … 68 69 69 70 cursorhdr->offBits = sizeof(BITMAPFILEHEADER2) + 2*sizeof(RGB2) + offsetBits; 70 cursorhdr->bmp2.cbFix = sizeof(BITMAPINFOHEADER );71 cursorhdr->bmp2.cbFix = sizeof(BITMAPINFOHEADER2); 71 72 cursorhdr->bmp2.cx = (USHORT)bhdr->biWidth; 72 73 cursorhdr->bmp2.cy = (USHORT)(bhdr->biHeight); 73 74 cursorhdr->bmp2.cPlanes = bhdr->biPlanes; 74 75 cursorhdr->bmp2.cBitCount = bhdr->biBitCount; 76 cursorhdr->bmp2.ulCompression = BCA_UNCOMP; 77 cursorhdr->bmp2.ulColorEncoding = BCE_RGB; 75 78 dprintf(("Cursor size : %d", bhdr->biSizeImage)); 76 79 dprintf(("Cursor Width : %d", bhdr->biWidth)); -
trunk/src/kernel32/cvtcursorgrp.cpp
r997 r1036 1 /* $Id: cvtcursorgrp.cpp,v 1. 4 1999-09-21 08:24:53sandervl Exp $ */1 /* $Id: cvtcursorgrp.cpp,v 1.5 1999-09-24 22:47:00 sandervl Exp $ */ 2 2 3 3 /* … … 36 36 CursorResDir *rdir = (CursorResDir *)(chdr + 1); 37 37 int i, groupsize = 0, os2cursorsize; 38 BITMAPARRAYFILEHEADER *bafh, *orgbafh;38 BITMAPARRAYFILEHEADER2 *bafh, *orgbafh; 39 39 CursorComponent *cursorhdr; 40 40 Win32Resource *winres; … … 56 56 rdir++; 57 57 } 58 bafh = (BITMAPARRAYFILEHEADER *)malloc(groupsize+chdr->cwCount*sizeof(BITMAPARRAYFILEHEADER));58 bafh = (BITMAPARRAYFILEHEADER2 *)malloc(groupsize+chdr->cwCount*sizeof(BITMAPARRAYFILEHEADER2)); 59 59 orgbafh = bafh; 60 60 … … 62 62 for(i=0;i<chdr->cwCount;i++) { 63 63 bafh->usType = BFT_BITMAPARRAY; 64 bafh->cbSize = sizeof(BITMAPARRAYFILEHEADER );64 bafh->cbSize = sizeof(BITMAPARRAYFILEHEADER2); 65 65 bafh->cxDisplay = 0; 66 66 bafh->cyDisplay = 0; … … 75 75 76 76 cursorhdr = (CursorComponent *)winres->lockResource(); 77 os2cursor = ConvertCursor(cursorhdr, winres->getSize(), &os2cursorsize, (int)bafh - (int)orgbafh + sizeof(BITMAPARRAYFILEHEADER )-sizeof(BITMAPFILEHEADER));77 os2cursor = ConvertCursor(cursorhdr, winres->getSize(), &os2cursorsize, (int)bafh - (int)orgbafh + sizeof(BITMAPARRAYFILEHEADER2)-sizeof(BITMAPFILEHEADER)); 78 78 79 79 if(os2cursor == NULL) { … … 85 85 86 86 if(i != chdr->cwCount -1) { 87 bafh->offNext = (int)&bafh->bfh - (int)orgbafh + os2cursorsize;87 bafh->offNext = (int)&bafh->bfh2 - (int)orgbafh + os2cursorsize; 88 88 } 89 89 else bafh->offNext = 0; 90 90 91 memcpy((char *)&bafh->bfh , os2cursor, os2cursorsize);91 memcpy((char *)&bafh->bfh2, os2cursor, os2cursorsize); 92 92 free(os2cursor); 93 93 94 bafh = (BITMAPARRAYFILEHEADER *)((int)&bafh->bfh+ os2cursorsize);94 bafh = (BITMAPARRAYFILEHEADER2 *)((int)&bafh->bfh2 + os2cursorsize); 95 95 delete winres; 96 96
Note:
See TracChangeset
for help on using the changeset viewer.