engine: reduce dependency on eiface.h

This commit is contained in:
Alibek Omarov
2026-02-26 06:01:30 +05:00
parent 7c527d8886
commit f863e346f5
9 changed files with 17 additions and 23 deletions

View File

@@ -20,6 +20,8 @@ GNU General Public License for more details.
#include "cl_tent.h"
#include "shake.h"
#include "input.h"
#include "eiface.h"
#if XASH_LOW_MEMORY != 2
int CL_UPDATE_BACKUP = SINGLEPLAYER_BACKUP;
#endif
@@ -801,7 +803,6 @@ void CL_ParseServerData( sizebuf_t *msg, connprotocol_t proto )
string mapfile;
qboolean background;
int i, required_version;
uint32_t mapCRC;
HPAK_CheckSize( hpk_custom_file.string );
@@ -1539,13 +1540,11 @@ static const char *CL_CheckTypeToString( int check_type )
static void CL_SendConsistencyInfo( sizebuf_t *msg, connprotocol_t proto )
{
qboolean user_changed_diskfile;
vec3_t mins, maxs;
string filename;
CRC32_t crcFile;
byte md5[16] = { 0 };
consistency_t *pc;
int i, pos;
qboolean user_changed_diskfile;
vec3_t mins, maxs;
string filename;
byte md5[16] = { 0 };
int pos;
if( !cl.need_force_consistency_response )
return;
@@ -1561,11 +1560,10 @@ static void CL_SendConsistencyInfo( sizebuf_t *msg, connprotocol_t proto )
FS_AllowDirectPaths( true );
for( i = 0; i < cl.num_consistency; i++ )
for( int i = 0; i < cl.num_consistency; i++ )
{
qboolean have_file = true;
pc = &cl.consistency_list[i];
consistency_t *pc = &cl.consistency_list[i];
user_changed_diskfile = false;
MSG_WriteOneBit( msg, 1 );
@@ -1580,6 +1578,7 @@ static void CL_SendConsistencyInfo( sizebuf_t *msg, connprotocol_t proto )
if( Q_strstr( filename, "models/" ) && have_file )
{
uint32_t crcFile;
CRC32_Init( &crcFile );
CRC32_File( &crcFile, filename );
crcFile = CRC32_Final( crcFile );

View File

@@ -19,7 +19,6 @@ GNU General Public License for more details.
#include "mod_local.h"
#include "xash3d_mathlib.h"
#include "world.h"
#include "eiface.h" // offsetof
#define MAX_CLIPNODE_DEPTH 256 // should never exceeds

View File

@@ -16,7 +16,6 @@ GNU General Public License for more details.
#include <math.h> // fabs...
#include "common.h"
#include "base_cmd.h"
#include "eiface.h" // ARRAYSIZE
static convar_t *cvar_vars = NULL; // head of list
static poolhandle_t cvar_pool;

View File

@@ -15,7 +15,6 @@ GNU General Public License for more details.
#include <math.h>
#include "imagelib.h"
#include "eiface.h" // ARRAYSIZE
#define DEBUG_LOOKUPS_COUNT 0
#define USE_FS_SEARCH_FOR_LOOKUPS 1

View File

@@ -18,7 +18,6 @@ GNU General Public License for more details.
//#include "common.h"
#include "edict.h"
#include "eiface.h"
#include "ref_api.h"
#include "studio.h"
@@ -53,7 +52,7 @@ typedef struct consistency_s
typedef struct
{
int flags;
CRC32_t initialCRC;
uint32_t initialCRC;
} model_info_t;
// values for model_t's needload
@@ -156,7 +155,7 @@ void *Mod_StudioExtradata( model_t *mod );
model_t *Mod_FindName( const char *name, qboolean trackCRC );
model_t *Mod_LoadModel( model_t *mod, qboolean crash );
model_t *Mod_ForName( const char *name, qboolean crash, qboolean trackCRC );
qboolean Mod_ValidateCRC( const char *name, CRC32_t crc );
qboolean Mod_ValidateCRC( const char *name, uint32_t crc );
void Mod_NeedCRC( const char *name, qboolean needCRC );
void Mod_FreeUnused( void );

View File

@@ -398,7 +398,7 @@ model_t *Mod_LoadModel( model_t *mod, qboolean crash )
if( FBitSet( p->flags, FCRC_SHOULD_CHECKSUM ))
{
CRC32_t currentCRC;
uint32_t currentCRC;
CRC32_Init( &currentCRC );
CRC32_ProcessBuffer( &currentCRC, buf, length );
@@ -620,7 +620,7 @@ Mod_ValidateCRC
==================
*/
qboolean Mod_ValidateCRC( const char *name, CRC32_t crc )
qboolean Mod_ValidateCRC( const char *name, uint32_t crc )
{
model_info_t *p;
model_t *mod;

View File

@@ -16,8 +16,6 @@ GNU General Public License for more details.
#ifndef NET_ENCODE_H
#define NET_ENCODE_H
#include "eiface.h"
enum
{
CUSTOM_NONE = 0,
@@ -80,6 +78,7 @@ typedef struct goldsrc_delta_s
float postmultiply;
} goldsrc_delta_t;
typedef struct delta_s delta_t;
typedef void (*pfnDeltaEncode)( struct delta_s *pFields, const byte *from, const byte *to );
typedef struct

View File

@@ -16,7 +16,7 @@ GNU General Public License for more details.
#ifndef PHYSINT_H
#define PHYSINT_H
#include "eiface.h" // offsetof
#include "xash3d_types.h" // offsetof
#define SV_PHYSICS_INTERFACE_VERSION 6

View File

@@ -133,7 +133,7 @@ typedef struct server_s
struct sv_client_s *current_client; // current client who network message sending on
int hostflags; // misc server flags: predicting etc
CRC32_t worldmapCRC; // check crc for catch cheater maps
uint32_t worldmapCRC; // check crc for catch cheater maps
int progsCRC; // this is used with feature ENGINE_QUAKE_COMPATIBLE
char name[MAX_QPATH]; // map name