ref: fix compiling errors

This commit is contained in:
Alibek Omarov 2019-03-16 04:24:27 +03:00
parent 199ebfed48
commit 971f9b6de5
8 changed files with 26 additions and 37 deletions

View File

@ -3803,7 +3803,7 @@ static cl_enginefunc_t gEngfuncs =
Platform_GetMousePos,
pfnIsNoClipping,
CL_GetLocalPlayer,
pfnGetViewModel,
CL_GetViewModel,
CL_GetEntityByIndex,
pfnGetClientTime,
pfnCalcShake,

View File

@ -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 );
}
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;
int old_usehull;
@ -948,17 +948,6 @@ static pmtrace_t *pfnTraceLineEx( float *start, float *end, int flags, int usehu
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
@ -1000,7 +989,7 @@ void CL_InitClientMove( void )
clgame.pmove->PM_TruePointContents = pfnTruePointContents;
clgame.pmove->PM_HullPointContents = pfnHullPointContents;
clgame.pmove->PM_PlayerTrace = pfnPlayerTrace;
clgame.pmove->PM_TraceLine = pfnTraceLine;
clgame.pmove->PM_TraceLine = PM_TraceLine;
clgame.pmove->RandomLong = COM_RandomLong;
clgame.pmove->RandomFloat = COM_RandomFloat;
clgame.pmove->PM_GetModelType = pfnGetModelType;

View File

@ -104,7 +104,7 @@ static void pfnSetEfragsFreeList( efrag_t *list )
clgame.free_efrags = list;
}
static model_t *pfnGetDefaultSprite( ref_defaultsprite_e spr )
static model_t *pfnGetDefaultSprite( enum ref_defaultsprite_e spr )
{
switch( spr )
{
@ -148,9 +148,9 @@ static void pfnGetPredictedOrigin( vec3_t 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

View File

@ -28,9 +28,9 @@ R_SpeedsMessage
*/
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;
// otherwise pass to default handler
}

View File

@ -1196,9 +1196,9 @@ int R_CreateDecalList( decallist_t *pList )
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 );
}
if( gEngfuncs.drawFuncs.R_ClearStudioDecals )
if( gEngfuncs.drawFuncs->R_ClearStudioDecals )
{
gEngfuncs.drawFuncs.R_ClearStudioDecals();
gEngfuncs.drawFuncs->R_ClearStudioDecals();
}
}

View File

@ -2117,7 +2117,7 @@ void R_TextureList_f( void )
if( image->flags & TF_NORMALMAP )
gEngfuncs.Con_Printf( "normal " );
else Con_Printf( "diffuse " );
else gEngfuncs.Con_Printf( "diffuse " );
switch( image->encode )
{
@ -2148,7 +2148,7 @@ void R_TextureList_f( void )
gEngfuncs.Con_Printf( "clamp " );
else if( image->flags & TF_BORDER )
gEngfuncs.Con_Printf( "border " );
else Con_Printf( "repeat " );
else gEngfuncs.Con_Printf( "repeat " );
gEngfuncs.Con_Printf( " %d ", image->depth );
gEngfuncs.Con_Printf( " %s\n", image->name );
}

View File

@ -1106,11 +1106,11 @@ int R_RenderFrame( const ref_viewpass_t *rvp )
}
// completely override rendering
if( gEngfuncs.drawFuncs.GL_RenderFrame != NULL )
if( gEngfuncs.drawFuncs->GL_RenderFrame != NULL )
{
tr.fCustomRendering = true;
if( gEngfuncs.drawFuncs.GL_RenderFrame( rvp ))
if( gEngfuncs.drawFuncs->GL_RenderFrame( rvp ))
{
R_GatherPlayerLight();
tr.realframecount++;

View File

@ -45,16 +45,16 @@ static void R_DrawVBO( qboolean drawlightmaps, qboolean drawtextures );
byte *Mod_GetCurrentVis( void )
{
if( gEngfuncs.drawFuncs.Mod_GetCurrentVis && tr.fCustomRendering )
return gEngfuncs.drawFuncs.Mod_GetCurrentVis();
if( gEngfuncs.drawFuncs->Mod_GetCurrentVis && tr.fCustomRendering )
return gEngfuncs.drawFuncs->Mod_GetCurrentVis();
return RI.visbytes;
}
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 );
@ -1840,7 +1840,7 @@ void R_GenerateVBO()
{
// generate new array and new vbotexture node
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 = vbo->next;
vbotex->next = Mem_Calloc( vbos.mempool, sizeof( vbotexture_t ) );
@ -1868,7 +1868,7 @@ void R_GenerateVBO()
// allocate last array
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
vbo = vbos.arraylist;
@ -3528,10 +3528,10 @@ void GL_RebuildLightmaps( void )
}
LM_UploadBlock( false );
if( gEngfuncs.drawFuncs.GL_BuildLightmaps )
if( gEngfuncs.drawFuncs->GL_BuildLightmaps )
{
// 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 );
if( gEngfuncs.drawFuncs.GL_BuildLightmaps )
if( gEngfuncs.drawFuncs->GL_BuildLightmaps )
{
// build lightmaps on the client-side
gEngfuncs.drawFuncs.GL_BuildLightmaps( );
gEngfuncs.drawFuncs->GL_BuildLightmaps( );
}
// now gamma and brightness are valid