Changeset 210 for trunk/src/ddraw/OS2PALSET.CPP
- Timestamp:
- Jun 26, 1999, 1:34:43 PM (26 years ago)
- 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 functions5 *6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)7 *8 * Project Odin Software License can be found in LICENSE.TXT9 *10 */11 1 #define INCL_GREALL 12 #define INCL_WIN13 2 #define INCL_GPI 14 #include <os2 .h>3 #include <os2wrap.h> 15 4 #include <pmddi.h> 16 5 #include <stdio.h> 17 6 #include <stdlib.h> 18 7 #include <string.h> 8 #include "os2palset.h" 9 #define FAR 19 10 #include "misc.h" 20 #include "os2palset.h"21 11 22 12 //****************************************************************************** 23 13 //****************************************************************************** 24 void OS2SetPhysPalette( HWND hwndClient,void *pal)14 void OS2SetPhysPalette(void *pal) 25 15 { 26 16 PALETTEENTRY *pDirectXPal = (PALETTEENTRY *)pal; … … 29 19 RGB2 os2rgb[256]; 30 20 int i; 31 ULONG cclr;32 21 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 { 36 27 os2rgb[i].bBlue = pDirectXPal[i].peBlue; 37 28 os2rgb[i].bGreen = pDirectXPal[i].peGreen; 38 29 os2rgb[i].bRed = pDirectXPal[i].peRed; 39 os2rgb[i].fcOptions = PC_RESERVED;40 30 os2rgb[i].fcOptions = 0; 31 } 41 32 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); 48 46 } 49 47 //****************************************************************************** … … 54 52 HDC hdc; 55 53 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); 61 67 } 62 68 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.