7 |
|
|
8 |
|
#include <string.h> |
9 |
|
|
10 |
+ |
#include "rtio.h" |
11 |
|
#include "radogl.h" |
12 |
|
#include "rhdriver.h" |
13 |
+ |
#include "rhd_odraw.h" |
14 |
|
|
15 |
|
#ifndef MAXGEO |
16 |
|
#define MAXGEO 8 /* maximum geometry list length */ |
36 |
|
|
37 |
|
#define FORALLPORT(pl,i) for (i=0;i<MAXPORT&&pl[i]!=NULL;i++) |
38 |
|
|
37 |
– |
extern char *nextword(); |
39 |
|
|
40 |
|
|
41 |
< |
gmNewGeom(file) /* add new geometry to next list */ |
42 |
< |
char *file; |
41 |
> |
|
42 |
> |
extern void |
43 |
> |
gmNewGeom( /* add new geometry to next list */ |
44 |
> |
char *file |
45 |
> |
) |
46 |
|
{ |
47 |
|
register int i, j; |
48 |
|
/* check if already in next list */ |
73 |
|
} |
74 |
|
|
75 |
|
|
76 |
< |
gmEndGeom() /* make next list current */ |
76 |
> |
extern void |
77 |
> |
gmEndGeom(void) /* make next list current */ |
78 |
|
{ |
79 |
|
register int i, j; |
80 |
|
|
93 |
|
} |
94 |
|
|
95 |
|
|
96 |
< |
int |
97 |
< |
gmDrawGeom() /* draw current list of octrees */ |
96 |
> |
extern int |
97 |
> |
gmDrawGeom(void) /* draw current list of octrees */ |
98 |
|
{ |
99 |
|
register int n; |
100 |
|
|
104 |
|
} |
105 |
|
|
106 |
|
|
107 |
< |
gmDrawPortals(r, g, b, a) /* draw portals with specific RGBA value */ |
108 |
< |
int r, g, b, a; |
107 |
> |
extern void |
108 |
> |
gmDrawPortals( /* draw portals with specific RGBA value */ |
109 |
> |
int r, |
110 |
> |
int g, |
111 |
> |
int b, |
112 |
> |
int a |
113 |
> |
) |
114 |
|
{ |
115 |
< |
if (!gmPortals || r<0 & g<0 & b<0 & a<0) |
115 |
> |
if (!gmPortals || (r<0) & (g<0) & (b<0) & (a<0)) |
116 |
|
return; |
117 |
|
glPushAttrib(GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT| |
118 |
|
GL_POLYGON_BIT|GL_LIGHTING_BIT); |
130 |
|
} |
131 |
|
|
132 |
|
|
133 |
< |
gmDepthLimit(dl, vorg, vdir) /* compute approximate depth limits for view */ |
134 |
< |
double dl[2]; |
135 |
< |
FVECT vorg, vdir; |
133 |
> |
extern void |
134 |
> |
gmDepthLimit( /* compute approximate depth limits for view */ |
135 |
> |
double dl[2], |
136 |
> |
FVECT vorg, |
137 |
> |
FVECT vdir |
138 |
> |
) |
139 |
|
{ |
140 |
|
FVECT v; |
141 |
|
double dcent; |
155 |
|
} |
156 |
|
|
157 |
|
|
158 |
< |
gmNewPortal(pflist) /* add portal file(s) to our new list */ |
159 |
< |
char *pflist; |
158 |
> |
extern void |
159 |
> |
gmNewPortal( /* add portal file(s) to our new list */ |
160 |
> |
char *pflist |
161 |
> |
) |
162 |
|
{ |
163 |
< |
register int i, j; |
163 |
> |
register int i; |
164 |
|
char newfile[128]; |
165 |
|
|
166 |
|
if (pflist == NULL) |
187 |
|
} |
188 |
|
|
189 |
|
|
190 |
< |
int |
191 |
< |
gmEndPortal() /* close portal list and return GL list */ |
190 |
> |
extern int |
191 |
> |
gmEndPortal(void) /* close portal list and return GL list */ |
192 |
|
{ |
193 |
|
register int n; |
194 |
|
|