Ignore:
Timestamp:
Mar 27, 2001, 6:18:26 PM (24 years ago)
Author:
sandervl
Message:

removed cursor(group) conversion code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/cvtcursor.cpp

    r2802 r5386  
    1 /* $Id: cvtcursor.cpp,v 1.10 2000-02-16 14:25:37 sandervl Exp $ */
     1/* $Id: cvtcursor.cpp,v 1.11 2001-03-27 16:18:26 sandervl Exp $ */
    22
    33/*
     
    3737 WINBITMAPINFOHEADER *bmpHdr = (WINBITMAPINFOHEADER *)(curHdr+1);
    3838 int bwsize, colorsize, rgbsize, cursorsize;
     39 ULONG biSizeImage;
    3940
    4041  bwsize   = (bmpHdr->biWidth*(bmpHdr->biHeight/2))/8;
     
    6566  }
    6667  if(bmpHdr->biSizeImage == 0 && bmpHdr->biCompression == 0) {
    67         bmpHdr->biSizeImage = bwsize + colorsize;
    68   }
     68        biSizeImage = bwsize + colorsize;
     69  }
     70  else  biSizeImage = bmpHdr->biSizeImage;
    6971
    7072  //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
    7477  if(bmpHdr->biBitCount > 1) {
    7578        //And mask, xor mask (0) + color image
    7679        cursorsize = 2*sizeof(BITMAPFILEHEADER2) + 2*sizeof(RGB2) +
    77                      rgbsize + 2*bwsize + bmpHdr->biSizeImage;
     80                     rgbsize + 2*bwsize + biSizeImage;
    7881  }
    7982  else {
     
    9598 BITMAPFILEHEADER2   *cursorhdr, *cursorhdr2;
    9699 int        i, bwsize, bmpsize, cursorsize, rgbsize, colorsize;
     100 ULONG      biSizeImage;
    97101
    98102  dprintf(("ConvertCursor: Cursor size %d", size));
     
    124128  }
    125129  if(bmpHdr->biSizeImage == 0 && bmpHdr->biCompression == 0) {
    126         bmpHdr->biSizeImage = bwsize + colorsize;
    127   }
     130        biSizeImage = bwsize + colorsize;
     131  }
     132  else  biSizeImage = bmpHdr->biSizeImage;
    128133
    129134  //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
    133139  if(bmpHdr->biBitCount == 1) {
    134140        //And + xor mask
     
    138144        //And mask, xor mask (0) + color image
    139145        cursorsize = 2*sizeof(BITMAPFILEHEADER2) + 2*sizeof(RGB2) +
    140                      rgbsize + 2*bwsize + bmpHdr->biSizeImage;
     146                     rgbsize + 2*bwsize + biSizeImage;
    141147  }
    142148
     
    170176  cursorhdr->bmp2.ulCompression   = BCA_UNCOMP;
    171177  cursorhdr->bmp2.ulColorEncoding = BCE_RGB;
    172   dprintf2(("Cursor size    : %d", bmpHdr->biSizeImage));
     178  dprintf2(("Cursor size    : %d", biSizeImage));
    173179  dprintf2(("Cursor Width   : %d", bmpHdr->biWidth));
    174180  //height for both the XOR and AND bitmap (color & BW)
Note: See TracChangeset for help on using the changeset viewer.