mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-12 08:08:02 +00:00
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
|
#define USHRT_MAX 65535
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef XASH_SDL
|
||||||
|
#include <SDL.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // PORT_H
|
#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 );
|
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
|
#endif // XASH_TYPES_H
|
||||||
|
@ -40,13 +40,6 @@ GNU General Public License for more details.
|
|||||||
|
|
||||||
typedef int sound_t;
|
typedef int sound_t;
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
DEMO_INACTIVE = 0,
|
|
||||||
DEMO_XASH3D,
|
|
||||||
DEMO_QUAKE1
|
|
||||||
} demo_mode;
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
typedef struct netbandwithgraph_s
|
typedef struct netbandwithgraph_s
|
||||||
{
|
{
|
||||||
@ -425,16 +418,6 @@ typedef struct
|
|||||||
float applied_angle;
|
float applied_angle;
|
||||||
} screen_shake_t;
|
} 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
|
typedef enum
|
||||||
{
|
{
|
||||||
NET_REQUEST_CANCEL = 0, // request was cancelled for some reasons
|
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
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
#include "common.h"
|
||||||
|
#include "client.h"
|
||||||
#include "mod_local.h"
|
#include "mod_local.h"
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "world.h"
|
#include "world.h"
|
||||||
#include "client.h"
|
|
||||||
|
|
||||||
#define MAX_CLIPNODE_DEPTH 256 // should never exceeds
|
#define MAX_CLIPNODE_DEPTH 256 // should never exceeds
|
||||||
|
|
||||||
|
@ -145,14 +145,6 @@ typedef enum
|
|||||||
#define CIN_MAIN 0
|
#define CIN_MAIN 0
|
||||||
#define CIN_LOGO 1
|
#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_DECALS 512 // touching TE_DECAL messages, etc
|
||||||
#define MAX_STATIC_ENTITIES 3096 // static entities that moved on the client when level is spawn
|
#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 );
|
int COM_FileSize( const char *filename );
|
||||||
void COM_FixSlashes( char *pname );
|
void COM_FixSlashes( char *pname );
|
||||||
void COM_FreeFile( void *buffer );
|
void COM_FreeFile( void *buffer );
|
||||||
#define COM_CheckString( string ) ( ( !string || !*string ) ? 0 : 1 )
|
|
||||||
int COM_CompareFileTime( const char *filename1, const char *filename2, int *iCompare );
|
int COM_CompareFileTime( const char *filename1, const char *filename2, int *iCompare );
|
||||||
search_t *FS_Search( const char *pattern, int caseinsensitive, int gamedironly );
|
search_t *FS_Search( const char *pattern, int caseinsensitive, int gamedironly );
|
||||||
file_t *FS_Open( const char *filepath, const char *mode, qboolean 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 );
|
void NET_SaveMasters( void );
|
||||||
qboolean NET_SendToMasters( netsrc_t sock, size_t len, const void *data );
|
qboolean NET_SendToMasters( netsrc_t sock, size_t len, const void *data );
|
||||||
|
|
||||||
|
#ifdef REF_DLL
|
||||||
|
#error "common.h in ref_dll"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -12,12 +12,15 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
#include "port.h"
|
||||||
|
#include "xash3d_types.h"
|
||||||
|
#include "const.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <ctype.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 )
|
void Q_strnupr( const char *in, char *out, size_t size_out )
|
||||||
{
|
{
|
||||||
if( size_out == 0 ) return;
|
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 );
|
void COM_ExtractFilePath( const char *path, char *dest );
|
||||||
const char *COM_FileWithoutPath( const char *in );
|
const char *COM_FileWithoutPath( const char *in );
|
||||||
void COM_StripExtension( char *path );
|
void COM_StripExtension( char *path );
|
||||||
|
#define COM_CheckString( string ) ( ( !string || !*string ) ? 0 : 1 )
|
||||||
|
|
||||||
#endif//STDLIB_H
|
#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
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
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 <math.h>
|
||||||
#include "common.h"
|
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "eiface.h"
|
#include "eiface.h"
|
||||||
|
|
||||||
|
@ -13,7 +13,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||||||
GNU General Public License for more details.
|
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"
|
#include "mathlib.h"
|
||||||
|
|
||||||
const matrix3x4 matrix3x4_identity =
|
const matrix3x4 matrix3x4_identity =
|
||||||
|
@ -12,7 +12,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
#include "common.h"
|
||||||
#include "mod_local.h"
|
#include "mod_local.h"
|
||||||
#include "sprite.h"
|
#include "sprite.h"
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
|
@ -16,7 +16,7 @@ GNU General Public License for more details.
|
|||||||
#ifndef MOD_LOCAL_H
|
#ifndef MOD_LOCAL_H
|
||||||
#define MOD_LOCAL_H
|
#define MOD_LOCAL_H
|
||||||
|
|
||||||
#include "common.h"
|
//#include "common.h"
|
||||||
#include "edict.h"
|
#include "edict.h"
|
||||||
#include "eiface.h"
|
#include "eiface.h"
|
||||||
#include "ref_api.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
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
#include "common.h"
|
||||||
#include "mod_local.h"
|
#include "mod_local.h"
|
||||||
#include "sprite.h"
|
#include "sprite.h"
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
|
@ -60,6 +60,13 @@ GNU General Public License for more details.
|
|||||||
#define FWORLD_WATERALPHA BIT( 2 )
|
#define FWORLD_WATERALPHA BIT( 2 )
|
||||||
#define FWORLD_HAS_DELUXEMAP BIT( 3 )
|
#define FWORLD_HAS_DELUXEMAP BIT( 3 )
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
DEMO_INACTIVE = 0,
|
||||||
|
DEMO_XASH3D,
|
||||||
|
DEMO_QUAKE1
|
||||||
|
} demo_mode;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
msurface_t *surf;
|
msurface_t *surf;
|
||||||
@ -211,7 +218,17 @@ enum
|
|||||||
|
|
||||||
|
|
||||||
struct con_nprint_s;
|
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
|
typedef struct ref_api_s
|
||||||
{
|
{
|
||||||
|
@ -20,8 +20,6 @@ GNU General Public License for more details.
|
|||||||
#include "alias.h"
|
#include "alias.h"
|
||||||
#include "pm_local.h"
|
#include "pm_local.h"
|
||||||
#include "cl_tent.h"
|
#include "cl_tent.h"
|
||||||
#include "common.h"
|
|
||||||
#include "client.h"
|
|
||||||
#include "pmtrace.h"
|
#include "pmtrace.h"
|
||||||
|
|
||||||
extern cvar_t r_shadows;
|
extern cvar_t r_shadows;
|
||||||
|
@ -16,7 +16,6 @@ GNU General Public License for more details.
|
|||||||
|
|
||||||
#include "gl_local.h"
|
#include "gl_local.h"
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
char r_speeds_msg[MAX_SYSPATH];
|
char r_speeds_msg[MAX_SYSPATH];
|
||||||
ref_speeds_t r_stats; // r_speeds counters
|
ref_speeds_t r_stats; // r_speeds counters
|
||||||
|
@ -15,7 +15,6 @@ GNU General Public License for more details.
|
|||||||
|
|
||||||
#include "gl_local.h"
|
#include "gl_local.h"
|
||||||
#include "cl_tent.h"
|
#include "cl_tent.h"
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
#define DECAL_OVERLAP_DISTANCE 2
|
#define DECAL_OVERLAP_DISTANCE 2
|
||||||
#define DECAL_DISTANCE 4 // too big values produce more clipped polygons
|
#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 "gl_local.h"
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
#define TEXTURES_HASH_SIZE (MAX_TEXTURES >> 2)
|
#define TEXTURES_HASH_SIZE (MAX_TEXTURES >> 2)
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ GNU General Public License for more details.
|
|||||||
#include "gl_local.h"
|
#include "gl_local.h"
|
||||||
#include "entity_types.h"
|
#include "entity_types.h"
|
||||||
#include "studio.h"
|
#include "studio.h"
|
||||||
#include "common.h"
|
|
||||||
#include "world.h" // BOX_ON_PLANE_SIDE
|
#include "world.h" // BOX_ON_PLANE_SIDE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -16,7 +16,6 @@ GNU General Public License for more details.
|
|||||||
#include "gl_local.h"
|
#include "gl_local.h"
|
||||||
#include "pm_local.h"
|
#include "pm_local.h"
|
||||||
#include "studio.h"
|
#include "studio.h"
|
||||||
#include "common.h"
|
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "ref_params.h"
|
#include "ref_params.h"
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ GNU General Public License for more details.
|
|||||||
#include "studio.h"
|
#include "studio.h"
|
||||||
#include "entity_types.h"
|
#include "entity_types.h"
|
||||||
#include "cl_tent.h"
|
#include "cl_tent.h"
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
// it's a Valve default value for LoadMapSprite (probably must be power of two)
|
// it's a Valve default value for LoadMapSprite (probably must be power of two)
|
||||||
#define MAPSPRITE_SIZE 128
|
#define MAPSPRITE_SIZE 128
|
||||||
@ -179,7 +178,7 @@ void Mod_LoadSpriteModel( model_t *mod, const void *buffer, qboolean *loaded, ui
|
|||||||
break;
|
break;
|
||||||
case SPR_ALPHTEST:
|
case SPR_ALPHTEST:
|
||||||
pal = gEngfuncs.FS_LoadImage( "#masked.pal", src, 768 );
|
pal = gEngfuncs.FS_LoadImage( "#masked.pal", src, 768 );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
pal = gEngfuncs.FS_LoadImage( "#normal.pal", src, 768 );
|
pal = gEngfuncs.FS_LoadImage( "#normal.pal", src, 768 );
|
||||||
break;
|
break;
|
||||||
|
@ -21,8 +21,8 @@ GNU General Public License for more details.
|
|||||||
#include "studio.h"
|
#include "studio.h"
|
||||||
#include "pm_local.h"
|
#include "pm_local.h"
|
||||||
#include "cl_tent.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 EVENT_CLIENT 5000 // less than this value it's a server-side studio events
|
||||||
#define MAX_LOCALLIGHTS 4
|
#define MAX_LOCALLIGHTS 4
|
||||||
|
@ -16,8 +16,6 @@ GNU General Public License for more details.
|
|||||||
|
|
||||||
#include "gl_local.h"
|
#include "gl_local.h"
|
||||||
#include "wadfile.h"
|
#include "wadfile.h"
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
#define SKYCLOUDS_QUALITY 12
|
#define SKYCLOUDS_QUALITY 12
|
||||||
#define MAX_CLIP_VERTS 128 // skybox clip vertices
|
#define MAX_CLIP_VERTS 128 // skybox clip vertices
|
||||||
#define TURBSCALE ( 256.0f / ( M_PI2 ))
|
#define TURBSCALE ( 256.0f / ( M_PI2 ))
|
||||||
|
Loading…
Reference in New Issue
Block a user