`adequate' temporary fix for r_lightmap_components 1

This commit is contained in:
Bill Currie 2002-05-28 04:11:40 +00:00
parent f3132162ae
commit 7a3b63418b
4 changed files with 22 additions and 3 deletions

View file

@ -482,4 +482,6 @@ extern char loadname[32];
extern byte *mod_base;
extern byte mod_novis[MAX_MAP_LEAFS / 8];
extern int mod_lightmap_bytes;
#endif // _MODEL_H

View file

@ -37,6 +37,7 @@ static const char rcsid[] =
#endif
#include "QF/cvar.h"
#include "QF/model.h"
#include "r_cvar.h"
#include "r_dynamic.h"
@ -146,6 +147,21 @@ r_particles_max_f (cvar_t *var)
R_MaxParticlesCheck (r_particles, var);
}
static void
r_lightmap_components_f (cvar_t *var)
{
switch (var->int_val) {
case 1:
mod_lightmap_bytes = 1;
break;
case 3:
case 4:
default:
mod_lightmap_bytes = 3;
break;
}
}
void
R_Init_Cvars (void)
{
@ -278,7 +294,8 @@ R_Init_Cvars (void)
"Set the number of lines displayed in the "
"various graphs");
r_lightmap_components = Cvar_Get ("r_lightmap_components", "3", CVAR_ROM,
NULL, "Lightmap texture components. 1 "
r_lightmap_components_f,
"Lightmap texture components. 1 "
"is greyscale, 3 is RGB, 4 is RGBA.");
r_maxedges = Cvar_Get ("r_maxedges", "0", CVAR_NONE, NULL,
"Sets the maximum number of edges");

View file

@ -35,7 +35,7 @@ static const char rcsid[] =
#include "QF/cvar.h"
#include "QF/model.h"
const int mod_lightmap_bytes = 1;
int mod_lightmap_bytes = 1;
void Mod_LoadBrushModel (model_t *mod, void *buffer);

View file

@ -35,7 +35,7 @@ static const char rcsid[] =
#include "QF/cvar.h"
#include "QF/model.h"
const int mod_lightmap_bytes = 1;
int mod_lightmap_bytes = 1;
void Mod_LoadBrushModel (model_t *mod, void *buffer);