Browse Source

engine, ref: add sprite and studio cvars to shared cvars list

pull/2/head
Alibek Omarov 3 years ago
parent
commit
a777e7c80d
  1. 1
      engine/client/client.h
  2. 6
      engine/client/ref_common.c
  3. 4
      engine/ref_api.h
  4. 4
      ref_gl/gl_sprite.c
  5. 7
      ref_gl/gl_studio.c
  6. 4
      ref_soft/r_sprite.c
  7. 7
      ref_soft/r_studio.c

1
engine/client/client.h

@ -679,7 +679,6 @@ extern convar_t *cl_fixtimerate; @@ -679,7 +679,6 @@ extern convar_t *cl_fixtimerate;
extern convar_t *hud_scale;
extern convar_t *gl_showtextures;
extern convar_t *cl_bmodelinterp;
extern convar_t *cl_righthand;
extern convar_t *cl_lw; // local weapons
extern convar_t *cl_charset;
extern convar_t *cl_trace_messages;

6
engine/client/ref_common.c

@ -658,6 +658,12 @@ qboolean R_Init( void ) @@ -658,6 +658,12 @@ qboolean R_Init( void )
Cvar_Get( "tracerblue", "0.4", 0, "tracer blue component weight ( 0 - 1.0 )" );
Cvar_Get( "traceralpha", "0.5", 0, "tracer alpha amount ( 0 - 1.0 )" );
Cvar_Get( "r_sprite_lerping", "1", FCVAR_ARCHIVE, "enables sprite animation lerping" );
Cvar_Get( "r_sprite_lighting", "1", FCVAR_ARCHIVE, "enables sprite lighting (blood etc)" );
Cvar_Get( "r_drawviewmodel", "1", 0, "draw firstperson weapon model" );
Cvar_Get( "r_glowshellfreq", "2.2", 0, "glowing shell frequency update" );
// cvars that are expected to exist by client.dll
// refdll should just get pointer to them
Cvar_Get( "r_drawentities", "1", FCVAR_CHEAT, "render entities" );

4
engine/ref_api.h

@ -656,6 +656,10 @@ typedef void (*REF_HUMANREADABLE_NAME)( char *out, size_t len ); @@ -656,6 +656,10 @@ typedef void (*REF_HUMANREADABLE_NAME)( char *out, size_t len );
ENGINE_SHARED_CVAR( f, tracergreen ) \
ENGINE_SHARED_CVAR( f, tracerblue ) \
ENGINE_SHARED_CVAR( f, traceralpha ) \
ENGINE_SHARED_CVAR( f, r_sprite_lerping ) \
ENGINE_SHARED_CVAR( f, r_sprite_lighting ) \
ENGINE_SHARED_CVAR( f, r_drawviewmodel ) \
ENGINE_SHARED_CVAR( f, r_glowshellfreq ) \
#define DECLARE_ENGINE_SHARED_CVAR_LIST() \
ENGINE_SHARED_CVAR_LIST( DECLARE_ENGINE_SHARED_CVAR )

4
ref_gl/gl_sprite.c

