Ignore:
Timestamp:
Jun 26, 1999, 1:34:43 PM (26 years ago)
Author:
hugh
Message:

DX 6 Version of ddraw rel files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ddraw/OS2PALSET.CPP

    r97 r210  
    1 /* $Id: OS2PALSET.CPP,v 1.3 1999-06-10 17:10:56 phaller Exp $ */
    2 
    3 /*
    4  * OS/2 Palette functions
    5  *
    6  * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
    7  *
    8  * Project Odin Software License can be found in LICENSE.TXT
    9  *
    10  */
    111#define INCL_GREALL
    12 #define INCL_WIN
    132#define INCL_GPI
    14 #include <os2.h>
     3#include <os2wrap.h>
    154#include <pmddi.h>
    165#include <stdio.h>
    176#include <stdlib.h>
    187#include <string.h>
     8#include "os2palset.h"
     9#define FAR
    1910#include "misc.h"
    20 #include "os2palset.h"
    2111
    2212//******************************************************************************
    2313//******************************************************************************
    24 void OS2SetPhysPalette(HWND hwndClient, void *pal)
     14void OS2SetPhysPalette(void *pal)
    2515{
    2616 PALETTEENTRY *pDirectXPal = (PALETTEENTRY *)pal;
     
    2919 RGB2 os2rgb[256];
    3020 int  i;
    31  ULONG cclr;
    3221
    33    hps = WinGetPS(HWND_DESKTOP);
    34    hdc = GpiQueryDevice(hps);
    35    for(i=0;i<256;i++) {
     22  hps = WinGetPS(HWND_DESKTOP);
     23  hdc = GpiQueryDevice(hps);
     24
     25  for(i=0;i<256;i++)
     26  {
    3627    os2rgb[i].bBlue     = pDirectXPal[i].peBlue;
    3728    os2rgb[i].bGreen    = pDirectXPal[i].peGreen;
    3829    os2rgb[i].bRed      = pDirectXPal[i].peRed;
    39     os2rgb[i].fcOptions = PC_RESERVED;
    40    }
     30    os2rgb[i].fcOptions = 0;
     31  }
    4132
    42    GpiCreateLogColorTable(hps, LCOL_PURECOLOR | LCOL_REALIZABLE,
    43                           LCOLF_CONSECRGB, 0, 256, (PLONG)&os2rgb);
    44    Gre32Entry3(hdc, 0L, 0x000060C6L);
    45 //   WinInvalidateRect(HWND_DESKTOP, (PRECTL)NULL, TRUE);
    46    WinRealizePalette(hwndClient, hps, &cclr);
    47    WinReleasePS(hps);
     33  GpiCreateLogColorTable( hps, LCOL_PURECOLOR | LCOL_REALIZABLE,
     34                          LCOLF_CONSECRGB,
     35                          0,
     36                          256,
     37                          (PLONG)&os2rgb);
     38  Gre32Entry3( hdc,
     39               0L,
     40               0x000060C6L);
     41
     42  WinInvalidateRect( HWND_DESKTOP,
     43                     (PRECTL)NULL,
     44                     TRUE);
     45  WinReleasePS(hps);
    4846}
    4947//******************************************************************************
     
    5452 HDC hdc;
    5553
    56    hps = WinGetPS(HWND_DESKTOP);
    57    hdc = GpiQueryDevice(hps);
    58    Gre32Entry3(hdc, 0L, 0x000060C7L);
    59    WinInvalidateRect(HWND_DESKTOP, (PRECTL)NULL, TRUE);
    60    WinReleasePS(hps);
     54  hps = WinGetPS( HWND_DESKTOP);
     55
     56  hdc = GpiQueryDevice( hps);
     57
     58  Gre32Entry3( hdc,
     59               0L,
     60               0x000060C7L);
     61
     62  WinInvalidateRect( HWND_DESKTOP,
     63                    (PRECTL)NULL,
     64                    TRUE);
     65
     66  WinReleasePS(hps);
    6167}
    6268//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.