blob: 4c1c4765858b762f6c1525d24e65f407a84f799f (
plain)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
/*
* PARSEC HEADER: vid_defs.h
*/
#ifndef _VID_DEFS_H_
#define _VID_DEFS_H_
// ----------------------------------------------------------------------------
// VIDEO SUBSYSTEM (VID) related definitions -
// ----------------------------------------------------------------------------
#define MODE_COL_16BPP 16 // depth (in bits per pixel)
#define MODE_COL_32BPP 32
// color mode ids irrespective of bit depth -----------------------------------
//
#define COLMODE_HICOLOR 1
#define COLMODE_TRUECOLOR 2
// color mode dependent constants ---------------------------------------------
//
#define VGA_PAL_NUMCOLORS 256 // number of distinct colors in vga palette
#define VGA_PAL_SIZE 768 // size of vga palette in bytes
#define VGA_PAL_COLBITS 6 // number of bits per color in vga palette
#define VGA_PAL_FULLBRIGHT 63 // maximum value for vga color
#define HICOLOR_NUMCOLORS 65536L // number of distinct colors in hicolor mode
// global palette identifiers -------------------------------------------------
//
#define PAL_GAME ( VGA_PAL_SIZE * 0 )
#define PAL_MENU ( VGA_PAL_SIZE * 1 )
#define PAL_BEYOND ( VGA_PAL_SIZE * 2 ) // has to be last!!
#define PAL_STANDARD PAL_GAME
#define PAL_SHIP_VIEWER PAL_GAME
#define PAL_OBJECT_VIEWER PAL_GAME
#define PAL_CREDITS_SCROLL PAL_MENU
// special color identifiers --------------------------------------------------
//
#define COL_BACKGROUND_BLACK -2
#define COL_BACKGROUND_BLUE -3
// special values for RGB color triplet (6 bits per color) --------------------
//
#define COLRGB_CHANNELBITS 6
#define COLRGB_FULLBRIGHT 0x3f
#define COLRGB_MUTECHANNEL 0x00
#define COLRGB_BLACK { COLRGB_MUTECHANNEL, COLRGB_MUTECHANNEL, COLRGB_MUTECHANNEL }
#define COLRGB_WHITE { COLRGB_FULLBRIGHT, COLRGB_FULLBRIGHT, COLRGB_FULLBRIGHT }
// special values for RGBA color (8 bits per color) ---------------------------
//
#define COLRGBA_CHANNELBITS 8
#define COLRGBA_FULLBRIGHT 0xff
#define COLRGBA_MUTECHANNEL 0x00
#define COLRGBA_FULLYOPAQUE 0xff
#define COLRGBA_TRANSPARENT 0x00
#define COLRGBA_BLACK { COLRGBA_MUTECHANNEL, COLRGBA_MUTECHANNEL, COLRGBA_MUTECHANNEL, COLRGBA_FULLYOPAQUE }
#define COLRGBA_WHITE { COLRGBA_FULLBRIGHT, COLRGBA_FULLBRIGHT, COLRGBA_FULLBRIGHT, COLRGBA_FULLYOPAQUE }
// wait for start of vertical retrace -----------------------------------------
//
#define AwaitVertSync() {}
// include system-specific subsystem prototypes -------------------------------
//
#include "vid_subh.h"
#endif // _VID_DEFS_H_
|