2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-12-26 18:55:37 +01:00

engine: allow ref dlls to use convar_t

This commit is contained in:
Alibek Omarov 2023-05-20 20:20:14 +03:00
parent 6a1f96a2c6
commit 70b26a13c2
3 changed files with 6 additions and 2 deletions

View File

@ -231,7 +231,7 @@ static ref_api_t gEngfuncs =
Cvar_VariableString,
Cvar_SetValue,
Cvar_Set,
(void*)Cvar_RegisterVariable,
Cvar_RegisterVariable,
Cvar_FullSet,
Cmd_AddRefCommand,

View File

@ -58,6 +58,7 @@ typedef struct convar_s
#define CVAR_TO_BOOL( x ) ((x) && ((x)->value != 0.0f) ? true : false )
#ifndef REF_DLL
cvar_t *Cvar_GetList( void );
#define Cvar_FindVar( name ) Cvar_FindVarExt( name, 0 )
convar_t *Cvar_FindVarExt( const char *var_name, int ignore_group );
@ -81,5 +82,6 @@ qboolean Cvar_CommandWithPrivilegeCheck( convar_t *v, qboolean isPrivileged );
void Cvar_Init( void );
void Cvar_PostFSInit( void );
void Cvar_Unlink( int group );
#endif // REF_DLL
#endif//CVAR_H

View File

@ -238,6 +238,7 @@ typedef struct remap_info_s
model_t *model; // for catch model changes
} remap_info_t;
typedef struct convar_s convar_t;
struct con_nprint_s;
struct engine_studio_api_s;
struct r_studio_interface_s;
@ -270,7 +271,7 @@ typedef struct ref_api_s
const char *(*pfnGetCvarString)( const char *szName );
void (*Cvar_SetValue)( const char *name, float value );
void (*Cvar_Set)( const char *name, const char *value );
void (*Cvar_RegisterVariable)( cvar_t *var );
void (*Cvar_RegisterVariable)( convar_t *var );
void (*Cvar_FullSet)( const char *var_name, const char *value, int flags );
// command handlers
@ -659,6 +660,7 @@ typedef int (*REFAPI)( int version, ref_interface_t *pFunctionTable, ref_api_t*
ENGINE_SHARED_CVAR( f, r_sprite_lighting ) \
ENGINE_SHARED_CVAR( f, r_drawviewmodel ) \
ENGINE_SHARED_CVAR( f, r_glowshellfreq ) \
ENGINE_SHARED_CVAR( f, r_lighting_modulate ) \
#define DECLARE_ENGINE_SHARED_CVAR_LIST() \
ENGINE_SHARED_CVAR_LIST( DECLARE_ENGINE_SHARED_CVAR )