File: glide3x-preprocessor

package info (click to toggle)
glide 2002.04.10ds1-15
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 59,556 kB
  • sloc: ansic: 290,125; asm: 23,305; sh: 8,089; pascal: 3,854; makefile: 1,276; perl: 73
file content (182 lines) | stat: -rw-r--r-- 5,910 bytes parent folder | download | duplicates (6)
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
Status: applied

Index: b/glide3x/cvg/glide3/src/fxglide.h
===================================================================
--- a/glide3x/cvg/glide3/src/fxglide.h
+++ b/glide3x/cvg/glide3/src/fxglide.h
@@ -1417,7 +1417,7 @@ extern GrGCFuncs _curGCFuncs;
 
 #ifdef GLIDE3
 #define GR_STATE_ENTRY(name, type, args) \
-   type _##name## args
+   type _ ## name args
 #else
 #define GR_STATE_ENTRY(name, type, args) \
    GR_ENTRY(name, type, args)
Index: b/glide3x/h3/glide3/src/fxglide.h
===================================================================
--- a/glide3x/h3/glide3/src/fxglide.h
+++ b/glide3x/h3/glide3/src/fxglide.h
@@ -1512,7 +1512,7 @@ extern GrGCFuncs _curGCFuncs;
 
 #ifdef GLIDE3
 #define GR_STATE_ENTRY(name, type, args) \
-   type _##name## args
+   type _ ## name args
 #else
 #define GR_STATE_ENTRY(name, type, args) \
    GR_ENTRY(name, type, args)
@@ -1831,7 +1831,7 @@ extern FxU32 threadValueLinux;
 #define CUR_TRI_PROC(__checkValidP, __cullP) \
   (*gc->archDispatchProcs.coorModeTriVector)[__checkValidP][__cullP]
 #define INVALIDATE(regset) {\
-  gc->state.invalid |= ##regset##BIT; \
+  gc->state.invalid |= regset ## BIT; \
   gc->triSetupProc = CUR_TRI_PROC(FXTRUE, (gc->state.cull_mode != GR_CULL_DISABLE)); \
 }
 
Index: b/glide3x/h5/glide3/src/fxglide.h
===================================================================
--- a/glide3x/h5/glide3/src/fxglide.h
+++ b/glide3x/h5/glide3/src/fxglide.h
@@ -2119,7 +2119,7 @@ extern GrGCFuncs _curGCFuncs;
 
 #ifdef GLIDE3
 #define GR_STATE_ENTRY(name, type, args) \
-   type _##name## args
+   type _ ## name args
 #else
 #define GR_STATE_ENTRY(name, type, args) \
    GR_ENTRY(name, type, args)
@@ -2626,13 +2626,13 @@ extern FxU32 threadValueLinux;
 #define CUR_TRI_PROC(__checkValidP, __cullP) \
   (*gc->archDispatchProcs.coorModeTriVector)[__checkValidP][__cullP]
 #define INVALIDATE(regset) {\
-  gc->state.invalid |= ##regset##BIT; \
+  gc->state.invalid |= regset ## BIT; \
   gc->triSetupProc = CUR_TRI_PROC(FXTRUE, (gc->state.cull_mode != GR_CULL_DISABLE)); \
 }
 
 #define INVALIDATE_TMU(tmu, regset) {\
   INVALIDATE(tmuConfig); \
-  gc->state.tmuInvalid[tmu] |= ##regset##BIT; \
+  gc->state.tmuInvalid[tmu] |= regset ## BIT; \
 }
   
 void 
Index: b/glide3x/cvg/glide3/src/distate.c
===================================================================
--- a/glide3x/cvg/glide3/src/distate.c
+++ b/glide3x/cvg/glide3/src/distate.c
@@ -166,25 +166,25 @@
  */
 
 #define STOREARG(function, arg) \
-gc->state.stateArgs.##function##Args.arg = arg
+gc->state.stateArgs.function ## Args.arg = arg
 
 #define LOADARG(function, arg) \
-gc->state.stateArgs.##function##Args.arg
+gc->state.stateArgs.function ## Args.arg
 
 #define INVALIDATE(regset) \
-gc->state.invalid |= ##regset##BIT
+gc->state.invalid |= regset ## BIT
 
 #define NOTVALID(regset) \
