engine: support compiling with gcc3
This commit is contained in:
parent
7a7bca2991
commit
aa6674b032
|
@ -232,7 +232,7 @@ typedef struct mextrasurf_s
|
|||
int reserved[32]; // just for future expansions or mod-makers
|
||||
} mextrasurf_t;
|
||||
|
||||
typedef struct msurface_s
|
||||
struct msurface_s
|
||||
{
|
||||
int visframe; // should be drawn when node is crossed
|
||||
|
||||
|
@ -264,7 +264,7 @@ typedef struct msurface_s
|
|||
|
||||
color24 *samples; // note: this is the actual lightmap data for this surface
|
||||
decal_t *pdecals;
|
||||
} msurface_t;
|
||||
};
|
||||
|
||||
typedef struct hull_s
|
||||
{
|
||||
|
|
|
@ -729,7 +729,6 @@ enum
|
|||
typedef int func_t;
|
||||
typedef int string_t;
|
||||
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned short word;
|
||||
|
||||
#include "xash3d_types.h"
|
||||
|
|
|
@ -84,7 +84,6 @@ color24 gTracerColors[] =
|
|||
#define FTENT_CLIENTCUSTOM 0x00080000 // Must specify callback. Callback function is responsible for killing tempent and updating fields ( unless other flags specify how to do things )
|
||||
#define FTENT_SCALE 0x00100000 // An experiment
|
||||
|
||||
typedef struct tempent_s TEMPENTITY;
|
||||
struct pmtrace_s;
|
||||
typedef struct tempent_s
|
||||
{
|
||||
|
@ -99,7 +98,7 @@ typedef struct tempent_s
|
|||
int hitSound;
|
||||
void (*hitcallback)( struct tempent_s *ent, struct pmtrace_s *ptr );
|
||||
void (*callback)( struct tempent_s *ent, float frametime, float currenttime );
|
||||
TEMPENTITY *next;
|
||||
struct tempent_s *next;
|
||||
int priority;
|
||||
short clientIndex; // if attached, this is the index of the client to stick to
|
||||
// if COLLIDEALL, this is the index of the client to ignore
|
||||
|
|
|
@ -11,9 +11,7 @@
|
|||
typedef unsigned char byte;
|
||||
typedef int sound_t;
|
||||
typedef float vec_t;
|
||||
typedef vec_t vec2_t[2];
|
||||
typedef vec_t vec3_t[3];
|
||||
typedef vec_t vec4_t[4];
|
||||
typedef vec_t quat_t[4];
|
||||
typedef byte rgba_t[4]; // unsigned byte colorpack
|
||||
typedef byte rgb_t[3]; // unsigned byte colorpack
|
||||
|
|
|
@ -16,6 +16,7 @@ GNU General Public License for more details.
|
|||
#ifndef CLIENT_H
|
||||
#define CLIENT_H
|
||||
|
||||
#include "xash3d_types.h"
|
||||
#include "mathlib.h"
|
||||
#include "cdll_int.h"
|
||||
#include "menu_int.h"
|
||||
|
@ -38,8 +39,6 @@ GNU General Public License for more details.
|
|||
#define SPR_HUDSPRITE 1 // hud sprite
|
||||
#define SPR_MAPSPRITE 2 // contain overview.bmp that diced into frames 128x128
|
||||
|
||||
typedef int sound_t;
|
||||
|
||||
//=============================================================================
|
||||
typedef struct netbandwithgraph_s
|
||||
{
|
||||
|
|
|
@ -41,8 +41,8 @@ typedef struct
|
|||
float length;
|
||||
} sentence_t;
|
||||
|
||||
typedef struct channel_s channel_t;
|
||||
void VOX_LoadWord( channel_t *pchan );
|
||||
void VOX_FreeWord( channel_t *pchan );
|
||||
struct channel_s;
|
||||
void VOX_LoadWord( struct channel_s *pchan );
|
||||
void VOX_FreeWord( struct channel_s *pchan );
|
||||
|
||||
#endif
|
||||
|
|
|
@ -829,7 +829,7 @@ void HPAK_FlushHostQueue( void );
|
|||
|
||||
// shared calls
|
||||
struct physent_s;
|
||||
typedef struct sv_client_s sv_client_t;
|
||||
struct sv_client_s;
|
||||
typedef struct sizebuf_s sizebuf_t;
|
||||
qboolean CL_IsInGame( void );
|
||||
qboolean CL_IsInMenu( void );
|
||||
|
@ -858,7 +858,7 @@ void SV_CreateDecal( sizebuf_t *msg, const float *origin, int decalIndex, int en
|
|||
void Log_Printf( const char *fmt, ... ) _format( 1 );
|
||||
void SV_BroadcastCommand( const char *fmt, ... ) _format( 1 );
|
||||
qboolean SV_RestoreCustomDecal( struct decallist_s *entry, edict_t *pEdict, qboolean adjacent );
|
||||
void SV_BroadcastPrintf( sv_client_t *ignore, char *fmt, ... ) _format( 2 );
|
||||
void SV_BroadcastPrintf( struct sv_client_s *ignore, char *fmt, ... ) _format( 2 );
|
||||
int R_CreateDecalList( struct decallist_s *pList );
|
||||
void R_ClearAllDecals( void );
|
||||
void CL_ClearStaticEntities( void );
|
||||
|
@ -960,14 +960,6 @@ void ID_Init( void );
|
|||
const char *ID_GetMD5( void );
|
||||
void GAME_EXPORT ID_SetCustomClientID( const char *id );
|
||||
|
||||
//
|
||||
// sequence.c
|
||||
//
|
||||
typedef struct sequenceEntry_ sequenceEntry_s;
|
||||
typedef struct sentenceEntry_ sentenceEntry_s;
|
||||
sequenceEntry_s *Sequence_Get( const char *fileName, const char *entryName );
|
||||
sentenceEntry_s *Sequence_PickSentence( const char *groupName, int pickMethod, int *picked );
|
||||
|
||||
//
|
||||
// masterlist.c
|
||||
//
|
||||
|
|
|
@ -74,7 +74,7 @@ typedef struct wadtype_s
|
|||
signed char type;
|
||||
} wadtype_t;
|
||||
|
||||
typedef struct file_s
|
||||
struct file_s
|
||||
{
|
||||
int handle; // file descriptor
|
||||
fs_offset_t real_length; // uncompressed file size (for files opened in "read" mode)
|
||||
|
@ -85,9 +85,9 @@ typedef struct file_s
|
|||
// contents buffer
|
||||
fs_offset_t buff_ind, buff_len; // buffer current index and length
|
||||
byte buff[FILE_BUFF_SIZE]; // intermediate buffer
|
||||
} file_t;
|
||||
};
|
||||
|
||||
typedef struct wfile_s
|
||||
struct wfile_s
|
||||
{
|
||||
string filename;
|
||||
int infotableofs;
|
||||
|
@ -96,7 +96,7 @@ typedef struct wfile_s
|
|||
file_t *handle;
|
||||
dlumpinfo_t *lumps;
|
||||
time_t filetime;
|
||||
} wfile_t;
|
||||
};
|
||||
|
||||
typedef struct pack_s
|
||||
{
|
||||
|
|
|
@ -20,6 +20,7 @@ GNU General Public License for more details.
|
|||
#include "edict.h"
|
||||
#include "eiface.h"
|
||||
#include "ref_api.h"
|
||||
#include "studio.h"
|
||||
|
||||
#define LM_SAMPLE_SIZE 16
|
||||
#define LM_SAMPLE_EXTRASIZE 8
|
||||
|
@ -172,10 +173,6 @@ void Mod_ReleaseHullPolygons( void );
|
|||
//
|
||||
// mod_studio.c
|
||||
//
|
||||
typedef struct studiohdr_s studiohdr_t;
|
||||
typedef struct mstudioseqdesc_s mstudioseqdesc_t;
|
||||
typedef struct mstudiobone_s mstudiobone_t;
|
||||
typedef struct mstudioanim_s mstudioanim_t;
|
||||
void Mod_LoadStudioModel( model_t *mod, const void *buffer, qboolean *loaded );
|
||||
void Mod_UnloadStudioModel( model_t *mod );
|
||||
void Mod_InitStudioAPI( void );
|
||||
|
|
|
@ -35,7 +35,7 @@ _inline int BitByte( int bits )
|
|||
return PAD_NUMBER( bits, 8 ) >> 3;
|
||||
}
|
||||
|
||||
typedef struct sizebuf_s
|
||||
struct sizebuf_s
|
||||
{
|
||||
qboolean bOverflow; // overflow reading or writing
|
||||
const char *pDebugName; // buffer name (pointer to const name)
|
||||
|
@ -43,7 +43,7 @@ typedef struct sizebuf_s
|
|||
byte *pData;
|
||||
int iCurBit;
|
||||
int nDataBits;
|
||||
} sizebuf_t;
|
||||
};
|
||||
|
||||
#define MSG_StartReading MSG_StartWriting
|
||||
#define MSG_GetNumBytesRead MSG_GetNumBytesWritten
|
||||
|
|
|
@ -16,6 +16,8 @@ GNU General Public License for more details.
|
|||
#ifndef NET_ENCODE_H
|
||||
#define NET_ENCODE_H
|
||||
|
||||
#include "eiface.h"
|
||||
|
||||
#define DT_BYTE BIT( 0 ) // A byte
|
||||
#define DT_SHORT BIT( 1 ) // 2 byte field
|
||||
#define DT_FLOAT BIT( 2 ) // A floating point field
|
||||
|
@ -62,7 +64,7 @@ typedef struct
|
|||
} delta_field_t;
|
||||
|
||||
// one field
|
||||
typedef struct delta_s
|
||||
struct delta_s
|
||||
{
|
||||
const char *name;
|
||||
int offset; // in bytes
|
||||
|
@ -72,9 +74,9 @@ typedef struct delta_s
|
|||
float post_multiplier; // for DEFINE_DELTA_POST
|
||||
int bits; // how many bits we send\receive
|
||||
qboolean bInactive; // unsetted by user request
|
||||
} delta_t;
|
||||
};
|
||||
|
||||
typedef void (*pfnDeltaEncode)( delta_t *pFields, const byte *from, const byte *to );
|
||||
typedef void (*pfnDeltaEncode)( struct delta_s *pFields, const byte *from, const byte *to );
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -113,24 +115,24 @@ void Delta_ParseTableField( sizebuf_t *msg );
|
|||
|
||||
|
||||
// encode routines
|
||||
typedef struct entity_state_s entity_state_t;
|
||||
typedef struct usercmd_s usercmd_t;
|
||||
typedef struct event_args_s event_args_t;
|
||||
typedef struct movevars_s movevars_t;
|
||||
typedef struct clientdata_s clientdata_t;
|
||||
typedef struct weapon_data_s weapon_data_t;
|
||||
void MSG_WriteDeltaUsercmd( sizebuf_t *msg, usercmd_t *from, usercmd_t *to );
|
||||
void MSG_ReadDeltaUsercmd( sizebuf_t *msg, usercmd_t *from, usercmd_t *to );
|
||||
void MSG_WriteDeltaEvent( sizebuf_t *msg, event_args_t *from, event_args_t *to );
|
||||
void MSG_ReadDeltaEvent( sizebuf_t *msg, event_args_t *from, event_args_t *to );
|
||||
qboolean MSG_WriteDeltaMovevars( sizebuf_t *msg, movevars_t *from, movevars_t *to );
|
||||
void MSG_ReadDeltaMovevars( sizebuf_t *msg, movevars_t *from, movevars_t *to );
|
||||
void MSG_WriteClientData( sizebuf_t *msg, clientdata_t *from, clientdata_t *to, float timebase );
|
||||
void MSG_ReadClientData( sizebuf_t *msg, clientdata_t *from, clientdata_t *to, float timebase );
|
||||
void MSG_WriteWeaponData( sizebuf_t *msg, weapon_data_t *from, weapon_data_t *to, float timebase, int index );
|
||||
void MSG_ReadWeaponData( sizebuf_t *msg, weapon_data_t *from, weapon_data_t *to, float timebase );
|
||||
void MSG_WriteDeltaEntity( entity_state_t *from, entity_state_t *to, sizebuf_t *msg, qboolean force, int type, float tbase, int ofs );
|
||||
qboolean MSG_ReadDeltaEntity( sizebuf_t *msg, entity_state_t *from, entity_state_t *to, int num, int type, float timebase );
|
||||
int Delta_TestBaseline( entity_state_t *from, entity_state_t *to, qboolean player, float timebase );
|
||||
struct entity_state_s;
|
||||
struct usercmd_s;
|
||||
struct event_args_s;
|
||||
struct movevars_s;
|
||||
struct clientdata_s;
|
||||
struct weapon_data_s;
|
||||
void MSG_WriteDeltaUsercmd( sizebuf_t *msg, struct usercmd_s *from, struct usercmd_s *to );
|
||||
void MSG_ReadDeltaUsercmd( sizebuf_t *msg, struct usercmd_s *from, struct usercmd_s *to );
|
||||
void MSG_WriteDeltaEvent( sizebuf_t *msg, struct event_args_s *from, struct event_args_s *to );
|
||||
void MSG_ReadDeltaEvent( sizebuf_t *msg, struct event_args_s *from, struct event_args_s *to );
|
||||
qboolean MSG_WriteDeltaMovevars( sizebuf_t *msg, struct movevars_s *from, struct movevars_s *to );
|
||||
void MSG_ReadDeltaMovevars( sizebuf_t *msg, struct movevars_s *from, struct movevars_s *to );
|
||||
void MSG_WriteClientData( sizebuf_t *msg, struct clientdata_s *from, struct clientdata_s *to, float timebase );
|
||||
void MSG_ReadClientData( sizebuf_t *msg, struct clientdata_s *from, struct clientdata_s *to, float timebase );
|
||||
void MSG_WriteWeaponData( sizebuf_t *msg, struct weapon_data_s *from, struct weapon_data_s *to, float timebase, int index );
|
||||
void MSG_ReadWeaponData( sizebuf_t *msg, struct weapon_data_s *from, struct weapon_data_s *to, float timebase );
|
||||
void MSG_WriteDeltaEntity( struct entity_state_s *from, struct entity_state_s *to, sizebuf_t *msg, qboolean force, int type, float tbase, int ofs );
|
||||
qboolean MSG_ReadDeltaEntity( sizebuf_t *msg, struct entity_state_s *from, struct entity_state_s *to, int num, int type, float timebase );
|
||||
int Delta_TestBaseline( struct entity_state_s *from, struct entity_state_s *to, qboolean player, float timebase );
|
||||
|
||||
#endif//NET_ENCODE_H
|
||||
|
|
|
@ -60,7 +60,7 @@ typedef struct sndlib_s
|
|||
int cmd_flags;
|
||||
} sndlib_t;
|
||||
|
||||
typedef struct stream_s
|
||||
struct stream_s
|
||||
{
|
||||
const streamfmt_t *format; // streamformat to operate
|
||||
|
||||
|
@ -77,7 +77,7 @@ typedef struct stream_s
|
|||
char temp[OUTBUF_SIZE]; // mpeg decoder stuff
|
||||
size_t pos; // actual track position (or actual buffer remains)
|
||||
int buffsize; // cached buffer size
|
||||
} stream_t;
|
||||
};
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
|
|
|
@ -103,15 +103,14 @@ typedef enum
|
|||
rserr_unknown
|
||||
} rserr_t;
|
||||
|
||||
typedef struct vidmode_s vidmode_t;
|
||||
|
||||
struct vidmode_s;
|
||||
// Window
|
||||
qboolean R_Init_Video( const int type );
|
||||
void R_Free_Video( void );
|
||||
qboolean VID_SetMode( void );
|
||||
rserr_t R_ChangeDisplaySettings( int width, int height, qboolean fullscreen );
|
||||
int R_MaxVideoModes( void );
|
||||
vidmode_t*R_GetVideoMode( int num );
|
||||
struct vidmode_s *R_GetVideoMode( int num );
|
||||
void* GL_GetProcAddress( const char *name ); // RenderAPI requirement
|
||||
void GL_UpdateSwapInterval( void );
|
||||
int GL_SetAttribute( int attr, int val );
|
||||
|
|
|
@ -33,6 +33,7 @@ GNU General Public License for more details.
|
|||
#include "pm_movevars.h"
|
||||
//#include "cvar.h"
|
||||
#include "gl_export.h"
|
||||
#include "wadfile.h"
|
||||
|
||||
#ifndef offsetof
|
||||
#define offsetof(s,m) (size_t)&(((s *)0)->m)
|
||||
|
@ -480,7 +481,6 @@ void R_AliasInit( void );
|
|||
//
|
||||
// gl_warp.c
|
||||
//
|
||||
typedef struct mip_s mip_t;
|
||||
void R_InitSkyClouds( mip_t *mt, struct texture_s *tx, qboolean custom_palette );
|
||||
void R_AddSkyBoxSurface( msurface_t *fa );
|
||||
void R_ClearSkyBox( void );
|
||||
|
|
Loading…
Reference in New Issue