Ignore:
Timestamp:
Aug 18, 2000, 8:14:59 PM (25 years ago)
Author:
sandervl
Message:

lots of small changes; CreateHalftonePalette + rgb 565 -> rgb 555 conversion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/dibitmap.cpp

    r3235 r4034  
    1 /* $Id: dibitmap.cpp,v 1.7 2000-03-25 12:19:07 sandervl Exp $ */
     1/* $Id: dibitmap.cpp,v 1.8 2000-08-18 18:14:56 sandervl Exp $ */
    22
    33/*
     
    9292 BOOL    fCreateDC = FALSE;
    9393
    94   dprintf(("GDI32: CreateDIBSection %x %x %x %x %d", hdc, iUsage, ppvBits, hSection, dwOffset));
     94  dprintf(("GDI32: CreateDIBSection %x %x %x %x %x %d", hdc, pbmi, iUsage, ppvBits, hSection, dwOffset));
    9595
    9696  //SvL: 13-9-98: StarCraft uses bitmap with negative height
     
    128128      if(PalSize <= 8)
    129129      {
    130        ULONG Pal[256];
     130       ULONG Pal[256], nrcolors;
    131131       LOGPALETTE tmpPal = { 0x300,1,{0,0,0,0}};
    132132       HPALETTE hpalCur, hpalTmp;
     
    137137
    138138        // and use it to set the DIBColorTable
    139         GetPaletteEntries( hpalCur, 0, 1<<PalSize, (LPPALETTEENTRY)&Pal);
    140         dsect->SetDIBColorTable(0, 1<< PalSize, (RGBQUAD*)&Pal);
     139        nrcolors = GetPaletteEntries( hpalCur, 0, 1<<PalSize, (LPPALETTEENTRY)&Pal);
     140        dsect->SetDIBColorTable(0, nrcolors, (RGBQUAD*)&Pal);
    141141
    142142        // Restore the DC Palette
Note: See TracChangeset for help on using the changeset viewer.