05 May 2017
This commit is contained in:
parent
1043641af1
commit
dc731d070f
|
@ -67,6 +67,7 @@ GNU General Public License for more details.
|
|||
#define PARM_GL_CONTEXT_TYPE 34 // opengl or opengles
|
||||
#define PARM_GLES_WRAPPER 35 //
|
||||
#define PARM_STENCIL_ACTIVE 36
|
||||
#define PARM_WATER_ALPHA 37
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -84,7 +85,7 @@ typedef enum
|
|||
TF_NEAREST = (1<<0), // disable texfilter
|
||||
TF_KEEP_SOURCE = (1<<1), // some images keep source
|
||||
TF_NOFLIP_TGA = (1<<2), // Steam background completely ignore tga attribute 0x20
|
||||
// reserved
|
||||
TF_EXPAND_SOURCE = (1<<3), // Don't keep source as 8-bit expand to RGBA
|
||||
// reserved
|
||||
TF_UNCOMPRESSED = (1<<5), // don't compress texture in video memory
|
||||
TF_CUBEMAP = (1<<6), // it's cubemap texture
|
||||
|
|
|
@ -64,8 +64,6 @@ typedef struct cldll_func_s
|
|||
// Xash3D extension
|
||||
int (*pfnGetRenderInterface)( int version, render_api_t *renderfuncs, render_interface_t *callback );
|
||||
void (*pfnClipMoveToEntity)( struct physent_s *pe, const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end, struct pmtrace_s *tr );
|
||||
void (*pfnUpdateEntityState)( cl_entity_t *ent, entity_state_t *newstate, int noInterp ); // custom interp
|
||||
void (*pfnInterpolateEntity)( cl_entity_t *ent, float lerpFrac );
|
||||
} cldll_func_t;
|
||||
|
||||
#endif//CDLL_EXP_H
|
|
@ -1143,9 +1143,6 @@ void CL_LinkPacketEntities( frame_t *frame )
|
|||
// NOTE: never pass sprites with rendercolor '0 0 0' it's a stupid Valve Hammer Editor bug
|
||||
if( !ent->curstate.rendercolor.r && !ent->curstate.rendercolor.g && !ent->curstate.rendercolor.b )
|
||||
ent->curstate.rendercolor.r = ent->curstate.rendercolor.g = ent->curstate.rendercolor.b = 255;
|
||||
|
||||
// apply scale to studiomodels and sprites only
|
||||
if( !ent->curstate.scale ) ent->curstate.scale = 1.0f;
|
||||
}
|
||||
|
||||
if( ent->curstate.aiment != 0 && ent->curstate.movetype != MOVETYPE_COMPOUND )
|
||||
|
|
|
@ -89,8 +89,6 @@ static dllfunc_t cdll_new_exports[] = // allowed only in SDK 2.3 and higher
|
|||
{ "HUD_GetRenderInterface", (void **)&clgame.dllFuncs.pfnGetRenderInterface }, // Xash3D ext
|
||||
{ "HUD_GetPlayerTeam", (void **)&clgame.dllFuncs.pfnGetPlayerTeam },
|
||||
{ "HUD_ClipMoveToEntity", (void **)&clgame.dllFuncs.pfnClipMoveToEntity }, // Xash3D ext
|
||||
{ "HUD_UpdateEntityState", (void **)&clgame.dllFuncs.pfnUpdateEntityState },
|
||||
{ "HUD_InterpolateEntity", (void **)&clgame.dllFuncs.pfnInterpolateEntity },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ GNU General Public License for more details.
|
|||
typedef struct
|
||||
{
|
||||
vec3_t pos;
|
||||
vec3_t color;
|
||||
float texcoord; // Y texture coordinate
|
||||
float width;
|
||||
} beamseg_t;
|
||||
|
@ -1129,6 +1128,7 @@ void R_BeamDraw( BEAM *pbeam, float frametime )
|
|||
|
||||
// compute segments from the new endpoints
|
||||
VectorSubtract( pbeam->target, pbeam->source, delta );
|
||||
VectorClear( pbeam->delta );
|
||||
|
||||
if( VectorLength( delta ) > 0.0000001f )
|
||||
VectorCopy( delta, pbeam->delta );
|
||||
|
@ -1214,7 +1214,7 @@ void R_BeamDraw( BEAM *pbeam, float frametime )
|
|||
// HACKHACK: get brightness from head entity
|
||||
pStart = R_BeamGetEntity( pbeam->startEntity );
|
||||
if( pStart && pStart->curstate.rendermode != kRenderNormal )
|
||||
pbeam->brightness = CL_FxBlend( pStart );
|
||||
pbeam->brightness = CL_FxBlend( pStart ) / 255.0f;
|
||||
}
|
||||
|
||||
if( FBitSet( pbeam->flags, FBEAM_FADEIN ))
|
||||
|
@ -1244,6 +1244,7 @@ void R_BeamDraw( BEAM *pbeam, float frametime )
|
|||
TriEnd();
|
||||
break;
|
||||
case TE_BEAMPOINTS:
|
||||
case TE_BEAMHOSE:
|
||||
TriBegin( TRI_TRIANGLE_STRIP );
|
||||
R_DrawSegs( pbeam->source, pbeam->delta, pbeam->width, pbeam->amplitude, pbeam->freq, pbeam->speed, pbeam->segments, pbeam->flags );
|
||||
TriEnd();
|
||||
|
@ -1818,8 +1819,8 @@ void CL_ParseViewBeam( sizebuf_t *msg, int beamType )
|
|||
vec3_t start, end;
|
||||
int modelIndex, startFrame;
|
||||
float frameRate, life, width;
|
||||
float noise, speed;
|
||||
int startEnt, endEnt;
|
||||
float noise, speed;
|
||||
float r, g, b, a;
|
||||
|
||||
switch( beamType )
|
||||
|
|
|
@ -1244,7 +1244,7 @@ int GL_LoadTexture( const char *name, const byte *buf, size_t size, int flags, i
|
|||
if( flags & TF_NOFLIP_TGA )
|
||||
picFlags |= IL_DONTFLIP_TGA;
|
||||
|
||||
if( flags & TF_KEEP_SOURCE )
|
||||
if( FBitSet( flags, TF_KEEP_SOURCE ) && !FBitSet( flags, TF_EXPAND_SOURCE ))
|
||||
picFlags |= IL_KEEP_8BIT;
|
||||
|
||||
// set some image flags
|
||||
|
|
|
@ -1236,6 +1236,8 @@ static int GL_RenderGetParm( int parm, int arg )
|
|||
return glConfig.wrapper;
|
||||
case PARM_STENCIL_ACTIVE:
|
||||
return glState.stencilEnabled;
|
||||
case PARM_WATER_ALPHA:
|
||||
return world.water_alpha;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -745,6 +745,7 @@ int COM_CompareFileTime( const char *filename1, const char *filename2, int *iCom
|
|||
*iCompare = Host_CompareFileTime( ft1, ft2 );
|
||||
bRet = 1;
|
||||
}
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
|
|
@ -255,14 +255,21 @@ convar_t *Cvar_Get( const char *name, const char *value, int flags, const char *
|
|||
// already existed?
|
||||
if( FBitSet( flags, FCVAR_GLCONFIG ))
|
||||
{
|
||||
// directly set value
|
||||
freestring( var->string );
|
||||
var->string = copystring( value );
|
||||
var->value = Q_atof( var->string );
|
||||
SetBits( var->flags, flags );
|
||||
// NOTE: cvars without description produced by Cvar_FullSet
|
||||
// which executed from the config file. So we don't need to
|
||||
// change value here: we *already* have actual value from config.
|
||||
// in other cases we need to rewrite them
|
||||
if( Q_strcmp( var->desc, "" ))
|
||||
{
|
||||
// directly set value
|
||||
freestring( var->string );
|
||||
var->string = copystring( value );
|
||||
var->value = Q_atof( var->string );
|
||||
SetBits( var->flags, flags );
|
||||
|
||||
// tell engine about changes
|
||||
Cvar_Changed( var );
|
||||
// tell engine about changes
|
||||
Cvar_Changed( var );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -698,7 +705,7 @@ void Cvar_SetGL_f( void )
|
|||
return;
|
||||
}
|
||||
|
||||
Cvar_FullSet( Cmd_Argv( 1 ), Cmd_Argv( 2 ), 0 );
|
||||
Cvar_FullSet( Cmd_Argv( 1 ), Cmd_Argv( 2 ), FCVAR_GLCONFIG );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -66,7 +66,7 @@ Studio models are position independent, so the cache manager can move them.
|
|||
#define STUDIO_NF_CHROME 0x0002
|
||||
#define STUDIO_NF_FULLBRIGHT 0x0004
|
||||
#define STUDIO_NF_NOMIPS 0x0008 // ignore mip-maps
|
||||
#define STUDIO_NF_ALPHA 0x0010 // don't use this!
|
||||
|
||||
#define STUDIO_NF_ADDITIVE 0x0020 // rendering with additive mode
|
||||
#define STUDIO_NF_MASKED 0x0040 // use texture with alpha channel
|
||||
#define STUDIO_NF_NORMALMAP 0x0080 // indexed normalmap
|
||||
|
|
Reference in New Issue