- removed more r_ header dependencies from the rest of the code.

SVN r3260 (trunk)
This commit is contained in:
Christoph Oelckers 2011-07-06 15:31:05 +00:00
commit 463c276014
36 changed files with 271 additions and 266 deletions

View file

@ -39,6 +39,7 @@
#include "r_sky.h"
#include "st_stuff.h"
#include "c_cvars.h"
#include "c_dispatch.h"
#include "v_video.h"
#include "stats.h"
#include "i_video.h"
@ -52,6 +53,7 @@
#include "r_3dfloors.h"
#include "v_palette.h"
#include "po_man.h"
#include "p_effect.h"
#include "st_start.h"
#include "v_font.h"
#include "r_data/colormaps.h"
@ -96,7 +98,6 @@ extern bool DrawFSHUD; // [RH] Defined in d_main.cpp
extern short *openings;
extern bool r_fakingunderwater;
extern "C" int fuzzviewheight;
EXTERN_CVAR (Bool, r_particles)
EXTERN_CVAR (Bool, cl_capfps)
// PRIVATE DATA DECLARATIONS -----------------------------------------------
@ -625,6 +626,32 @@ float R_GetVisibility ()
return CurrentVisibility;
}
//==========================================================================
//
// CCMD r_visibility
//
// Controls how quickly light ramps across a 1/z range. Set this, and it
// sets all the r_*Visibility variables (except r_SkyVisibilily, which is
// currently unused).
//
//==========================================================================
CCMD (r_visibility)
{
if (argv.argc() < 2)
{
Printf ("Visibility is %g\n", R_GetVisibility());
}
else if (!netgame)
{
R_SetVisibility ((float)atof (argv[1]));
}
else
{
Printf ("Visibility cannot be changed in net games.\n");
}
}
//==========================================================================
//
// R_SetViewSize
@ -829,7 +856,6 @@ void R_Init ()
R_InitPlanes ();
R_InitTranslationTables ();
R_InitShadeMaps();
R_InitParticles (); // [RH] Setup particle engine
R_InitColumnDrawers ();
colfunc = basecolfunc = R_DrawColumn;
@ -853,7 +879,6 @@ void R_Init ()
static void R_Shutdown ()
{
R_DeinitParticles();
R_DeinitTranslationTables();
R_DeinitPlanes();
R_DeinitColormaps ();
@ -1592,7 +1617,7 @@ void R_RenderActorView (AActor *actor, bool dontmaplines)
r_fakingunderwater = false;
// [RH] Setup particles for this frame
R_FindParticleSubsectors ();
P_FindParticleSubsectors ();
WallCycles.Clock();
DWORD savedflags = camera->renderflags;