-(gc->state.invalid & ##regset##BIT)
+(gc->state.invalid & regset ## BIT)
 
 #define SETVALID(regset) \
-(gc->state.invalid &= ~(##regset##BIT))
+(gc->state.invalid &= ~(regset ## BIT))
 
 #define ENABLEMODE(mode) \
-gc->state.grEnableArgs.##mode## = GR_MODE_ENABLE;
+gc->state.grEnableArgs.mode = GR_MODE_ENABLE;
 
 #define DISABLEMODE(mode) \
-gc->state.grEnableArgs.##mode## = GR_MODE_DISABLE;
+gc->state.grEnableArgs.mode = GR_MODE_DISABLE;
 
 /*-------------------------------------------------------------------
   Function: grAlphaBlendFunction
Index: b/glide3x/h3/glide3/src/distate.c
===================================================================
--- a/glide3x/h3/glide3/src/distate.c
+++ b/glide3x/h3/glide3/src/distate.c
@@ -203,23 +203,23 @@
  */
 
 #define STOREARG(function, arg) \
-gc->state.stateArgs.##function##Args.arg = arg
+gc->state.stateArgs.function ## Args.arg = arg
 
 #define LOADARG(function, arg) \
-gc->state.stateArgs.##function##Args.arg
+gc->state.stateArgs.function ## Args.arg
 
 
 #define NOTVALID(regset) \
-(gc->state.invalid & ##regset##BIT)
+(gc->state.invalid & regset ## BIT)
 
 #define SETVALID(regset) \
-(gc->state.invalid &= ~(##regset##BIT))
+(gc->state.invalid &= ~(regset ## BIT))
 
 #define ENABLEMODE(mode) \
-gc->state.grEnableArgs.##mode## = GR_MODE_ENABLE;
+gc->state.grEnableArgs.mode = GR_MODE_ENABLE;
 
 #define DISABLEMODE(mode) \
-gc->state.grEnableArgs.##mode## = GR_MODE_DISABLE;
+gc->state.grEnableArgs.mode = GR_MODE_DISABLE;
 
 /*-------------------------------------------------------------------
   Function: grAlphaBlendFunction
Index: b/glide3x/h5/glide3/src/distate.c
===================================================================
--- a/glide3x/h5/glide3/src/distate.c
+++ b/glide3x/h5/glide3/src/distate.c
@@ -349,31 +349,31 @@
  */
 
 #define STOREARG_TMU(function, tmu, arg) \
-gc->state.stateArgs.##function##Args.arg[tmu] = arg
+gc->state.stateArgs.function ## Args.arg[tmu] = arg
 
 #define LOADARG_TMU(function, tmu, arg) \
-gc->state.stateArgs.##function##Args.arg[tmu]
+gc->state.stateArgs.function ## Args.arg[tmu]
 
 #define STOREARG(function, arg) \
-gc->state.stateArgs.##function##Args.arg = arg
+gc->state.stateArgs.function ## Args.arg = arg
 
 #define LOADARG(function, arg) \
-gc->state.stateArgs.##function##Args.arg
+gc->state.stateArgs.function ## Args.arg
 
 #define NOTVALID(regset) \
-(gc->state.invalid & ##regset##BIT)
+(gc->state.invalid & regset ## BIT)
 
 #define NOTVALID_TMU(tmu, regset) \
-(gc->state.tmuInvalid[tmu] & ##regset##BIT)
+(gc->state.tmuInvalid[tmu] & regset ## BIT)
 
 #define SETVALID(regset) \
-(gc->state.invalid &= ~(##regset##BIT))
+(gc->state.invalid &= ~(regset ## BIT))
 
 #define ENABLEMODE(mode) \
-gc->state.grEnableArgs.##mode## = GR_MODE_ENABLE;
+gc->state.grEnableArgs.mode = GR_MODE_ENABLE;
 
 #define DISABLEMODE(mode) \
-gc->state.grEnableArgs.##mode## = GR_MODE_DISABLE;
+gc->state.grEnableArgs.mode = GR_MODE_DISABLE;
 
 /*-------------------------------------------------------------------
   Function: grAlphaBlendFunction