@ -24,8 +24,6 @@ GNU General Public License for more details. @@ -24,8 +24,6 @@ GNU General Public License for more details.
#define MAPSPRITE_SIZE 128
#define GLARE_FALLOFF 19000.0f
cvar_t *r_sprite_lerping;
cvar_t *r_sprite_lighting;
char sprite_name[MAX_QPATH];
char group_suffix[8];
static uint r_texFlags = 0;
@ -40,8 +38,6 @@ R_SpriteInit @@ -40,8 +38,6 @@ R_SpriteInit
*/
void R_SpriteInit( void )
{
r_sprite_lerping = gEngfuncs.Cvar_Get( "r_sprite_lerping", "1", FCVAR_ARCHIVE, "enables sprite animation lerping" );
r_sprite_lighting = gEngfuncs.Cvar_Get( "r_sprite_lighting", "1", FCVAR_ARCHIVE, "enables sprite lighting (blood etc)" );
}
/*

7
ref_gl/gl_studio.c

@ -34,8 +34,6 @@ typedef struct @@ -34,8 +34,6 @@ typedef struct
model_t *model;
} player_model_t;
cvar_t *r_glowshellfreq;
cvar_t r_shadows = { "r_shadows", "0", 0 };
static vec3_t hullcolor[8] =
@ -125,8 +123,7 @@ typedef struct @@ -125,8 +123,7 @@ typedef struct
// studio-related cvars
static cvar_t *r_studio_sort_textures;
static cvar_t *r_drawviewmodel;
cvar_t *cl_righthand = NULL;
static cvar_t *cl_righthand = NULL;
static cvar_t *r_studio_drawelements;
static r_studio_interface_t *pStudioDraw;
@ -152,11 +149,9 @@ R_StudioInit @@ -152,11 +149,9 @@ R_StudioInit
void R_StudioInit( void )
{
r_studio_sort_textures = gEngfuncs.Cvar_Get( "r_studio_sort_textures", "0", FCVAR_ARCHIVE, "change draw order for additive meshes" );
r_drawviewmodel = gEngfuncs.Cvar_Get( "r_drawviewmodel", "1", 0, "draw firstperson weapon model" );
r_studio_drawelements = gEngfuncs.Cvar_Get( "r_studio_drawelements", "1", FCVAR_ARCHIVE, "use glDrawElements for studiomodels" );
Matrix3x4_LoadIdentity( g_studio.rotationmatrix );
r_glowshellfreq = gEngfuncs.Cvar_Get( "r_glowshellfreq", "2.2", 0, "glowing shell frequency update" );
// g-cont. cvar disabled by Valve
// gEngfuncs.Cvar_RegisterVariable( &r_shadows );

4
ref_soft/r_sprite.c

@ -24,8 +24,6 @@ GNU General Public License for more details. @@ -24,8 +24,6 @@ GNU General Public License for more details.
#define MAPSPRITE_SIZE 128
#define GLARE_FALLOFF 19000.0f
cvar_t *r_sprite_lerping;
cvar_t *r_sprite_lighting;
char sprite_name[MAX_QPATH];
char group_suffix[8];
static uint r_texFlags = 0;
@ -40,8 +38,6 @@ R_SpriteInit @@ -40,8 +38,6 @@ R_SpriteInit
*/
void R_SpriteInit( void )
{
r_sprite_lerping = gEngfuncs.Cvar_Get( "r_sprite_lerping", "1", FCVAR_ARCHIVE, "enables sprite animation lerping" );
r_sprite_lighting = gEngfuncs.Cvar_Get( "r_sprite_lighting", "1", FCVAR_ARCHIVE, "enables sprite lighting (blood etc)" );
}
/*

7
ref_soft/r_studio.c

@ -34,8 +34,6 @@ typedef struct @@ -34,8 +34,6 @@ typedef struct
model_t *model;
} player_model_t;
cvar_t *r_glowshellfreq;
cvar_t r_shadows = { "r_shadows", "0", 0 };
static vec3_t hullcolor[8] =
@ -122,8 +120,7 @@ typedef struct @@ -122,8 +120,7 @@ typedef struct
// studio-related cvars
static cvar_t *r_studio_sort_textures;
static cvar_t *r_drawviewmodel;
cvar_t *cl_righthand = NULL;
static cvar_t *cl_righthand = NULL;
static cvar_t *r_studio_drawelements;
static r_studio_interface_t *pStudioDraw;
@ -150,10 +147,8 @@ void R_StudioInit( void ) @@ -150,10 +147,8 @@ void R_StudioInit( void )
{
r_studio_sort_textures = gEngfuncs.Cvar_Get( "r_studio_sort_textures", "0", FCVAR_ARCHIVE, "change draw order for additive meshes" );
r_drawviewmodel = gEngfuncs.Cvar_Get( "r_drawviewmodel", "1", 0, "draw firstperson weapon model" );
r_studio_drawelements = gEngfuncs.Cvar_Get( "r_studio_drawelements", "1", FCVAR_ARCHIVE, "use glDrawElements for studiomodels" );
Matrix3x4_LoadIdentity( g_studio.rotationmatrix );
r_glowshellfreq = gEngfuncs.Cvar_Get( "r_glowshellfreq", "2.2", 0, "glowing shell frequency update" );
// g-cont. cvar disabled by Valve
// gEngfuncs.Cvar_RegisterVariable( &r_shadows );

Loading…
Cancel
Save