source: trunk/src/opengl/glide/swlibs/fxmisc/3dfx.h

Last change on this file was 2887, checked in by sandervl, 26 years ago

Created swlibs dir

File size: 3.2 KB
Line 
1/*
2** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
3** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
4** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
5** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
6** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
7** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
8** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
9** FULL TEXT OF THE NON-WARRANTY PROVISIONS.
10**
11** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
12** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
13** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
14** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
15** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
16** THE UNITED STATES.
17**
18** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
19**
20** $Revision: 1.1 $
21** $Date: 2000-02-25 00:33:50 $
22*/
23#ifndef __3DFX_H__
24#define __3DFX_H__
25
26/*
27** basic data types
28*/
29typedef unsigned char FxU8;
30typedef signed char FxI8;
31typedef unsigned short FxU16;
32typedef signed short FxI16;
33typedef signed long FxI32;
34typedef unsigned long FxU32;
35typedef int FxBool;
36typedef float FxFloat;
37typedef double FxDouble;
38
39/*
40** color types
41*/
42typedef unsigned long FxColor_t;
43typedef struct { float r, g, b, a; } FxColor4;
44
45/*
46** fundamental types
47*/
48#define FXTRUE 1
49#define FXFALSE 0
50
51/*
52** helper macros
53*/
54#define FXUNUSED( a ) ((void)(a))
55#define FXBIT( i ) ( 1L << (i) )
56
57/*
58** export macros
59*/
60
61#if defined(__MSC__) || defined(_MSC_VER)
62# if defined (MSVC16)
63# define FX_ENTRY
64# define FX_CALL
65# else
66# define FX_ENTRY extern
67# define FX_CALL __stdcall
68# endif
69#elif defined(__OS2__) && !defined(__WIN32OS2__)
70# define FX_ENTRY extern
71# define FX_CALL _System
72#elif defined(__WATCOMC__)
73# define FX_ENTRY extern
74# define FX_CALL __stdcall
75#elif defined (__IBMC__) || defined (__IBMCPP__)
76 /* IBM Visual Age C/C++: */
77# define FX_ENTRY extern
78# define FX_CALL __stdcall
79#elif defined(__DJGPP__)
80# define FX_ENTRY extern
81# define FX_CALL
82#elif defined(__unix__)
83# define FX_ENTRY extern
84# define FX_CALL
85#elif defined(__MWERKS__)
86# if macintosh
87# define FX_ENTRY extern
88# define FX_CALL
89# else /* !macintosh */
90# error "Unknown MetroWerks target platform"
91# endif /* !macintosh */
92#else
93# warning define FX_ENTRY & FX_CALL for your compiler
94# define FX_ENTRY extern
95# define FX_CALL
96#endif
97
98/*
99** x86 compiler specific stuff
100*/
101#if defined(__BORLANDC_)
102# define REALMODE
103
104# define REGW( a, b ) ((a).x.b)
105# define REGB( a, b ) ((a).h.b)
106# define INT86( a, b, c ) int86(a,b,c)
107# define INT86X( a, b, c, d ) int86x(a,b,c,d)
108
109# define RM_SEG( a ) FP_SEG( a )
110# define RM_OFF( a ) FP_OFF( a )
111#elif defined(__WATCOMC__)
112# undef FP_SEG
113# undef FP_OFF
114
115# define REGW( a, b ) ((a).w.b)
116# define REGB( a, b ) ((a).h.b)
117# define INT86( a, b, c ) int386(a,b,c)
118# define INT86X( a, b, c, d ) int386x(a,b,c,d)
119
120# define RM_SEG( a ) ( ( ( ( FxU32 ) (a) ) & 0x000F0000 ) >> 4 )
121# define RM_OFF( a ) ( ( FxU16 ) (a) )
122#endif
123
124#endif /* !__3DFX_H__ */
Note: See TracBrowser for help on using the repository browser.