mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-27 23:34:29 +00:00
ref: fix compiling errors
This commit is contained in:
parent
199ebfed48
commit
971f9b6de5
@ -3803,7 +3803,7 @@ static cl_enginefunc_t gEngfuncs =
|
|||||||
Platform_GetMousePos,
|
Platform_GetMousePos,
|
||||||
pfnIsNoClipping,
|
pfnIsNoClipping,
|
||||||
CL_GetLocalPlayer,
|
CL_GetLocalPlayer,
|
||||||
pfnGetViewModel,
|
CL_GetViewModel,
|
||||||
CL_GetEntityByIndex,
|
CL_GetEntityByIndex,
|
||||||
pfnGetClientTime,
|
pfnGetClientTime,
|
||||||
pfnCalcShake,
|
pfnCalcShake,
|
||||||
|
@ -816,7 +816,7 @@ static pmtrace_t pfnPlayerTrace( float *start, float *end, int traceFlags, int i
|
|||||||
return PM_PlayerTraceExt( clgame.pmove, start, end, traceFlags, clgame.pmove->numphysent, clgame.pmove->physents, ignore_pe, NULL );
|
return PM_PlayerTraceExt( clgame.pmove, start, end, traceFlags, clgame.pmove->numphysent, clgame.pmove->physents, ignore_pe, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
static pmtrace_t *pfnTraceLine( float *start, float *end, int flags, int usehull, int ignore_pe )
|
pmtrace_t *PM_TraceLine( float *start, float *end, int flags, int usehull, int ignore_pe )
|
||||||
{
|
{
|
||||||
static pmtrace_t tr;
|
static pmtrace_t tr;
|
||||||
int old_usehull;
|
int old_usehull;
|
||||||
@ -948,17 +948,6 @@ static pmtrace_t *pfnTraceLineEx( float *start, float *end, int flags, int usehu
|
|||||||
return &tr;
|
return &tr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct msurface_s *pfnTraceSurface( int ground, float *vstart, float *vend )
|
|
||||||
{
|
|
||||||
physent_t *pe;
|
|
||||||
|
|
||||||
if( ground < 0 || ground >= clgame.pmove->numphysent )
|
|
||||||
return NULL; // bad ground
|
|
||||||
|
|
||||||
pe = &clgame.pmove->physents[ground];
|
|
||||||
return PM_TraceSurface( pe, vstart, vend );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============
|
===============
|
||||||
CL_InitClientMove
|
CL_InitClientMove
|
||||||
@ -1000,7 +989,7 @@ void CL_InitClientMove( void )
|
|||||||
clgame.pmove->PM_TruePointContents = pfnTruePointContents;
|
clgame.pmove->PM_TruePointContents = pfnTruePointContents;
|
||||||
clgame.pmove->PM_HullPointContents = pfnHullPointContents;
|
clgame.pmove->PM_HullPointContents = pfnHullPointContents;
|
||||||
clgame.pmove->PM_PlayerTrace = pfnPlayerTrace;
|
clgame.pmove->PM_PlayerTrace = pfnPlayerTrace;
|
||||||
clgame.pmove->PM_TraceLine = pfnTraceLine;
|
clgame.pmove->PM_TraceLine = PM_TraceLine;
|
||||||
clgame.pmove->RandomLong = COM_RandomLong;
|
clgame.pmove->RandomLong = COM_RandomLong;
|
||||||
clgame.pmove->RandomFloat = COM_RandomFloat;
|
clgame.pmove->RandomFloat = COM_RandomFloat;
|
||||||
clgame.pmove->PM_GetModelType = pfnGetModelType;
|
clgame.pmove->PM_GetModelType = pfnGetModelType;
|
||||||
|
@ -104,7 +104,7 @@ static void pfnSetEfragsFreeList( efrag_t *list )
|
|||||||
clgame.free_efrags = list;
|
clgame.free_efrags = list;
|
||||||
}
|
}
|
||||||
|
|
||||||
static model_t *pfnGetDefaultSprite( ref_defaultsprite_e spr )
|
static model_t *pfnGetDefaultSprite( enum ref_defaultsprite_e spr )
|
||||||
{
|
{
|
||||||
switch( spr )
|
switch( spr )
|
||||||
{
|
{
|
||||||
@ -148,9 +148,9 @@ static void pfnGetPredictedOrigin( vec3_t v )
|
|||||||
VectorCopy( cl.simorg, v );
|
VectorCopy( cl.simorg, v );
|
||||||
}
|
}
|
||||||
|
|
||||||
static byte *pfnCL_GetPaletteColor(int color) // clgame.palette[color]
|
static color24 *pfnCL_GetPaletteColor(int color) // clgame.palette[color]
|
||||||
{
|
{
|
||||||
return clgame.palette[color];
|
return &clgame.palette[color];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pfnCL_GetScreenInfo( int *width, int *height ) // clgame.scrInfo, ptrs may be NULL
|
static void pfnCL_GetScreenInfo( int *width, int *height ) // clgame.scrInfo, ptrs may be NULL
|
||||||
|
@ -28,9 +28,9 @@ R_SpeedsMessage
|
|||||||
*/
|
*/
|
||||||
qboolean R_SpeedsMessage( char *out, size_t size )
|
qboolean R_SpeedsMessage( char *out, size_t size )
|
||||||
{
|
{
|
||||||
if( gEngfuncs.drawFuncs.R_SpeedsMessage != NULL )
|
if( gEngfuncs.drawFuncs->R_SpeedsMessage != NULL )
|
||||||
{
|
{
|
||||||
if( gEngfuncs.drawFuncs.R_SpeedsMessage( out, size ))
|
if( gEngfuncs.drawFuncs->R_SpeedsMessage( out, size ))
|
||||||
return true;
|
return true;
|
||||||
// otherwise pass to default handler
|
// otherwise pass to default handler
|
||||||
}
|
}
|
||||||
|
@ -1196,9 +1196,9 @@ int R_CreateDecalList( decallist_t *pList )
|
|||||||
total = DecalListAdd( pList, total );
|
total = DecalListAdd( pList, total );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( gEngfuncs.drawFuncs.R_CreateStudioDecalList )
|
if( gEngfuncs.drawFuncs->R_CreateStudioDecalList )
|
||||||
{
|
{
|
||||||
total += gEngfuncs.drawFuncs.R_CreateStudioDecalList( pList, total );
|
total += gEngfuncs.drawFuncs->R_CreateStudioDecalList( pList, total );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1280,8 +1280,8 @@ void R_ClearAllDecals( void )
|
|||||||
R_DecalUnlink( pdecal );
|
R_DecalUnlink( pdecal );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( gEngfuncs.drawFuncs.R_ClearStudioDecals )
|
if( gEngfuncs.drawFuncs->R_ClearStudioDecals )
|
||||||
{
|
{
|
||||||
gEngfuncs.drawFuncs.R_ClearStudioDecals();
|
gEngfuncs.drawFuncs->R_ClearStudioDecals();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2117,7 +2117,7 @@ void R_TextureList_f( void )
|
|||||||
|
|
||||||
if( image->flags & TF_NORMALMAP )
|
if( image->flags & TF_NORMALMAP )
|
||||||
gEngfuncs.Con_Printf( "normal " );
|
gEngfuncs.Con_Printf( "normal " );
|
||||||
else Con_Printf( "diffuse " );
|
else gEngfuncs.Con_Printf( "diffuse " );
|
||||||
|
|
||||||
switch( image->encode )
|
switch( image->encode )
|
||||||
{
|
{
|
||||||
@ -2148,7 +2148,7 @@ void R_TextureList_f( void )
|
|||||||
gEngfuncs.Con_Printf( "clamp " );
|
gEngfuncs.Con_Printf( "clamp " );
|
||||||
else if( image->flags & TF_BORDER )
|
else if( image->flags & TF_BORDER )
|
||||||
gEngfuncs.Con_Printf( "border " );
|
gEngfuncs.Con_Printf( "border " );
|
||||||
else Con_Printf( "repeat " );
|
else gEngfuncs.Con_Printf( "repeat " );
|
||||||
gEngfuncs.Con_Printf( " %d ", image->depth );
|
gEngfuncs.Con_Printf( " %d ", image->depth );
|
||||||
gEngfuncs.Con_Printf( " %s\n", image->name );
|
gEngfuncs.Con_Printf( " %s\n", image->name );
|
||||||
}
|
}
|
||||||
|
@ -1106,11 +1106,11 @@ int R_RenderFrame( const ref_viewpass_t *rvp )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// completely override rendering
|
// completely override rendering
|
||||||
if( gEngfuncs.drawFuncs.GL_RenderFrame != NULL )
|
if( gEngfuncs.drawFuncs->GL_RenderFrame != NULL )
|
||||||
{
|
{
|
||||||
tr.fCustomRendering = true;
|
tr.fCustomRendering = true;
|
||||||
|
|
||||||
if( gEngfuncs.drawFuncs.GL_RenderFrame( rvp ))
|
if( gEngfuncs.drawFuncs->GL_RenderFrame( rvp ))
|
||||||
{
|
{
|
||||||
R_GatherPlayerLight();
|
R_GatherPlayerLight();
|
||||||
tr.realframecount++;
|
tr.realframecount++;
|
||||||
|
@ -45,16 +45,16 @@ static void R_DrawVBO( qboolean drawlightmaps, qboolean drawtextures );
|
|||||||
|
|
||||||
byte *Mod_GetCurrentVis( void )
|
byte *Mod_GetCurrentVis( void )
|
||||||
{
|
{
|
||||||
if( gEngfuncs.drawFuncs.Mod_GetCurrentVis && tr.fCustomRendering )
|
if( gEngfuncs.drawFuncs->Mod_GetCurrentVis && tr.fCustomRendering )
|
||||||
return gEngfuncs.drawFuncs.Mod_GetCurrentVis();
|
return gEngfuncs.drawFuncs->Mod_GetCurrentVis();
|
||||||
return RI.visbytes;
|
return RI.visbytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mod_SetOrthoBounds( const float *mins, const float *maxs )
|
void Mod_SetOrthoBounds( const float *mins, const float *maxs )
|
||||||
{
|
{
|
||||||
if( gEngfuncs.drawFuncs.GL_OrthoBounds )
|
if( gEngfuncs.drawFuncs->GL_OrthoBounds )
|
||||||
{
|
{
|
||||||
gEngfuncs.drawFuncs.GL_OrthoBounds( mins, maxs );
|
gEngfuncs.drawFuncs->GL_OrthoBounds( mins, maxs );
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector2Average( maxs, mins, world_orthocenter );
|
Vector2Average( maxs, mins, world_orthocenter );
|
||||||
@ -1840,7 +1840,7 @@ void R_GenerateVBO()
|
|||||||
{
|
{
|
||||||
// generate new array and new vbotexture node
|
// generate new array and new vbotexture node
|
||||||
vbo->array = Mem_Calloc( vbos.mempool, sizeof( vbovertex_t ) * vbo->array_len );
|
vbo->array = Mem_Calloc( vbos.mempool, sizeof( vbovertex_t ) * vbo->array_len );
|
||||||
Msg( "R_GenerateVBOs: allocated array of %d verts, texture %d\n", vbo->array_len, j );
|
gEngfuncs.Con_Printf( "R_GenerateVBOs: allocated array of %d verts, texture %d\n", vbo->array_len, j );
|
||||||
vbo->next = Mem_Calloc( vbos.mempool, sizeof( vboarray_t ) );
|
vbo->next = Mem_Calloc( vbos.mempool, sizeof( vboarray_t ) );
|
||||||
vbo = vbo->next;
|
vbo = vbo->next;
|
||||||
vbotex->next = Mem_Calloc( vbos.mempool, sizeof( vbotexture_t ) );
|
vbotex->next = Mem_Calloc( vbos.mempool, sizeof( vbotexture_t ) );
|
||||||
@ -1868,7 +1868,7 @@ void R_GenerateVBO()
|
|||||||
|
|
||||||
// allocate last array
|
// allocate last array
|
||||||
vbo->array = Mem_Calloc( vbos.mempool, sizeof( vbovertex_t ) * vbo->array_len );
|
vbo->array = Mem_Calloc( vbos.mempool, sizeof( vbovertex_t ) * vbo->array_len );
|
||||||
Msg( "R_GenerateVBOs: allocated array of %d verts\n", vbo->array_len );
|
gEngfuncs.Con_Printf( "R_GenerateVBOs: allocated array of %d verts\n", vbo->array_len );
|
||||||
|
|
||||||
// switch to list begin
|
// switch to list begin
|
||||||
vbo = vbos.arraylist;
|
vbo = vbos.arraylist;
|
||||||
@ -3528,10 +3528,10 @@ void GL_RebuildLightmaps( void )
|
|||||||
}
|
}
|
||||||
LM_UploadBlock( false );
|
LM_UploadBlock( false );
|
||||||
|
|
||||||
if( gEngfuncs.drawFuncs.GL_BuildLightmaps )
|
if( gEngfuncs.drawFuncs->GL_BuildLightmaps )
|
||||||
{
|
{
|
||||||
// build lightmaps on the client-side
|
// build lightmaps on the client-side
|
||||||
gEngfuncs.drawFuncs.GL_BuildLightmaps( );
|
gEngfuncs.drawFuncs->GL_BuildLightmaps( );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3611,10 +3611,10 @@ void GL_BuildLightmaps( void )
|
|||||||
|
|
||||||
LM_UploadBlock( false );
|
LM_UploadBlock( false );
|
||||||
|
|
||||||
if( gEngfuncs.drawFuncs.GL_BuildLightmaps )
|
if( gEngfuncs.drawFuncs->GL_BuildLightmaps )
|
||||||
{
|
{
|
||||||
// build lightmaps on the client-side
|
// build lightmaps on the client-side
|
||||||
gEngfuncs.drawFuncs.GL_BuildLightmaps( );
|
gEngfuncs.drawFuncs->GL_BuildLightmaps( );
|
||||||
}
|
}
|
||||||
|
|
||||||
// now gamma and brightness are valid
|
// now gamma and brightness are valid
|
||||||
|
Loading…
x
Reference in New Issue
Block a user