mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-09 05:41:46 +08:00
engine: cleanup unused functions
This commit is contained in:
@@ -25,7 +25,6 @@ qboolean AVI_GetVideoInfo( movie_state_t *Avi, int *xres, int *yres, float *dura
|
||||
qboolean AVI_HaveAudioTrack( const movie_state_t *Avi );
|
||||
void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audio, int quiet );
|
||||
movie_state_t *AVI_LoadVideo( const char *filename, qboolean load_audio );
|
||||
int AVI_TimeToSoundPosition( movie_state_t *Avi, int time );
|
||||
void AVI_CloseVideo( movie_state_t *Avi );
|
||||
qboolean AVI_IsActive( movie_state_t *Avi );
|
||||
void AVI_FreeVideo( movie_state_t *Avi );
|
||||
|
||||
@@ -222,11 +222,6 @@ int AVI_GetVideoFrameNumber( movie_state_t *Avi, float time )
|
||||
return 0;
|
||||
}
|
||||
|
||||
int AVI_TimeToSoundPosition( movie_state_t *Avi, int time )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
qboolean AVI_GetVideoInfo( movie_state_t *Avi, int *xres, int *yres, float *duration )
|
||||
{
|
||||
if( !Avi->active )
|
||||
@@ -846,11 +841,6 @@ void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audi
|
||||
;
|
||||
}
|
||||
|
||||
int AVI_TimeToSoundPosition( movie_state_t *Avi, int time )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void AVI_CloseVideo( movie_state_t *Avi )
|
||||
{
|
||||
;
|
||||
|
||||
@@ -202,24 +202,6 @@ void UI_ShowConnectionWarning( void )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
=================
|
||||
UI_ShowConnectionWarning
|
||||
|
||||
show update dialog
|
||||
=================
|
||||
*/
|
||||
void UI_ShowUpdateDialog( qboolean preferStore )
|
||||
{
|
||||
if( gameui.dllFuncs2.pfnShowUpdateDialog )
|
||||
{
|
||||
gameui.dllFuncs2.pfnShowUpdateDialog( preferStore );
|
||||
}
|
||||
|
||||
Con_Printf( S_WARN "This version is not supported anymore. To continue, install latest engine version\n" );
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
UI_ShowConnectionWarning
|
||||
|
||||
@@ -1187,7 +1187,6 @@ void UI_CharEvent( int key );
|
||||
qboolean UI_MouseInRect( void );
|
||||
qboolean UI_IsVisible( void );
|
||||
void UI_ResetPing( void );
|
||||
void UI_ShowUpdateDialog( qboolean preferStore );
|
||||
qboolean UI_ShowMessageBox( const char *text );
|
||||
void UI_AddTouchButtonToList( const char *name, const char *texture, const char *command, unsigned char *color, int flags );
|
||||
void UI_ConnectionProgress_Disconnect( void );
|
||||
|
||||
@@ -54,12 +54,6 @@ static inline void list_add( hullnode_t *newobj, hullnode_t *head )
|
||||
list_add__( newobj, head, head->next );
|
||||
}
|
||||
|
||||
// add the new entry before the given list entry (list is circular)
|
||||
static inline void list_add_tail( hullnode_t *newobj, hullnode_t *head )
|
||||
{
|
||||
list_add__( newobj, head->prev, head );
|
||||
}
|
||||
|
||||
static inline void list_del( hullnode_t *entry )
|
||||
{
|
||||
entry->next->prev = entry->prev;
|
||||
|
||||
@@ -900,7 +900,6 @@ void COM_Munge( byte *data, size_t len, int seq );
|
||||
void COM_UnMunge( byte *data, size_t len, int seq );
|
||||
void COM_Munge2( byte *data, size_t len, int seq );
|
||||
void COM_UnMunge2( byte *data, size_t len, int seq );
|
||||
void COM_Munge3( byte *data, size_t len, int seq );
|
||||
void COM_UnMunge3( byte *data, size_t len, int seq );
|
||||
|
||||
//
|
||||
|
||||
@@ -91,10 +91,12 @@ void COM_UnMunge2( byte *data, size_t len, int seq )
|
||||
COM_GenericMunge( data, len, seq, mungify_table2, true );
|
||||
}
|
||||
|
||||
#if XASH_ENGINE_TESTS // not used in client, keep for tests only
|
||||
void COM_Munge3( byte *data, size_t len, int seq )
|
||||
{
|
||||
COM_GenericMunge( data, len, seq, mungify_table3, false );
|
||||
}
|
||||
#endif // XASH_ENGINE_TESTS
|
||||
|
||||
void COM_UnMunge3( byte *data, size_t len, int seq )
|
||||
{
|
||||
|
||||
@@ -1906,18 +1906,6 @@ void NET_Config( qboolean multiplayer, qboolean changeport )
|
||||
net.configured = multiplayer ? true : false;
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
NET_IsConfigured
|
||||
|
||||
Is winsock ip initialized?
|
||||
====================
|
||||
*/
|
||||
qboolean NET_IsConfigured( void )
|
||||
{
|
||||
return net.configured;
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
NET_IsActive
|
||||
@@ -1928,37 +1916,6 @@ qboolean NET_IsActive( void )
|
||||
return net.initialized;
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
NET_Sleep
|
||||
|
||||
sleeps msec or until net socket is ready
|
||||
====================
|
||||
*/
|
||||
void NET_Sleep( int msec )
|
||||
{
|
||||
#ifndef XASH_NO_NETWORK
|
||||
struct timeval timeout;
|
||||
fd_set fdset;
|
||||
int i = 0;
|
||||
|
||||
if( !net.initialized || host.type == HOST_NORMAL )
|
||||
return; // we're not a dedicated server, just run full speed
|
||||
|
||||
FD_ZERO( &fdset );
|
||||
|
||||
if( net.ip_sockets[NS_SERVER] != INVALID_SOCKET )
|
||||
{
|
||||
FD_SET( net.ip_sockets[NS_SERVER], &fdset ); // network socket
|
||||
i = net.ip_sockets[NS_SERVER];
|
||||
}
|
||||
|
||||
timeout.tv_sec = msec / 1000;
|
||||
timeout.tv_usec = (msec % 1000) * 1000;
|
||||
select( i+1, &fdset, NULL, NULL, &timeout );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
NET_ClearLagData
|
||||
|
||||
@@ -57,9 +57,7 @@ extern convar_t net_recv_debug;
|
||||
|
||||
void NET_Init( void );
|
||||
void NET_Shutdown( void );
|
||||
void NET_Sleep( int msec );
|
||||
qboolean NET_IsActive( void );
|
||||
qboolean NET_IsConfigured( void );
|
||||
void NET_Config( qboolean net_enable, qboolean changeport );
|
||||
const char *NET_AdrToString( const netadr_t a ) RETURNS_NONNULL;
|
||||
const char *NET_BaseAdrToString( const netadr_t a ) RETURNS_NONNULL;
|
||||
|
||||
@@ -76,19 +76,15 @@ GNU General Public License for more details.
|
||||
#define INVALID_SOCKET -1
|
||||
#define SOCKET_ERROR -1
|
||||
|
||||
#if XASH_EMSCRIPTEN
|
||||
/* All socket operations are non-blocking already */
|
||||
static int ioctl_stub( int d, unsigned long r, ... )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#define ioctlsocket ioctl_stub
|
||||
#elif !XASH_PSVITA // XASH_EMSCRIPTEN
|
||||
#if !XASH_PSVITA
|
||||
#define ioctlsocket ioctl
|
||||
#endif // XASH_EMSCRIPTEN
|
||||
#endif // !XASH_PSVITA
|
||||
|
||||
#define closesocket close
|
||||
#endif
|
||||
|
||||
#define SOCKET int
|
||||
|
||||
typedef int WSAsize_t;
|
||||
|
||||
#endif // NET_H
|
||||
|
||||
@@ -53,11 +53,7 @@ extern int SV_UPDATE_BACKUP;
|
||||
#define GROUP_OP_AND 0
|
||||
#define GROUP_OP_NAND 1
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define SV_IsValidEdict( e ) ( e && !e->free )
|
||||
#else
|
||||
#define SV_IsValidEdict( e ) SV_CheckEdict( e, __FILE__, __LINE__ )
|
||||
#endif
|
||||
#define NUM_FOR_EDICT(e) ((int)((edict_t *)(e) - svgame.edicts))
|
||||
|
||||
#define MAX_PUSHED_ENTS 256
|
||||
@@ -524,7 +520,6 @@ void SV_ClientPrintf( sv_client_t *cl, const char *fmt, ... ) FORMAT_CHECK( 2 );
|
||||
//
|
||||
// sv_client.c
|
||||
//
|
||||
void SV_RefreshUserinfo( void );
|
||||
void SV_TogglePause( const char *msg );
|
||||
qboolean SV_ShouldUpdatePing( sv_client_t *cl );
|
||||
const char *SV_GetClientIDString( sv_client_t *cl );
|
||||
|
||||
@@ -1260,24 +1260,6 @@ void SV_FullClientUpdate( sv_client_t *cl, sizebuf_t *msg )
|
||||
else MSG_WriteOneBit( msg, 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
===================
|
||||
SV_RefreshUserinfo
|
||||
|
||||
===================
|
||||
*/
|
||||
void SV_RefreshUserinfo( void )
|
||||
{
|
||||
sv_client_t *cl;
|
||||
int i;
|
||||
|
||||
for( i = 0, cl = svs.clients; i < svs.maxclients; i++, cl++ )
|
||||
{
|
||||
if( cl->state >= cs_connected )
|
||||
SetBits( cl->flags, FCL_RESEND_USERINFO );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
===================
|
||||
SV_FullUpdateMovevars
|
||||
|
||||
@@ -24,7 +24,6 @@ float r_avertexnormals[NUMVERTEXNORMALS][3] = {
|
||||
};
|
||||
|
||||
|
||||
void R_AliasSetUpTransform( void );
|
||||
void R_AliasProjectAndClipTestFinalVert( finalvert_t *fv );
|
||||
|
||||
/*
|
||||
@@ -117,79 +116,6 @@ void R_SetUpWorldTransform( void )
|
||||
// aliasoldworldtransform[2][3] = RI.currententity->oldorigin[2];
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
================
|
||||
R_AliasSetUpTransform
|
||||
================
|
||||
*/
|
||||
void R_AliasSetUpTransform( void )
|
||||
{
|
||||
int i;
|
||||
static float viewmatrix[3][4];
|
||||
vec3_t angles;
|
||||
|
||||
// TODO: should really be stored with the entity instead of being reconstructed
|
||||
// TODO: should use a look-up table
|
||||
// TODO: could cache lazily, stored in the entity
|
||||
//
|
||||
|
||||
s_ziscale = (float)0x8000 * (float)0x10000;
|
||||
angles[ROLL] = RI.currententity->angles[ROLL];
|
||||
angles[PITCH] = RI.currententity->angles[PITCH];
|
||||
angles[YAW] = RI.currententity->angles[YAW];
|
||||
AngleVectors( angles, s_alias_forward, s_alias_right, s_alias_up );
|
||||
|
||||
// TODO: can do this with simple matrix rearrangement
|
||||
|
||||
memset( aliasworldtransform, 0, sizeof( aliasworldtransform ));
|
||||
memset( aliasoldworldtransform, 0, sizeof( aliasworldtransform ));
|
||||
|
||||
for( i = 0; i < 3; i++ )
|
||||
{
|
||||
aliasoldworldtransform[i][0] = aliasworldtransform[i][0] = s_alias_forward[i];
|
||||
aliasoldworldtransform[i][0] = aliasworldtransform[i][1] = -s_alias_right[i];
|
||||
aliasoldworldtransform[i][0] = aliasworldtransform[i][2] = s_alias_up[i];
|
||||
}
|
||||
|
||||
aliasworldtransform[0][3] = RI.currententity->origin[0] - RI.vieworg[0];
|
||||
aliasworldtransform[1][3] = RI.currententity->origin[1] - RI.vieworg[1];
|
||||
aliasworldtransform[2][3] = RI.currententity->origin[2] - RI.vieworg[2];
|
||||
|
||||
// aliasoldworldtransform[0][3] = RI.currententity->oldorigin[0]-r_origin[0];
|
||||
// aliasoldworldtransform[1][3] = RI.currententity->oldorigin[1]-r_origin[1];
|
||||
// aliasoldworldtransform[2][3] = RI.currententity->oldorigin[2]-r_origin[2];
|
||||
|
||||
// FIXME: can do more efficiently than full concatenation
|
||||
// memcpy( rotationmatrix, t2matrix, sizeof( rotationmatrix ) );
|
||||
|
||||
// R_ConcatTransforms (t2matrix, tmatrix, rotationmatrix);
|
||||
|
||||
// TODO: should be global, set when vright, etc., set
|
||||
VectorCopy( RI.vright, viewmatrix[0] );
|
||||
VectorCopy( RI.vup, viewmatrix[1] );
|
||||
VectorInverse( viewmatrix[1] );
|
||||
// VectorScale(viewmatrix[1], -1, viewmatrix[1]);
|
||||
VectorCopy( RI.vforward, viewmatrix[2] );
|
||||
|
||||
viewmatrix[0][3] = 0;
|
||||
viewmatrix[1][3] = 0;
|
||||
viewmatrix[2][3] = 0;
|
||||
|
||||
// memcpy( aliasworldtransform, rotationmatrix, sizeof( aliastransform ) );
|
||||
|
||||
// R_ConcatTransforms (viewmatrix, aliasworldtransform, aliastransform);
|
||||
Matrix3x4_ConcatTransforms( aliastransform, viewmatrix, aliasworldtransform );
|
||||
|
||||
aliasworldtransform[0][3] = RI.currententity->origin[0];
|
||||
aliasworldtransform[1][3] = RI.currententity->origin[1];
|
||||
aliasworldtransform[2][3] = RI.currententity->origin[2];
|
||||
|
||||
// aliasoldworldtransform[0][3] = RI.currententity->oldorigin[0];
|
||||
// aliasoldworldtransform[1][3] = RI.currententity->oldorigin[1];
|
||||
// aliasoldworldtransform[2][3] = RI.currententity->oldorigin[2];
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
R_AliasProjectAndClipTestFinalVert
|
||||
|
||||
Reference in New Issue
Block a user