-void R_ViewChanged (vrect_t *pvrect, int lineadj, float aspect); // called whenever r_refdef or vid change
-
-// LordHavoc: changed this for sake of GLQuake
-void R_InitSky (byte *src, int bytesperpixel); // called at level load
-
-int R_VisibleCullBox (vec3_t mins, vec3_t maxs);
-
-void R_NewMap (void);
-
-#include "r_decals.h"
-
-void R_ParseParticleEffect (void);
-void R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count);
-void R_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent);
-void R_RocketTrail2 (vec3_t start, vec3_t end, int type, entity_t *ent);
-void R_SparkShower (vec3_t org, vec3_t dir, int count);
-void R_BloodPuff (vec3_t org, vec3_t vel, int count);
-void R_FlameCube (vec3_t mins, vec3_t maxs, int count);
-void R_Flames (vec3_t org, vec3_t vel, int count);
-
-void R_EntityParticles (entity_t *ent);
-void R_BlobExplosion (vec3_t org);
-void R_ParticleExplosion (vec3_t org, int smoke);
-void R_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength);
-void R_LavaSplash (vec3_t org);
-void R_TeleportSplash (vec3_t org);
-
-void R_NewExplosion(vec3_t org);
-
-void R_PushDlights (void);
-void R_DrawWorld (void);
-//void R_RenderDlights (void);
-void R_DrawParticles (void);
-void R_MoveParticles (void);
-void R_DrawExplosions (void);
-void R_MoveExplosions (void);
+
+
+void R_InitSky (qbyte *src, int bytesperpixel); // called at level load
+
+void R_WorldVisibility(entity_render_t *ent);
+void R_DrawWorld(entity_render_t *ent);
+void R_DrawParticles(void);
+void R_DrawExplosions(void);
+
+#define gl_solid_format 3
+#define gl_alpha_format 4
+
+//#define PARANOID 1
+
+int R_CullBox(const vec3_t mins, const vec3_t maxs);
+int PVS_CullBox(const vec3_t mins, const vec3_t maxs);
+int R_CullSphere(const vec3_t origin, vec_t radius);
+int PVS_CullSphere(const vec3_t origin, vec_t radius);
+
+extern qboolean fogenabled;
+extern vec3_t fogcolor;
+extern vec_t fogdensity;
+#define calcfog(v) (exp(-(fogdensity*fogdensity*(((v)[0] - r_origin[0])*((v)[0] - r_origin[0])+((v)[1] - r_origin[1])*((v)[1] - r_origin[1])+((v)[2] - r_origin[2])*((v)[2] - r_origin[2])))))
+#define calcfogbyte(v) ((qbyte) (bound(0, ((int) ((float) (calcfog((v)) * 255.0f))), 255)))
+
+// start a farclip measuring session
+void R_FarClip_Start(vec3_t origin, vec3_t direction, vec_t startfarclip);
+// enlarge farclip to accomodate box
+void R_FarClip_Box(vec3_t mins, vec3_t maxs);
+// return farclip value
+float R_FarClip_Finish(void);
+
+// updates farclip distance so it is large enough for the specified box
+// (*important*)
+void R_Mesh_EnlargeFarClipBBox(vec3_t mins, vec3_t maxs);
+
+#include "r_modules.h"
+
+#include "meshqueue.h"
+
+extern float overbrightscale;
+
+#include "r_lerpanim.h"
+
+extern cvar_t r_render;
+
+extern cvar_t r_textureunits;
+extern cvar_t gl_dither;
+
+#include "gl_backend.h"
+
+#include "r_light.h"
+
+void R_TimeReport(char *name);
+void R_TimeReport_Start(void);
+void R_TimeReport_End(void);
+
+// r_stain
+void R_Stain(const vec3_t origin, float radius, int cr1, int cg1, int cb1, int ca1, int cr2, int cg2, int cb2, int ca2);
+
+void R_DrawWorldCrosshair(void);
+void R_Draw2DCrosshair(void);
+
+void R_CalcBeam_Vertex3f(float *vert, const vec3_t org1, const vec3_t org2, float width);
+void R_DrawSprite(int blendfunc1, int blendfunc2, rtexture_t *texture, int depthdisable, const vec3_t origin, const vec3_t left, const vec3_t up, float scalex1, float scalex2, float scaley1, float scaley2, float cr, float cg, float cb, float ca);
+
+#endif
+