mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 14:30:48 +00:00
change code style
This commit is contained in:
parent
2b9b039139
commit
bec4c4accc
17 changed files with 213 additions and 150 deletions
|
@ -477,7 +477,7 @@ void R_DrawSolidClippedSubmodelPolygons(model_t *pmodel, mnode_t *topnode);
|
|||
|
||||
void R_AliasDrawModel(void);
|
||||
void R_BeginEdgeFrame(void);
|
||||
void R_ScanEdges(void);
|
||||
void R_ScanEdges(surf_t *surface);
|
||||
void R_PushDlights(model_t *model);
|
||||
|
||||
extern void R_RotateBmodel (void);
|
||||
|
|
|
@ -170,7 +170,8 @@ R_Alias_clip_bottom (finalvert_t *pfv0, finalvert_t *pfv1,
|
|||
}
|
||||
|
||||
|
||||
int R_AliasClip (finalvert_t *in, finalvert_t *out, int flag, int count,
|
||||
int
|
||||
R_AliasClip (finalvert_t *in, finalvert_t *out, int flag, int count,
|
||||
void(*clip)(finalvert_t *pfv0, finalvert_t *pfv1, finalvert_t *out) )
|
||||
{
|
||||
int i,j,k;
|
||||
|
@ -216,7 +217,8 @@ int R_AliasClip (finalvert_t *in, finalvert_t *out, int flag, int count,
|
|||
R_AliasClipTriangle
|
||||
================
|
||||
*/
|
||||
void R_AliasClipTriangle (finalvert_t *index0, finalvert_t *index1, finalvert_t *index2)
|
||||
void
|
||||
R_AliasClipTriangle (finalvert_t *index0, finalvert_t *index1, finalvert_t *index2)
|
||||
{
|
||||
int i, k, pingpong;
|
||||
unsigned clipflags;
|
||||
|
|
|
@ -457,7 +457,8 @@ R_AliasTransformFinalVerts( int numpoints, finalvert_t *fv, dtrivertx_t *oldv, d
|
|||
R_AliasProjectAndClipTestFinalVert
|
||||
================
|
||||
*/
|
||||
void R_AliasProjectAndClipTestFinalVert( finalvert_t *fv )
|
||||
void
|
||||
R_AliasProjectAndClipTestFinalVert( finalvert_t *fv )
|
||||
{
|
||||
float zi;
|
||||
float x, y, z;
|
||||
|
@ -488,7 +489,8 @@ void R_AliasProjectAndClipTestFinalVert( finalvert_t *fv )
|
|||
R_AliasSetupSkin
|
||||
===============
|
||||
*/
|
||||
static qboolean R_AliasSetupSkin (void)
|
||||
static qboolean
|
||||
R_AliasSetupSkin (void)
|
||||
{
|
||||
image_t *pskindesc;
|
||||
|
||||
|
@ -692,14 +694,15 @@ R_AliasSetUpLerpData( dmdl_t *pmdl, float backlerp )
|
|||
}
|
||||
}
|
||||
|
||||
finalvert_t *finalverts, *finalverts_max;
|
||||
finalvert_t *finalverts = NULL, *finalverts_max = NULL;
|
||||
|
||||
/*
|
||||
================
|
||||
R_AliasDrawModel
|
||||
================
|
||||
*/
|
||||
void R_AliasDrawModel (void)
|
||||
void
|
||||
R_AliasDrawModel (void)
|
||||
{
|
||||
extern void (*d_pdrawspans)(void *);
|
||||
extern void R_PolysetDrawSpans8_Opaque( void * );
|
||||
|
|
|
@ -74,7 +74,8 @@ R_EntityRotate (vec3_t vec)
|
|||
R_RotateBmodel
|
||||
================
|
||||
*/
|
||||
void R_RotateBmodel (void)
|
||||
void
|
||||
R_RotateBmodel (void)
|
||||
{
|
||||
float angle, s, c, temp1[3][3], temp2[3][3], temp3[3][3];
|
||||
|
||||
|
@ -624,7 +625,8 @@ R_RecursiveWorldNode (mnode_t *node, int clipflags)
|
|||
R_RenderWorld
|
||||
================
|
||||
*/
|
||||
void R_RenderWorld (void)
|
||||
void
|
||||
R_RenderWorld (void)
|
||||
{
|
||||
|
||||
if (!r_drawworld->value)
|
||||
|
|
|
@ -32,7 +32,8 @@ static image_t *draw_chars; // 8*8 graphic characters
|
|||
RE_Draw_FindPic
|
||||
================
|
||||
*/
|
||||
image_t *RE_Draw_FindPic (char *name)
|
||||
image_t *
|
||||
RE_Draw_FindPic (char *name)
|
||||
{
|
||||
image_t *image;
|
||||
|
||||
|
@ -56,7 +57,8 @@ image_t *RE_Draw_FindPic (char *name)
|
|||
Draw_InitLocal
|
||||
===============
|
||||
*/
|
||||
void Draw_InitLocal (void)
|
||||
void
|
||||
Draw_InitLocal (void)
|
||||
{
|
||||
draw_chars = RE_Draw_FindPic ("conchars");
|
||||
if (!draw_chars)
|
||||
|
@ -76,7 +78,8 @@ It can be clipped to the top of the screen to allow the console to be
|
|||
smoothly scrolled off.
|
||||
================
|
||||
*/
|
||||
void RE_Draw_CharScaled(int x, int y, int num, float scale)
|
||||
void
|
||||
RE_Draw_CharScaled(int x, int y, int num, float scale)
|
||||
{
|
||||
pixel_t *dest;
|
||||
byte *source;
|
||||
|
@ -134,7 +137,8 @@ void RE_Draw_CharScaled(int x, int y, int num, float scale)
|
|||
RE_Draw_GetPicSize
|
||||
=============
|
||||
*/
|
||||
void RE_Draw_GetPicSize (int *w, int *h, char *pic)
|
||||
void
|
||||
RE_Draw_GetPicSize (int *w, int *h, char *pic)
|
||||
{
|
||||
image_t *gl;
|
||||
|
||||
|
@ -153,7 +157,8 @@ void RE_Draw_GetPicSize (int *w, int *h, char *pic)
|
|||
RE_Draw_StretchPicImplementation
|
||||
=============
|
||||
*/
|
||||
void RE_Draw_StretchPicImplementation (int x, int y, int w, int h, image_t *pic)
|
||||
void
|
||||
RE_Draw_StretchPicImplementation (int x, int y, int w, int h, image_t *pic)
|
||||
{
|
||||
pixel_t *dest;
|
||||
byte *source;
|
||||
|
@ -205,7 +210,8 @@ void RE_Draw_StretchPicImplementation (int x, int y, int w, int h, image_t *pic)
|
|||
RE_Draw_StretchPic
|
||||
=============
|
||||
*/
|
||||
void RE_Draw_StretchPic (int x, int y, int w, int h, char *name)
|
||||
void
|
||||
RE_Draw_StretchPic (int x, int y, int w, int h, char *name)
|
||||
{
|
||||
image_t *pic;
|
||||
|
||||
|
@ -223,7 +229,8 @@ void RE_Draw_StretchPic (int x, int y, int w, int h, char *name)
|
|||
RE_Draw_StretchRaw
|
||||
=============
|
||||
*/
|
||||
void RE_Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data)
|
||||
void
|
||||
RE_Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data)
|
||||
{
|
||||
image_t pic;
|
||||
|
||||
|
@ -238,7 +245,8 @@ void RE_Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *d
|
|||
Draw_Pic
|
||||
=============
|
||||
*/
|
||||
void RE_Draw_PicScaled(int x, int y, char *name, float scale)
|
||||
void
|
||||
RE_Draw_PicScaled(int x, int y, char *name, float scale)
|
||||
{
|
||||
image_t *pic;
|
||||
pixel_t *dest;
|
||||
|
@ -320,7 +328,8 @@ This repeats a 64*64 tile graphic to fill the screen around a sized down
|
|||
refresh window.
|
||||
=============
|
||||
*/
|
||||
void RE_Draw_TileClear (int x, int y, int w, int h, char *name)
|
||||
void
|
||||
RE_Draw_TileClear (int x, int y, int w, int h, char *name)
|
||||
{
|
||||
int i, j;
|
||||
byte *psrc;
|
||||
|
@ -369,7 +378,8 @@ RE_Draw_Fill
|
|||
Fills a box of pixels with a single color
|
||||
=============
|
||||
*/
|
||||
void RE_Draw_Fill (int x, int y, int w, int h, int c)
|
||||
void
|
||||
RE_Draw_Fill (int x, int y, int w, int h, int c)
|
||||
{
|
||||
pixel_t *dest;
|
||||
int u, v;
|
||||
|
@ -406,7 +416,8 @@ RE_Draw_FadeScreen
|
|||
|
||||
================
|
||||
*/
|
||||
void RE_Draw_FadeScreen (void)
|
||||
void
|
||||
RE_Draw_FadeScreen (void)
|
||||
{
|
||||
int x,y;
|
||||
|
||||
|
|
|
@ -29,11 +29,6 @@ low depth complexity -- 1 to 3 or so
|
|||
have a sentinal at both ends?
|
||||
*/
|
||||
|
||||
|
||||
edge_t *r_edges, *edge_p, *edge_max;
|
||||
|
||||
surf_t *surfaces, *surface_p, *surf_max;
|
||||
|
||||
// surfaces are generated in back to front order by the bsp, so if a surf
|
||||
// pointer is greater than another one, it should be drawn in front
|
||||
// surfaces[1] is the background, and is used as the active surface stack
|
||||
|
@ -84,13 +79,9 @@ EDGE SCANNING
|
|||
R_BeginEdgeFrame
|
||||
==============
|
||||
*/
|
||||
void R_BeginEdgeFrame (void)
|
||||
void
|
||||
R_BeginEdgeFrame (void)
|
||||
{
|
||||
edge_p = r_edges;
|
||||
edge_max = &r_edges[r_numallocatededges];
|
||||
|
||||
surface_p = &surfaces[2]; // background is surface 1,
|
||||
// surface 0 is a dummy
|
||||
surfaces[1].spans = NULL; // no background spans yet
|
||||
surfaces[1].flags = SURF_DRAWBACKGROUND;
|
||||
|
||||
|
@ -154,7 +145,8 @@ R_InsertNewEdges (edge_t *edgestoadd, edge_t *edgelist)
|
|||
R_RemoveEdges
|
||||
==============
|
||||
*/
|
||||
static void R_RemoveEdges (edge_t *pedge)
|
||||
static void
|
||||
R_RemoveEdges (edge_t *pedge)
|
||||
{
|
||||
|
||||
do
|
||||
|
@ -586,7 +578,7 @@ R_GenerateSpansBackward (void)
|
|||
R_CleanupSpan ();
|
||||
}
|
||||
|
||||
static void D_DrawSurfaces (void);
|
||||
static void D_DrawSurfaces (surf_t *surface);
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -601,7 +593,8 @@ Each surface has a linked list of its visible spans
|
|||
|
||||
==============
|
||||
*/
|
||||
void R_ScanEdges (void)
|
||||
void
|
||||
R_ScanEdges (surf_t *surface)
|
||||
{
|
||||
shift20_t iv, bottom;
|
||||
espan_t *basespan_p;
|
||||
|
@ -671,10 +664,10 @@ void R_ScanEdges (void)
|
|||
if (span_p > max_span_p)
|
||||
{
|
||||
// Draw stuff on screen
|
||||
D_DrawSurfaces ();
|
||||
D_DrawSurfaces (surface);
|
||||
|
||||
// clear the surface span pointers
|
||||
for (s = &surfaces[1] ; s<surface_p ; s++)
|
||||
for (s = &surfaces[1] ; s<surface ; s++)
|
||||
s->spans = NULL;
|
||||
|
||||
span_p = basespan_p;
|
||||
|
@ -703,7 +696,7 @@ void R_ScanEdges (void)
|
|||
(*pdrawfunc) ();
|
||||
|
||||
// draw whatever's left in the span list
|
||||
D_DrawSurfaces ();
|
||||
D_DrawSurfaces (surface);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1015,12 +1008,12 @@ To allow developers to see the polygon carving of the world
|
|||
=============
|
||||
*/
|
||||
static void
|
||||
D_DrawflatSurfaces (void)
|
||||
D_DrawflatSurfaces (surf_t *surface)
|
||||
{
|
||||
surf_t *s;
|
||||
int color = 0;
|
||||
|
||||
for (s = &surfaces[1] ; s<surface_p ; s++)
|
||||
for (s = &surfaces[1] ; s<surface ; s++)
|
||||
{
|
||||
if (!s->spans)
|
||||
continue;
|
||||
|
@ -1047,7 +1040,7 @@ May be called more than once a frame if the surf list overflows (higher res)
|
|||
==============
|
||||
*/
|
||||
static void
|
||||
D_DrawSurfaces (void)
|
||||
D_DrawSurfaces (surf_t *surface)
|
||||
{
|
||||
// currententity = NULL;
|
||||
// &r_worldentity;
|
||||
|
@ -1059,7 +1052,7 @@ D_DrawSurfaces (void)
|
|||
{
|
||||
surf_t *s;
|
||||
|
||||
for (s = &surfaces[1] ; s<surface_p ; s++)
|
||||
for (s = &surfaces[1] ; s<surface ; s++)
|
||||
{
|
||||
if (!s->spans)
|
||||
continue;
|
||||
|
@ -1077,7 +1070,7 @@ D_DrawSurfaces (void)
|
|||
}
|
||||
}
|
||||
else
|
||||
D_DrawflatSurfaces ();
|
||||
D_DrawflatSurfaces (surface);
|
||||
|
||||
currententity = NULL; //&r_worldentity;
|
||||
VectorSubtract (r_origin, vec3_origin, modelorg);
|
||||
|
|
|
@ -31,7 +31,8 @@ static int numr_images;
|
|||
R_ImageList_f
|
||||
===============
|
||||
*/
|
||||
void R_ImageList_f (void)
|
||||
void
|
||||
R_ImageList_f (void)
|
||||
{
|
||||
int i;
|
||||
image_t *image;
|
||||
|
@ -72,8 +73,8 @@ void R_ImageList_f (void)
|
|||
|
||||
//=======================================================
|
||||
|
||||
static image_t
|
||||
*R_FindFreeImage (void)
|
||||
static image_t *
|
||||
R_FindFreeImage (void)
|
||||
{
|
||||
image_t *image;
|
||||
int i;
|
||||
|
@ -101,7 +102,7 @@ R_LoadPic
|
|||
|
||||
================
|
||||
*/
|
||||
static image_t*
|
||||
static image_t *
|
||||
R_LoadPic (char *name, byte *pic, int width, int height, imagetype_t type)
|
||||
{
|
||||
image_t *image;
|
||||
|
@ -221,7 +222,8 @@ R_FindImage
|
|||
Finds or loads the given image
|
||||
===============
|
||||
*/
|
||||
image_t *R_FindImage (char *name, imagetype_t type)
|
||||
image_t *
|
||||
R_FindImage (char *name, imagetype_t type)
|
||||
{
|
||||
image_t *image;
|
||||
int i, len;
|
||||
|
@ -290,7 +292,8 @@ Any image that was not touched on this registration sequence
|
|||
will be freed.
|
||||
================
|
||||
*/
|
||||
void R_FreeUnusedImages (void)
|
||||
void
|
||||
R_FreeUnusedImages (void)
|
||||
{
|
||||
int i;
|
||||
image_t *image;
|
||||
|
@ -318,7 +321,8 @@ void R_FreeUnusedImages (void)
|
|||
R_InitImages
|
||||
===============
|
||||
*/
|
||||
void R_InitImages (void)
|
||||
void
|
||||
R_InitImages (void)
|
||||
{
|
||||
registration_sequence = 1;
|
||||
}
|
||||
|
@ -328,7 +332,8 @@ void R_InitImages (void)
|
|||
R_ShutdownImages
|
||||
===============
|
||||
*/
|
||||
void R_ShutdownImages (void)
|
||||
void
|
||||
R_ShutdownImages (void)
|
||||
{
|
||||
int i;
|
||||
image_t *image;
|
||||
|
|
|
@ -89,7 +89,8 @@ R_MarkLights (dlight_t *light, int bit, mnode_t *node, int r_dlightframecount)
|
|||
R_PushDlights
|
||||
=============
|
||||
*/
|
||||
void R_PushDlights (model_t *model)
|
||||
void
|
||||
R_PushDlights (model_t *model)
|
||||
{
|
||||
int i;
|
||||
dlight_t *l;
|
||||
|
@ -215,7 +216,8 @@ RecursiveLightPoint (mnode_t *node, vec3_t start, vec3_t end)
|
|||
R_LightPoint
|
||||
===============
|
||||
*/
|
||||
void R_LightPoint (vec3_t p, vec3_t color)
|
||||
void
|
||||
R_LightPoint (vec3_t p, vec3_t color)
|
||||
{
|
||||
vec3_t end;
|
||||
float r;
|
||||
|
|
|
@ -402,7 +402,8 @@ RE_Shutdown (void)
|
|||
R_NewMap
|
||||
===============
|
||||
*/
|
||||
void R_NewMap (void)
|
||||
void
|
||||
R_NewMap (void)
|
||||
{
|
||||
r_viewcluster = -1;
|
||||
}
|
||||
|
@ -445,8 +446,10 @@ R_ReallocateMapBuffers (void)
|
|||
return;
|
||||
}
|
||||
|
||||
surface_p = surfaces = lsurfs;
|
||||
surfaces = lsurfs;
|
||||
// set limits
|
||||
surf_max = &surfaces[r_cnumsurfs];
|
||||
surface_p = lsurfs;
|
||||
// surface 0 doesn't really exist; it's just a dummy because index 0
|
||||
// is used to indicate no edge attached to surface
|
||||
surfaces--;
|
||||
|
@ -482,6 +485,10 @@ R_ReallocateMapBuffers (void)
|
|||
return;
|
||||
}
|
||||
|
||||
// set limits
|
||||
edge_max = &r_edges[r_numallocatededges];
|
||||
edge_p = r_edges;
|
||||
|
||||
R_Printf(PRINT_ALL, "Allocated %d edges\n", r_numallocatededges);
|
||||
}
|
||||
|
||||
|
@ -946,6 +953,9 @@ R_EdgeDrawing (void)
|
|||
|
||||
// Set function pointer pdrawfunc used later in this function
|
||||
R_BeginEdgeFrame ();
|
||||
edge_p = r_edges;
|
||||
surface_p = &surfaces[2]; // background is surface 1,
|
||||
// surface 0 is a dummy
|
||||
|
||||
if (r_dspeeds->value)
|
||||
{
|
||||
|
@ -972,7 +982,7 @@ R_EdgeDrawing (void)
|
|||
|
||||
// Use the Global Edge Table to maintin the Active Edge Table: Draw the world as scanlines
|
||||
// Write the Z-Buffer (but no read)
|
||||
R_ScanEdges ();
|
||||
R_ScanEdges (surface_p);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -1702,7 +1712,8 @@ R_InitContext(void* win)
|
|||
return true;
|
||||
}
|
||||
|
||||
static qboolean CreateSDLWindow(int flags, int w, int h)
|
||||
static qboolean
|
||||
CreateSDLWindow(int flags, int w, int h)
|
||||
{
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
Uint32 Rmask, Gmask, Bmask, Amask;
|
||||
|
@ -1737,7 +1748,8 @@ static qboolean CreateSDLWindow(int flags, int w, int h)
|
|||
#endif
|
||||
}
|
||||
|
||||
static void SWimp_DestroyRender(void)
|
||||
static void
|
||||
SWimp_DestroyRender(void)
|
||||
{
|
||||
if (vid_buffer)
|
||||
{
|
||||
|
@ -2122,7 +2134,8 @@ SWimp_Shutdown( void )
|
|||
}
|
||||
|
||||
// this is only here so the functions in q_shared.c and q_shwin.c can link
|
||||
void Sys_Error (char *error, ...)
|
||||
void
|
||||
Sys_Error (char *error, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char text[1024];
|
||||
|
@ -2134,7 +2147,8 @@ void Sys_Error (char *error, ...)
|
|||
ri.Sys_Error (ERR_FATAL, "%s", text);
|
||||
}
|
||||
|
||||
void Com_Printf (char *fmt, ...)
|
||||
void
|
||||
Com_Printf (char *fmt, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char text[1024];
|
||||
|
|
|
@ -87,7 +87,8 @@ D_ViewChanged (void)
|
|||
R_PrintTimes
|
||||
=============
|
||||
*/
|
||||
void R_PrintTimes (void)
|
||||
void
|
||||
R_PrintTimes (void)
|
||||
{
|
||||
int r_time2;
|
||||
int ms;
|
||||
|
@ -107,7 +108,8 @@ void R_PrintTimes (void)
|
|||
R_PrintDSpeeds
|
||||
=============
|
||||
*/
|
||||
void R_PrintDSpeeds (void)
|
||||
void
|
||||
R_PrintDSpeeds (void)
|
||||
{
|
||||
int ms, dp_time, r_time2, rw_time, db_time, se_time, de_time, da_time;
|
||||
|
||||
|
@ -131,7 +133,8 @@ void R_PrintDSpeeds (void)
|
|||
R_PrintAliasStats
|
||||
=============
|
||||
*/
|
||||
void R_PrintAliasStats (void)
|
||||
void
|
||||
R_PrintAliasStats (void)
|
||||
{
|
||||
R_Printf(PRINT_ALL,"%3i polygon model drawn\n", r_amodels_drawn);
|
||||
}
|
||||
|
@ -143,7 +146,8 @@ void R_PrintAliasStats (void)
|
|||
R_TransformFrustum
|
||||
===================
|
||||
*/
|
||||
void R_TransformFrustum (void)
|
||||
void
|
||||
R_TransformFrustum (void)
|
||||
{
|
||||
int i;
|
||||
vec3_t v, v2;
|
||||
|
@ -170,7 +174,8 @@ void R_TransformFrustum (void)
|
|||
TransformVector
|
||||
================
|
||||
*/
|
||||
void TransformVector (vec3_t in, vec3_t out)
|
||||
void
|
||||
TransformVector (vec3_t in, vec3_t out)
|
||||
{
|
||||
out[0] = DotProduct(in,vright);
|
||||
out[1] = DotProduct(in,vup);
|
||||
|
@ -316,7 +321,8 @@ R_ViewChanged (vrect_t *vr)
|
|||
R_SetupFrame
|
||||
===============
|
||||
*/
|
||||
void R_SetupFrame (void)
|
||||
void
|
||||
R_SetupFrame (void)
|
||||
{
|
||||
int i;
|
||||
vrect_t vrect;
|
||||
|
|
|
@ -50,7 +50,8 @@ static int modfilelen;
|
|||
Mod_Modellist_f
|
||||
================
|
||||
*/
|
||||
void Mod_Modellist_f (void)
|
||||
void
|
||||
Mod_Modellist_f (void)
|
||||
{
|
||||
int i;
|
||||
model_t *mod;
|
||||
|
@ -73,7 +74,8 @@ void Mod_Modellist_f (void)
|
|||
Mod_Init
|
||||
===============
|
||||
*/
|
||||
void Mod_Init (void)
|
||||
void
|
||||
Mod_Init (void)
|
||||
{
|
||||
memset (mod_novis, 0xff, sizeof(mod_novis));
|
||||
}
|
||||
|
@ -184,7 +186,8 @@ Mod_ForName (char *name, qboolean crash)
|
|||
Mod_PointInLeaf
|
||||
===============
|
||||
*/
|
||||
mleaf_t *Mod_PointInLeaf (vec3_t p, model_t *model)
|
||||
mleaf_t *
|
||||
Mod_PointInLeaf (vec3_t p, model_t *model)
|
||||
{
|
||||
mnode_t *node;
|
||||
|
||||
|
@ -214,7 +217,8 @@ mleaf_t *Mod_PointInLeaf (vec3_t p, model_t *model)
|
|||
Mod_ClusterPVS
|
||||
==============
|
||||
*/
|
||||
byte *Mod_ClusterPVS (int cluster, model_t *model)
|
||||
byte *
|
||||
Mod_ClusterPVS (int cluster, model_t *model)
|
||||
{
|
||||
if (cluster == -1 || !model->vis)
|
||||
return mod_novis;
|
||||
|
@ -272,7 +276,8 @@ static int r_leaftovis[MAX_MAP_LEAFS];
|
|||
static int r_vistoleaf[MAX_MAP_LEAFS];
|
||||
static int r_numvisleafs;
|
||||
|
||||
void R_NumberLeafs (mnode_t *node)
|
||||
void
|
||||
R_NumberLeafs (mnode_t *node)
|
||||
{
|
||||
if (node->contents != -1)
|
||||
{
|
||||
|
@ -1108,7 +1113,8 @@ RE_BeginRegistration
|
|||
Specifies the model that will be used as the world
|
||||
=====================
|
||||
*/
|
||||
void RE_BeginRegistration (char *model)
|
||||
void
|
||||
RE_BeginRegistration (char *model)
|
||||
{
|
||||
char fullname[MAX_QPATH];
|
||||
cvar_t *flushmap;
|
||||
|
@ -1134,7 +1140,8 @@ RE_RegisterModel
|
|||
|
||||
=====================
|
||||
*/
|
||||
struct model_s *RE_RegisterModel (char *name)
|
||||
struct model_s *
|
||||
RE_RegisterModel (char *name)
|
||||
{
|
||||
model_t *mod;
|
||||
|
||||
|
@ -1180,7 +1187,8 @@ RE_EndRegistration
|
|||
|
||||
=====================
|
||||
*/
|
||||
void RE_EndRegistration (void)
|
||||
void
|
||||
RE_EndRegistration (void)
|
||||
{
|
||||
int i;
|
||||
model_t *mod;
|
||||
|
@ -1207,7 +1215,8 @@ void RE_EndRegistration (void)
|
|||
Mod_Free
|
||||
================
|
||||
*/
|
||||
void Mod_Free (model_t *mod)
|
||||
void
|
||||
Mod_Free (model_t *mod)
|
||||
{
|
||||
Hunk_Free (mod->extradata);
|
||||
memset (mod, 0, sizeof(*mod));
|
||||
|
@ -1218,7 +1227,8 @@ void Mod_Free (model_t *mod)
|
|||
Mod_FreeAll
|
||||
================
|
||||
*/
|
||||
void Mod_FreeAll (void)
|
||||
void
|
||||
Mod_FreeAll (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -26,13 +26,6 @@ extern cvar_t *sw_custom_particles;
|
|||
#define PARTICLE_66 1
|
||||
#define PARTICLE_OPAQUE 2
|
||||
|
||||
typedef struct
|
||||
{
|
||||
particle_t *particle;
|
||||
int level;
|
||||
int color;
|
||||
} partparms_t;
|
||||
|
||||
/*
|
||||
** R_DrawParticle
|
||||
**
|
||||
|
@ -46,10 +39,9 @@ typedef struct
|
|||
** function pointer route. This exacts some overhead, but
|
||||
** it pays off in clean and easy to understand code.
|
||||
*/
|
||||
static void R_DrawParticle(partparms_t *partparms)
|
||||
static void
|
||||
R_DrawParticle(particle_t *pparticle, int level)
|
||||
{
|
||||
particle_t *pparticle = partparms->particle;
|
||||
int level = partparms->level;
|
||||
vec3_t local, transformed;
|
||||
float zi;
|
||||
byte *pdest;
|
||||
|
@ -226,10 +218,9 @@ static void R_DrawParticle(partparms_t *partparms)
|
|||
** if we're using the asm path, it simply assigns a function pointer
|
||||
** and goes.
|
||||
*/
|
||||
void R_DrawParticles (void)
|
||||
void
|
||||
R_DrawParticles (void)
|
||||
{
|
||||
partparms_t partparms;
|
||||
|
||||
particle_t *p;
|
||||
int i;
|
||||
|
||||
|
@ -239,17 +230,15 @@ void R_DrawParticles (void)
|
|||
|
||||
for (p=r_newrefdef.particles, i=0 ; i<r_newrefdef.num_particles ; i++,p++)
|
||||
{
|
||||
int level;
|
||||
|
||||
if ( p->alpha > 0.66 )
|
||||
partparms.level = PARTICLE_OPAQUE;
|
||||
level = PARTICLE_OPAQUE;
|
||||
else if ( p->alpha > 0.33 )
|
||||
partparms.level = PARTICLE_66;
|
||||
level = PARTICLE_66;
|
||||
else
|
||||
partparms.level = PARTICLE_33;
|
||||
level = PARTICLE_33;
|
||||
|
||||
partparms.particle = p;
|
||||
partparms.color = p->color;
|
||||
|
||||
R_DrawParticle(&partparms);
|
||||
R_DrawParticle(p, level);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -911,7 +911,8 @@ R_PolygonScanRightEdge(espan_t *s_polygon_spans)
|
|||
** R_ClipAndDrawPoly
|
||||
*/
|
||||
// PGM - isturbulent was qboolean. changed to int to allow passing more flags
|
||||
void R_ClipAndDrawPoly ( float alpha, int isturbulent, qboolean textured )
|
||||
void
|
||||
R_ClipAndDrawPoly ( float alpha, int isturbulent, qboolean textured )
|
||||
{
|
||||
vec_t *pv;
|
||||
int i, nump;
|
||||
|
@ -1151,7 +1152,8 @@ R_PolygonCalculateGradients (void)
|
|||
** This should NOT be called externally since it doesn't do clipping!
|
||||
*/
|
||||
// PGM - iswater was qboolean. changed to support passing more flags
|
||||
static void R_DrawPoly(int iswater)
|
||||
static void
|
||||
R_DrawPoly(int iswater)
|
||||
{
|
||||
int i, nump;
|
||||
float ymin, ymax;
|
||||
|
@ -1207,7 +1209,8 @@ static void R_DrawPoly(int iswater)
|
|||
/*
|
||||
** R_DrawAlphaSurfaces
|
||||
*/
|
||||
void R_DrawAlphaSurfaces( void )
|
||||
void
|
||||
R_DrawAlphaSurfaces( void )
|
||||
{
|
||||
msurface_t *s = r_alpha_surfaces;
|
||||
|
||||
|
@ -1245,7 +1248,8 @@ void R_DrawAlphaSurfaces( void )
|
|||
/*
|
||||
** R_IMFlatShadedQuad
|
||||
*/
|
||||
void R_IMFlatShadedQuad( vec3_t a, vec3_t b, vec3_t c, vec3_t d, int color, float alpha )
|
||||
void
|
||||
R_IMFlatShadedQuad( vec3_t a, vec3_t b, vec3_t c, vec3_t d, int color, float alpha )
|
||||
{
|
||||
vec3_t s0, s1;
|
||||
|
||||
|
|
|
@ -110,45 +110,45 @@ static void R_PolysetScanLeftEdge_C(int height);
|
|||
// ======================
|
||||
// PGM
|
||||
// 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
||||
byte irtable[256] = { 79, 78, 77, 76, 75, 74, 73, 72, // black/white
|
||||
71, 70, 69, 68, 67, 66, 65, 64,
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // dark taupe
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
static byte irtable[256] = { 79, 78, 77, 76, 75, 74, 73, 72, // black/white
|
||||
71, 70, 69, 68, 67, 66, 65, 64,
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // dark taupe
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // slate grey
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
208, 208, 208, 208, 208, 208, 208, 208, // unused?'
|
||||
64, 66, 68, 70, 72, 74, 76, 78, // dark yellow
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // slate grey
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
208, 208, 208, 208, 208, 208, 208, 208, // unused?'
|
||||
64, 66, 68, 70, 72, 74, 76, 78, // dark yellow
|
||||
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // dark red
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // grey/tan
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // dark red
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // grey/tan
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
|
||||
64, 66, 68, 70, 72, 74, 76, 78, // chocolate
|
||||
68, 67, 66, 65, 64, 65, 66, 67, // mauve / teal
|
||||
68, 69, 70, 71, 72, 73, 74, 75,
|
||||
76, 76, 77, 77, 78, 78, 79, 79,
|
||||
64, 66, 68, 70, 72, 74, 76, 78, // chocolate
|
||||
68, 67, 66, 65, 64, 65, 66, 67, // mauve / teal
|
||||
68, 69, 70, 71, 72, 73, 74, 75,
|
||||
76, 76, 77, 77, 78, 78, 79, 79,
|
||||
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // more mauve
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // olive
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // more mauve
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // olive
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // maroon
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // sky blue
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // maroon
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // sky blue
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // olive again
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // nuclear green
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // bright yellow
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // olive again
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // nuclear green
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // bright yellow
|
||||
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // fire colors
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
208, 208, 64, 64, 70, 71, 72, 64, // mishmash1
|
||||
66, 68, 70, 64, 65, 66, 67, 68}; // mishmash2
|
||||
64, 65, 66, 67, 68, 69, 70, 71, // fire colors
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
208, 208, 64, 64, 70, 71, 72, 64, // mishmash1
|
||||
66, 68, 70, 64, 65, 66, 67, 68}; // mishmash2
|
||||
// PGM
|
||||
// ======================
|
||||
|
||||
|
@ -157,7 +157,8 @@ byte irtable[256] = { 79, 78, 77, 76, 75, 74, 73, 72, // black/white
|
|||
R_PolysetUpdateTables
|
||||
================
|
||||
*/
|
||||
void R_PolysetUpdateTables (void)
|
||||
void
|
||||
R_PolysetUpdateTables (void)
|
||||
{
|
||||
byte *s;
|
||||
|
||||
|
@ -179,7 +180,8 @@ void R_PolysetUpdateTables (void)
|
|||
R_DrawTriangle
|
||||
================
|
||||
*/
|
||||
void R_DrawTriangle( void )
|
||||
void
|
||||
R_DrawTriangle( void )
|
||||
{
|
||||
int dv1_ab, dv0_ac;
|
||||
int dv0_ab, dv1_ac;
|
||||
|
@ -239,7 +241,8 @@ void R_DrawTriangle( void )
|
|||
R_PolysetScanLeftEdge_C
|
||||
====================
|
||||
*/
|
||||
static void R_PolysetScanLeftEdge_C(int height)
|
||||
static void
|
||||
R_PolysetScanLeftEdge_C(int height)
|
||||
{
|
||||
do
|
||||
{
|
||||
|
@ -390,7 +393,8 @@ R_PolysetSetUpForLineScan(fixed8_t startvertu, fixed8_t startvertv,
|
|||
R_PolysetCalcGradients
|
||||
================
|
||||
*/
|
||||
static void R_PolysetCalcGradients (int skinwidth)
|
||||
static void
|
||||
R_PolysetCalcGradients (int skinwidth)
|
||||
{
|
||||
float xstepdenominv, ystepdenominv, t0, t1;
|
||||
float p01_minus_p21, p11_minus_p21, p00_minus_p20, p10_minus_p20;
|
||||
|
@ -449,7 +453,8 @@ static void R_PolysetCalcGradients (int skinwidth)
|
|||
R_PolysetDrawSpans8
|
||||
================
|
||||
*/
|
||||
void R_PolysetDrawSpans8_33( spanpackage_t *pspanpackage)
|
||||
void
|
||||
R_PolysetDrawSpans8_33( spanpackage_t *pspanpackage)
|
||||
{
|
||||
byte *lpdest;
|
||||
byte *lptex;
|
||||
|
@ -514,7 +519,8 @@ void R_PolysetDrawSpans8_33( spanpackage_t *pspanpackage)
|
|||
} while (pspanpackage->count != -999999);
|
||||
}
|
||||
|
||||
void R_PolysetDrawSpansConstant8_33( spanpackage_t *pspanpackage)
|
||||
void
|
||||
R_PolysetDrawSpansConstant8_33( spanpackage_t *pspanpackage)
|
||||
{
|
||||
pixel_t *lpdest;
|
||||
int lzi;
|
||||
|
@ -559,7 +565,8 @@ void R_PolysetDrawSpansConstant8_33( spanpackage_t *pspanpackage)
|
|||
} while (pspanpackage->count != -999999);
|
||||
}
|
||||
|
||||
void R_PolysetDrawSpans8_66(spanpackage_t *pspanpackage)
|
||||
void
|
||||
R_PolysetDrawSpans8_66(spanpackage_t *pspanpackage)
|
||||
{
|
||||
pixel_t *lpdest;
|
||||
pixel_t *lptex;
|
||||
|
@ -625,7 +632,8 @@ void R_PolysetDrawSpans8_66(spanpackage_t *pspanpackage)
|
|||
} while (pspanpackage->count != -999999);
|
||||
}
|
||||
|
||||
void R_PolysetDrawSpansConstant8_66( spanpackage_t *pspanpackage)
|
||||
void
|
||||
R_PolysetDrawSpansConstant8_66( spanpackage_t *pspanpackage)
|
||||
{
|
||||
pixel_t *lpdest;
|
||||
int lzi;
|
||||
|
@ -670,7 +678,8 @@ void R_PolysetDrawSpansConstant8_66( spanpackage_t *pspanpackage)
|
|||
} while (pspanpackage->count != -999999);
|
||||
}
|
||||
|
||||
void R_PolysetDrawSpans8_Opaque (spanpackage_t *pspanpackage)
|
||||
void
|
||||
R_PolysetDrawSpans8_Opaque (spanpackage_t *pspanpackage)
|
||||
{
|
||||
do
|
||||
{
|
||||
|
|
|
@ -37,6 +37,9 @@ clipplane_t view_clipplanes[4];
|
|||
|
||||
medge_t *r_pedge;
|
||||
|
||||
edge_t *r_edges = NULL, *edge_p = NULL, *edge_max = NULL;
|
||||
surf_t *surfaces = NULL, *surface_p = NULL, *surf_max = NULL;
|
||||
|
||||
static qboolean r_leftclipped, r_rightclipped;
|
||||
static qboolean makeleftedge, makerightedge;
|
||||
static qboolean r_nearzionly;
|
||||
|
@ -101,7 +104,8 @@ R_InitSkyBox
|
|||
|
||||
================
|
||||
*/
|
||||
void R_InitSkyBox (void)
|
||||
void
|
||||
R_InitSkyBox (void)
|
||||
{
|
||||
int i;
|
||||
extern model_t *loadmodel;
|
||||
|
@ -510,7 +514,8 @@ R_EmitCachedEdge (void)
|
|||
R_RenderFace
|
||||
================
|
||||
*/
|
||||
void R_RenderFace (msurface_t *fa, int clipflags)
|
||||
void
|
||||
R_RenderFace (msurface_t *fa, int clipflags)
|
||||
{
|
||||
int i;
|
||||
unsigned mask;
|
||||
|
@ -725,7 +730,8 @@ void R_RenderFace (msurface_t *fa, int clipflags)
|
|||
R_RenderBmodelFace
|
||||
================
|
||||
*/
|
||||
void R_RenderBmodelFace (bedge_t *pedges, msurface_t *psurf)
|
||||
void
|
||||
R_RenderBmodelFace (bedge_t *pedges, msurface_t *psurf)
|
||||
{
|
||||
int i;
|
||||
unsigned mask;
|
||||
|
|
|
@ -41,7 +41,8 @@ this performs a slight compression of the screen at the same time as
|
|||
the sine warp, to keep the edges from wrapping
|
||||
=============
|
||||
*/
|
||||
void D_WarpScreen (void)
|
||||
void
|
||||
D_WarpScreen (void)
|
||||
{
|
||||
int w, h;
|
||||
int u,v;
|
||||
|
@ -98,7 +99,8 @@ void D_WarpScreen (void)
|
|||
D_DrawTurbulent8Span
|
||||
=============
|
||||
*/
|
||||
static void D_DrawTurbulent8Span (void)
|
||||
static void
|
||||
D_DrawTurbulent8Span (void)
|
||||
{
|
||||
do
|
||||
{
|
||||
|
@ -116,7 +118,8 @@ static void D_DrawTurbulent8Span (void)
|
|||
Turbulent8
|
||||
=============
|
||||
*/
|
||||
void Turbulent8 (espan_t *pspan)
|
||||
void
|
||||
Turbulent8 (espan_t *pspan)
|
||||
{
|
||||
int snext, tnext;
|
||||
float spancountminus1;
|
||||
|
@ -252,7 +255,8 @@ NonTurbulent8 - this is for drawing scrolling textures. they're warping water te
|
|||
but the turbulence is automatically 0.
|
||||
=============
|
||||
*/
|
||||
void NonTurbulent8 (espan_t *pspan)
|
||||
void
|
||||
NonTurbulent8 (espan_t *pspan)
|
||||
{
|
||||
int snext, tnext;
|
||||
float spancountminus1;
|
||||
|
@ -402,7 +406,8 @@ D_DrawSpans16
|
|||
FIXME: actually make this subdivide by 16 instead of 8!!!
|
||||
=============
|
||||
*/
|
||||
void D_DrawSpans16 (espan_t *pspan)
|
||||
void
|
||||
D_DrawSpans16 (espan_t *pspan)
|
||||
{
|
||||
int spancount;
|
||||
unsigned char *pbase;
|
||||
|
@ -569,7 +574,8 @@ void D_DrawSpans16 (espan_t *pspan)
|
|||
D_DrawZSpans
|
||||
=============
|
||||
*/
|
||||
void D_DrawZSpans (espan_t *pspan)
|
||||
void
|
||||
D_DrawZSpans (espan_t *pspan)
|
||||
{
|
||||
int izistep;
|
||||
|
||||
|
|
|
@ -32,7 +32,8 @@ extern void R_ClipAndDrawPoly( float alpha, qboolean isturbulent, qboolean textu
|
|||
** Draw currententity / currentmodel as a single texture
|
||||
** mapped polygon
|
||||
*/
|
||||
void R_DrawSprite (void)
|
||||
void
|
||||
R_DrawSprite (void)
|
||||
{
|
||||
vec5_t *pverts;
|
||||
vec3_t left, up, right, down;
|
||||
|
|
Loading…
Reference in a new issue