-
Notifications
You must be signed in to change notification settings - Fork 0
/
palette.cxx
68 lines (48 loc) · 1.58 KB
/
palette.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// $Id: palette.cpp,v 1.1 2003/07/08 03:42:28 bush Exp $
// Written by:
// Grant Macklem (Grant.Macklem@colorado.edu)
// Gregory Schmelter (Gregory.Schmelter@colorado.edu)
// Alan Schmidt (Alan.Schmidt@colorado.edu)
// Ivan Stashak (Ivan.Stashak@colorado.edu)
// CSCI 4830/7818: API Programming
// University of Colorado at Boulder, Spring 2003
// http://www.cs.colorado.edu/~main/bgi
//
#include <windows.h> // Provides Win32 API
#include <windowsx.h> // Provides GDI helper macros
#include "winbgi.h" // API routines
#include "winbgitypes.h" // Internal structure data
/*****************************************************************************
*
* Helper functions
*
*****************************************************************************/
/*****************************************************************************
*
* The actual API calls are implemented below
*
*****************************************************************************/
palettetype *getdefaultpalette( )
{
static palettetype default_palette = { 16,
{ BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LIGHTGRAY,
DARKGRAY, LIGHTBLUE, LIGHTGREEN, LIGHTCYAN, LIGHTRED,
LIGHTMAGENTA, YELLOW, WHITE } };
return &default_palette;
}
void getpalette( palettetype *palette )
{
}
int getpalettesize( )
{
return MAXCOLORS + 1;
}
void setallpalette( palettetype *palette )
{
}
void setpalette( int colornum, int color )
{
}
void setrgbpalette( int colornum, int red, int green, int blue )
{
}