26 #define MAXLEFTCLIPEDGES 100
29 #define FULLY_CLIPPED_CACHED 0x80000000
30 #define FRAMECOUNT_MASK 0x7FFFFFFF
76 int skybox_planes[12] = {2,-128, 0,-128, 2,128, 1,128, 0,128, 1,-128};
78 int box_surfedges[24] = { 1,2,3,4, -1,5,6,7, 8,9,-6,10, -2,-7,-9,11,
79 12,-3,-11,-8, -12,-10,-5,-4};
80 int box_edges[24] = { 1,2, 2,3, 3,4, 4,1, 1,5, 5,6, 6,2, 7,8, 8,6, 5,7, 8,3, 7,4};
85 { {0,-1,0}, {-1,0,0} },
86 { {0,1,0}, {0,0,-1} },
87 { {0,-1,0}, {1,0,0} },
88 { {1,0,0}, {0,0,-1} },
89 { {0,-1,0}, {0,0,-1} },
90 { {-1,0,0}, {0,0,-1} }
132 for (
i=0 ;
i<6 ;
i++)
151 for (
i=0 ;
i<24 ;
i++)
157 for(
i=0 ;
i<12 ;
i++)
183 for (
i=0 ;
i<8 ;
i++)
184 for (
j=0 ;
j<3 ;
j++)
188 for (
i=0 ;
i<6 ;
i++)
195 for (
i=0 ;
i<6 ;
i++)
204 for (
i=0 ;
i<6 ;
i++)
224 vec3_t local, transformed;
227 float scale, lzi0, u0, v0;
248 lzi0 = 1.0 / transformed[2];
252 u0 = (
xcenter + scale*transformed[0]);
259 v0 = (
ycenter - scale*transformed[1]);
265 ceilv0 = (
int) ceil(v0);
277 r_lzi1 = 1.0 / transformed[2];
338 u_step = ((
r_u1 - u0) / (
r_v1 - v0));
339 u = u0 + ((float)
v - v0) * u_step;
350 u_step = ((u0 -
r_u1) / (v0 -
r_v1));
354 edge->
u_step = u_step*0x100000;
355 edge->
u = u*0x100000 + 0xFFFFF;
382 while (pcheck->
next && pcheck->
next->
u < u_check)
383 pcheck = pcheck->
next;
487 }
while ((clip = clip->
next) !=
NULL);
508 if (!pedge_t->
surfs[0])
572 if (clipflags &
mask)
795 for ( ; pedges ; pedges = pedges->
pnext)
838 pplane = psurf->
plane;