Reduce engine dependencies. crtlib/mathlib/matrixlib now can be built standalone
This commit is contained in:
parent
e5000742f1
commit
4247af8fa8
|
@ -162,4 +162,8 @@ GNU General Public License for more details.
|
|||
#define USHRT_MAX 65535
|
||||
#endif
|
||||
|
||||
#ifdef XASH_SDL
|
||||
#include <SDL.h>
|
||||
#endif
|
||||
|
||||
#endif // PORT_H
|
||||
|
|
|
@ -129,4 +129,12 @@ typedef struct dll_info_s
|
|||
|
||||
typedef void (*setpair_t)( const char *key, const char *value, void *buffer, void *numpairs );
|
||||
|
||||
// config strings are a general means of communication from
|
||||
// the server to all connected clients.
|
||||
// each config string can be at most CS_SIZE characters.
|
||||
#define MAX_QPATH 64 // max length of a game pathname
|
||||
#define MAX_OSPATH 260 // max length of a filesystem pathname
|
||||
#define CS_SIZE 64 // size of one config string
|
||||
#define CS_TIME 16 // size of time string
|
||||
|
||||
#endif // XASH_TYPES_H
|
||||
|
|
|
@ -40,13 +40,6 @@ GNU General Public License for more details.
|
|||
|
||||
typedef int sound_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DEMO_INACTIVE = 0,
|
||||
DEMO_XASH3D,
|
||||
DEMO_QUAKE1
|
||||
} demo_mode;
|
||||
|
||||
//=============================================================================
|
||||
typedef struct netbandwithgraph_s
|
||||
{
|
||||
|
@ -425,16 +418,6 @@ typedef struct
|
|||
float applied_angle;
|
||||
} screen_shake_t;
|
||||
|
||||
typedef struct remap_info_s
|
||||
{
|
||||
unsigned short textures[MAX_SKINS];// alias textures
|
||||
struct mstudiotex_s *ptexture; // array of textures with local copy of remapped textures
|
||||
short numtextures; // textures count
|
||||
short topcolor; // cached value
|
||||
short bottomcolor; // cached value
|
||||
model_t *model; // for catch model changes
|
||||
} remap_info_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
NET_REQUEST_CANCEL = 0, // request was cancelled for some reasons
|
||||
|
|
|
@ -12,11 +12,12 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
#include "client.h"
|
||||
#include "mod_local.h"
|
||||
#include "mathlib.h"
|
||||
#include "world.h"
|
||||
#include "client.h"
|
||||
|
||||
|
||||
#define MAX_CLIPNODE_DEPTH 256 // should never exceeds
|
||||
|
||||
|
|
|
@ -145,14 +145,6 @@ typedef enum
|
|||
#define CIN_MAIN 0
|
||||
#define CIN_LOGO 1
|
||||
|
||||
// config strings are a general means of communication from
|
||||
// the server to all connected clients.
|
||||
// each config string can be at most CS_SIZE characters.
|
||||
#define MAX_QPATH 64 // max length of a game pathname
|
||||
#define MAX_OSPATH 260 // max length of a filesystem pathname
|
||||
#define CS_SIZE 64 // size of one config string
|
||||
#define CS_TIME 16 // size of time string
|
||||
|
||||
#define MAX_DECALS 512 // touching TE_DECAL messages, etc
|
||||
#define MAX_STATIC_ENTITIES 3096 // static entities that moved on the client when level is spawn
|
||||
|
||||
|
@ -566,7 +558,6 @@ void COM_NormalizeAngles( vec3_t angles );
|
|||
int COM_FileSize( const char *filename );
|
||||
void COM_FixSlashes( char *pname );
|
||||
void COM_FreeFile( void *buffer );
|
||||
#define COM_CheckString( string ) ( ( !string || !*string ) ? 0 : 1 )
|
||||
int COM_CompareFileTime( const char *filename1, const char *filename2, int *iCompare );
|
||||
search_t *FS_Search( const char *pattern, int caseinsensitive, int gamedironly );
|
||||
file_t *FS_Open( const char *filepath, const char *mode, qboolean gamedironly );
|
||||
|
@ -1021,6 +1012,10 @@ void NET_InitMasters( void );
|
|||
void NET_SaveMasters( void );
|
||||
qboolean NET_SendToMasters( netsrc_t sock, size_t len, const void *data );
|
||||
|
||||
#ifdef REF_DLL
|
||||
#error "common.h in ref_dll"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -12,12 +12,15 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "port.h"
|
||||
#include "xash3d_types.h"
|
||||
#include "const.h"
|
||||
#include <math.h>
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
#include "common.h"
|
||||
|
||||
#include <time.h>
|
||||
#include "stdio.h"
|
||||
#include "crtlib.h"
|
||||
void Q_strnupr( const char *in, char *out, size_t size_out )
|
||||
{
|
||||
if( size_out == 0 ) return;
|
||||
|
|
|
@ -77,5 +77,6 @@ void COM_ReplaceExtension( char *path, const char *extension );
|
|||
void COM_ExtractFilePath( const char *path, char *dest );
|
||||
const char *COM_FileWithoutPath( const char *in );
|
||||
void COM_StripExtension( char *path );
|
||||
|
||||
#define COM_CheckString( string ) ( ( !string || !*string ) ? 0 : 1 )
|
||||
|
||||
#endif//STDLIB_H
|
||||
|
|
|
@ -12,9 +12,11 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "port.h"
|
||||
#include "xash3d_types.h"
|
||||
#include "const.h"
|
||||
#include "com_model.h"
|
||||
#include <math.h>
|
||||
#include "common.h"
|
||||
#include "mathlib.h"
|
||||
#include "eiface.h"
|
||||
|
||||
|
|
|
@ -13,7 +13,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||
GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
#include "port.h"
|
||||
#include "xash3d_types.h"
|
||||
#include "const.h"
|
||||
#include "com_model.h"
|
||||
#include "mathlib.h"
|
||||
|
||||
const matrix3x4 matrix3x4_identity =
|
||||
|
@ -845,4 +848,4 @@ qboolean Matrix4x4_Invert_Full( matrix4x4 out, const matrix4x4 in1 )
|
|||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
#include "mod_local.h"
|
||||
#include "sprite.h"
|
||||
#include "mathlib.h"
|
||||
|
|
|
@ -16,7 +16,7 @@ GNU General Public License for more details.
|
|||
#ifndef MOD_LOCAL_H
|
||||
#define MOD_LOCAL_H
|
||||
|
||||
#include "common.h"
|
||||
//#include "common.h"
|
||||
#include "edict.h"
|
||||
#include "eiface.h"
|
||||
#include "ref_api.h"
|
||||
|
|
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
#include "mod_local.h"
|
||||
#include "sprite.h"
|
||||
#include "mathlib.h"
|
||||
|
|
|
@ -60,6 +60,13 @@ GNU General Public License for more details.
|
|||
#define FWORLD_WATERALPHA BIT( 2 )
|
||||
#define FWORLD_HAS_DELUXEMAP BIT( 3 )
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DEMO_INACTIVE = 0,
|
||||
DEMO_XASH3D,
|
||||
DEMO_QUAKE1
|
||||
} demo_mode;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
msurface_t *surf;
|
||||
|
@ -211,7 +218,17 @@ enum
|
|||
|
||||
|
||||
struct con_nprint_s;
|
||||
struct remap_info_s;
|
||||
struct engine_studio_api_s;
|
||||
typedef struct remap_info_s
|
||||
{
|
||||
unsigned short textures[MAX_SKINS];// alias textures
|
||||
struct mstudiotex_s *ptexture; // array of textures with local copy of remapped textures
|
||||
short numtextures; // textures count
|
||||
short topcolor; // cached value
|
||||
short bottomcolor; // cached value
|
||||
model_t *model; // for catch model changes
|
||||
} remap_info_t;
|
||||
|
||||
|
||||
typedef struct ref_api_s
|
||||
{
|
||||
|
|
|
@ -20,8 +20,6 @@ GNU General Public License for more details.
|
|||
#include "alias.h"
|
||||
#include "pm_local.h"
|
||||
#include "cl_tent.h"
|
||||
#include "common.h"
|
||||
#include "client.h"
|
||||
#include "pmtrace.h"
|
||||
|
||||
extern cvar_t r_shadows;
|
||||
|
|
|
@ -16,7 +16,6 @@ GNU General Public License for more details.
|
|||
|
||||
#include "gl_local.h"
|
||||
#include "mathlib.h"
|
||||
#include "common.h"
|
||||
|
||||
char r_speeds_msg[MAX_SYSPATH];
|
||||
ref_speeds_t r_stats; // r_speeds counters
|
||||
|
|
|
@ -15,7 +15,6 @@ GNU General Public License for more details.
|
|||
|
||||
#include "gl_local.h"
|
||||
#include "cl_tent.h"
|
||||
#include "common.h"
|
||||
|
||||
#define DECAL_OVERLAP_DISTANCE 2
|
||||
#define DECAL_DISTANCE 4 // too big values produce more clipped polygons
|
||||
|
|
|
@ -14,7 +14,7 @@ GNU General Public License for more details.
|
|||
*/
|
||||
|
||||
#include "gl_local.h"
|
||||
#include "common.h"
|
||||
|
||||
|
||||
#define TEXTURES_HASH_SIZE (MAX_TEXTURES >> 2)
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ GNU General Public License for more details.
|
|||
#include "gl_local.h"
|
||||
#include "entity_types.h"
|
||||
#include "studio.h"
|
||||
#include "common.h"
|
||||
#include "world.h" // BOX_ON_PLANE_SIDE
|
||||
|
||||
/*
|
||||
|
|
|
@ -16,7 +16,6 @@ GNU General Public License for more details.
|
|||
#include "gl_local.h"
|
||||
#include "pm_local.h"
|
||||
#include "studio.h"
|
||||
#include "common.h"
|
||||
#include "mathlib.h"
|
||||
#include "ref_params.h"
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ GNU General Public License for more details.
|
|||
#include "studio.h"
|
||||
#include "entity_types.h"
|
||||
#include "cl_tent.h"
|
||||
#include "common.h"
|
||||
|
||||
// it's a Valve default value for LoadMapSprite (probably must be power of two)
|
||||
#define MAPSPRITE_SIZE 128
|
||||
|
@ -179,7 +178,7 @@ void Mod_LoadSpriteModel( model_t *mod, const void *buffer, qboolean *loaded, ui
|
|||
break;
|
||||
case SPR_ALPHTEST:
|
||||
pal = gEngfuncs.FS_LoadImage( "#masked.pal", src, 768 );
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
pal = gEngfuncs.FS_LoadImage( "#normal.pal", src, 768 );
|
||||
break;
|
||||
|
|
|
@ -21,8 +21,8 @@ GNU General Public License for more details.
|
|||
#include "studio.h"
|
||||
#include "pm_local.h"
|
||||
#include "cl_tent.h"
|
||||
#include "common.h"
|
||||
#include "client.h"
|
||||
//#include "client.h"
|
||||
#include "pmtrace.h"
|
||||
|
||||
#define EVENT_CLIENT 5000 // less than this value it's a server-side studio events
|
||||
#define MAX_LOCALLIGHTS 4
|
||||
|
|
|
@ -16,8 +16,6 @@ GNU General Public License for more details.
|
|||
|
||||
#include "gl_local.h"
|
||||
#include "wadfile.h"
|
||||
#include "common.h"
|
||||
|
||||
#define SKYCLOUDS_QUALITY 12
|
||||
#define MAX_CLIP_VERTS 128 // skybox clip vertices
|
||||
#define TURBSCALE ( 256.0f / ( M_PI2 ))
|
||||
|
|
Loading…
Reference in New Issue