mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-30 16:54:29 +00:00
ref_soft: Update API
This commit is contained in:
parent
842a15ee45
commit
a00256a61c
@ -212,9 +212,9 @@ static int GL_RenderGetParm( int parm, int arg )
|
|||||||
return gEngfuncs.Mod_SampleSizeForFace( &WORLDMODEL->surfaces[arg] );
|
return gEngfuncs.Mod_SampleSizeForFace( &WORLDMODEL->surfaces[arg] );
|
||||||
return LM_SAMPLE_SIZE;
|
return LM_SAMPLE_SIZE;
|
||||||
case PARM_SKY_SPHERE:
|
case PARM_SKY_SPHERE:
|
||||||
return gEngfuncs.CL_GetRenderParm( parm, arg ) && !tr.fCustomSkybox;
|
return ENGINE_GET_PARM_( parm, arg ) && !tr.fCustomSkybox;
|
||||||
default:
|
default:
|
||||||
return gEngfuncs.CL_GetRenderParm( parm, arg );
|
return ENGINE_GET_PARM_( parm, arg );
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -374,7 +374,7 @@ byte *GL_ApplyFilter( const byte *source, int width, int height )
|
|||||||
byte *out = (byte *)source;
|
byte *out = (byte *)source;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if( gEngfuncs.Host_IsQuakeCompatible() )
|
if( ENGINE_GET_PARM( PARM_QUAKE_COMPATIBLE ) )
|
||||||
return in;
|
return in;
|
||||||
|
|
||||||
for( i = 0; source && i < width * height; i++, in += 4 )
|
for( i = 0; source && i < width * height; i++, in += 4 )
|
||||||
|
@ -58,7 +58,7 @@ void CL_RunLightStyles( void )
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !gEngfuncs.CL_GetRenderParm( PARAM_GAMEPAUSED, 0 ) && frametime <= 0.1f )
|
if( !ENGINE_GET_PARM( PARAM_GAMEPAUSED ) && frametime <= 0.1f )
|
||||||
ls->time += frametime; // evaluate local time
|
ls->time += frametime; // evaluate local time
|
||||||
|
|
||||||
flight = (int)Q_floor( ls->time * 10 );
|
flight = (int)Q_floor( ls->time * 10 );
|
||||||
|
53
r_local.h
53
r_local.h
@ -658,12 +658,8 @@ void TriFogParams( float flDensity, int iFogSkybox );
|
|||||||
void TriCullFace( TRICULLSTYLE mode );
|
void TriCullFace( TRICULLSTYLE mode );
|
||||||
|
|
||||||
|
|
||||||
//
|
#define ENGINE_GET_PARM_ (*gEngfuncs.EngineGetParm)
|
||||||
// r_blitscreen.c
|
#define ENGINE_GET_PARM( parm ) ENGINE_GET_PARM_( (parm), 0 )
|
||||||
//
|
|
||||||
void R_BlitScreen();
|
|
||||||
void R_InitBlit();
|
|
||||||
|
|
||||||
|
|
||||||
extern ref_api_t gEngfuncs;
|
extern ref_api_t gEngfuncs;
|
||||||
extern ref_globals_t *gpGlobals;
|
extern ref_globals_t *gpGlobals;
|
||||||
@ -807,8 +803,6 @@ extern cvar_t *r_showhull;
|
|||||||
|
|
||||||
#define CLIP_EPSILON 0.001
|
#define CLIP_EPSILON 0.001
|
||||||
|
|
||||||
#define BACKFACE_EPSILON 0.01
|
|
||||||
|
|
||||||
// !!! if this is changed, it must be changed in asm_draw.h too !!!
|
// !!! if this is changed, it must be changed in asm_draw.h too !!!
|
||||||
#define NEAR_CLIP 0.01
|
#define NEAR_CLIP 0.01
|
||||||
|
|
||||||
@ -1218,6 +1212,49 @@ extern int r_maxvalidedgeoffset;
|
|||||||
extern int r_currentkey;
|
extern int r_currentkey;
|
||||||
extern int r_currentbkey;
|
extern int r_currentbkey;
|
||||||
|
|
||||||
|
//
|
||||||
|
// r_blitscreen.c
|
||||||
|
//
|
||||||
|
void R_InitCaches (void);
|
||||||
|
void R_BlitScreen();
|
||||||
|
void R_InitBlit();
|
||||||
|
|
||||||
|
//
|
||||||
|
// r_edge.c
|
||||||
|
//
|
||||||
|
void R_SurfacePatch (void);
|
||||||
|
void R_BeginEdgeFrame (void);
|
||||||
|
void R_RenderWorld (void);
|
||||||
|
void R_ScanEdges (void);
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// r_surf.c
|
||||||
|
//
|
||||||
|
void D_FlushCaches (void);
|
||||||
|
|
||||||
|
//
|
||||||
|
// r_draw.c
|
||||||
|
//
|
||||||
|
void Draw_Fill (int x, int y, int w, int h, int c);
|
||||||
|
|
||||||
|
//
|
||||||
|
// r_main.c
|
||||||
|
//
|
||||||
|
void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3]);
|
||||||
|
|
||||||
|
//
|
||||||
|
// r_misc.c
|
||||||
|
//
|
||||||
|
void R_SetupFrameQ (void);
|
||||||
|
void R_TransformFrustum (void);
|
||||||
|
void TransformVector (vec3_t in, vec3_t out);
|
||||||
|
|
||||||
|
//
|
||||||
|
// r_rast.c
|
||||||
|
//
|
||||||
|
void R_RenderBmodelFace (bedge_t *pedges, msurface_t *psurf);
|
||||||
|
void R_RenderFace (msurface_t *fa, int clipflags);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
8
r_main.c
8
r_main.c
@ -827,7 +827,7 @@ static void R_CheckFog( void )
|
|||||||
int i, cnt, count;
|
int i, cnt, count;
|
||||||
|
|
||||||
// quake global fog
|
// quake global fog
|
||||||
if( gEngfuncs.Host_IsQuakeCompatible( ))
|
if( ENGINE_GET_PARM( PARM_QUAKE_COMPATIBLE ))
|
||||||
{
|
{
|
||||||
if( !MOVEVARS->fog_settings )
|
if( !MOVEVARS->fog_settings )
|
||||||
{
|
{
|
||||||
@ -852,12 +852,12 @@ static void R_CheckFog( void )
|
|||||||
|
|
||||||
RI.fogEnabled = false;
|
RI.fogEnabled = false;
|
||||||
|
|
||||||
if( RI.onlyClientDraw || gEngfuncs.GetWaterLevel() < 3 || !RI.drawWorld || !RI.viewleaf )
|
if( RI.onlyClientDraw || ENGINE_GET_PARM( PARM_WATER_LEVEL ) < 3 || !RI.drawWorld || !RI.viewleaf )
|
||||||
{
|
{
|
||||||
if( RI.cached_waterlevel == 3 )
|
if( RI.cached_waterlevel == 3 )
|
||||||
{
|
{
|
||||||
// in some cases waterlevel jumps from 3 to 1. Catch it
|
// in some cases waterlevel jumps from 3 to 1. Catch it
|
||||||
RI.cached_waterlevel = gEngfuncs.GetWaterLevel();
|
RI.cached_waterlevel = ENGINE_GET_PARM( PARM_WATER_LEVEL );
|
||||||
RI.cached_contents = CONTENTS_EMPTY;
|
RI.cached_contents = CONTENTS_EMPTY;
|
||||||
//if( !RI.fogCustom ) pglDisable( GL_FOG );
|
//if( !RI.fogCustom ) pglDisable( GL_FOG );
|
||||||
}
|
}
|
||||||
@ -869,7 +869,7 @@ static void R_CheckFog( void )
|
|||||||
cnt = ent->curstate.skin;
|
cnt = ent->curstate.skin;
|
||||||
else cnt = RI.viewleaf->contents;
|
else cnt = RI.viewleaf->contents;
|
||||||
|
|
||||||
RI.cached_waterlevel = gEngfuncs.GetWaterLevel();
|
RI.cached_waterlevel = ENGINE_GET_PARM( PARM_WATER_LEVEL );
|
||||||
|
|
||||||
if( !IsLiquidContents( RI.cached_contents ) && IsLiquidContents( cnt ))
|
if( !IsLiquidContents( RI.cached_contents ) && IsLiquidContents( cnt ))
|
||||||
{
|
{
|
||||||
|
2
r_rast.c
2
r_rast.c
@ -562,7 +562,7 @@ void R_RenderFace (msurface_t *fa, int clipflags)
|
|||||||
// environment box surfaces to be emited
|
// environment box surfaces to be emited
|
||||||
/* if ( fa->texinfo->flags & SURF_SKY )
|
/* if ( fa->texinfo->flags & SURF_SKY )
|
||||||
{
|
{
|
||||||
R_EmitSkyBox ();
|
R_EmitSkyBox ();
|
||||||
return;
|
return;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
5
wscript
5
wscript
@ -30,17 +30,16 @@ def build(bld):
|
|||||||
name = get_subproject_name(bld)
|
name = get_subproject_name(bld)
|
||||||
bld.env = bld.all_envs[name]
|
bld.env = bld.all_envs[name]
|
||||||
|
|
||||||
libs = [ 'M' ]
|
libs = [ 'public', 'M' ]
|
||||||
|
|
||||||
source = bld.path.ant_glob(['*.c'])
|
source = bld.path.ant_glob(['*.c'])
|
||||||
|
|
||||||
source += [ '../engine/common/mathlib.c', '../engine/common/crtlib.c', '../engine/common/matrixlib.c' ]
|
|
||||||
|
|
||||||
includes = ['.',
|
includes = ['.',
|
||||||
'../engine',
|
'../engine',
|
||||||
'../engine/common',
|
'../engine/common',
|
||||||
'../engine/server',
|
'../engine/server',
|
||||||
'../engine/client',
|
'../engine/client',
|
||||||
|
'../public',
|
||||||
'../common',
|
'../common',
|
||||||
'../pm_shared' ]
|
'../pm_shared' ]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user