Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libmupen64plus/mupen64plus-video-glide64mk2/src/Glitch64/inc/3dfx.h
2 views
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([email protected]).
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.3.4.2 $
21
** $Date: 2003/05/05 06:50:41 $
22
*/
23
#ifndef __3DFX_H__
24
#define __3DFX_H__
25
26
/*
27
** basic data types
28
*/
29
typedef unsigned char FxU8;
30
typedef signed char FxI8;
31
typedef unsigned short FxU16;
32
typedef signed short FxI16;
33
#if defined(__alpha__) || defined (__LP64__)
34
typedef signed int FxI32;
35
typedef unsigned int FxU32;
36
#else
37
typedef signed long FxI32;
38
typedef unsigned long FxU32;
39
#endif
40
typedef unsigned long AnyPtr;
41
typedef int FxBool;
42
typedef float FxFloat;
43
typedef double FxDouble;
44
45
/*
46
** color types
47
*/
48
typedef unsigned long FxColor_t;
49
typedef struct { float r, g, b, a; } FxColor4;
50
51
/*
52
** fundamental types
53
*/
54
#define FXTRUE 1
55
#define FXFALSE 0
56
57
/*
58
** helper macros
59
*/
60
#define FXUNUSED( a ) ((void)(a))
61
#define FXBIT( i ) ( 1L << (i) )
62
63
/*
64
** export macros
65
*/
66
67
#if defined(__MSC__) || defined(_MSC_VER)
68
# if defined (MSVC16)
69
# define FX_ENTRY
70
# define FX_CALL
71
# else
72
# define FX_ENTRY __declspec(dllexport) extern
73
# define FX_CALL __stdcall
74
# endif
75
#elif defined(__WATCOMC__)
76
# define FX_ENTRY extern
77
# define FX_CALL __stdcall
78
#elif defined (__IBMC__) || defined (__IBMCPP__)
79
/* IBM Visual Age C/C++: */
80
# define FX_ENTRY extern
81
# define FX_CALL __stdcall
82
#elif defined(__DJGPP__)
83
# define FX_ENTRY extern
84
# define FX_CALL
85
#elif defined(__MINGW32__)
86
# define FX_ENTRY extern
87
# define FX_CALL __stdcall
88
#elif defined(__unix__)
89
# define FX_ENTRY extern
90
# define FX_CALL
91
#elif defined(__APPLE__)
92
# define FX_ENTRY extern
93
# define FX_CALL
94
#elif defined(__MWERKS__)
95
# if macintosh
96
# define FX_ENTRY extern
97
# define FX_CALL
98
# else /* !macintosh */
99
# error "Unknown MetroWerks target platform"
100
# endif /* !macintosh */
101
#else
102
# warning define FX_ENTRY & FX_CALL for your compiler
103
# define FX_ENTRY extern
104
# define FX_CALL
105
#endif
106
107
/*
108
** x86 compiler specific stuff
109
*/
110
#if defined(__BORLANDC_)
111
# define REALMODE
112
113
# define REGW( a, b ) ((a).x.b)
114
# define REGB( a, b ) ((a).h.b)
115
# define INT86( a, b, c ) int86(a,b,c)
116
# define INT86X( a, b, c, d ) int86x(a,b,c,d)
117
118
# define RM_SEG( a ) FP_SEG( a )
119
# define RM_OFF( a ) FP_OFF( a )
120
#elif defined(__WATCOMC__)
121
# undef FP_SEG
122
# undef FP_OFF
123
124
# define REGW( a, b ) ((a).w.b)
125
# define REGB( a, b ) ((a).h.b)
126
# define INT86( a, b, c ) int386(a,b,c)
127
# define INT86X( a, b, c, d ) int386x(a,b,c,d)
128
129
# define RM_SEG( a ) ( ( ( ( FxU32 ) (a) ) & 0x000F0000 ) >> 4 )
130
# define RM_OFF( a ) ( ( FxU16 ) (a) )
131
#endif
132
133
#endif /* !__3DFX_H__ */
134
135