mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Und die QFiles
This commit is contained in:
parent
b2a69d0795
commit
4865a9679e
2 changed files with 13 additions and 44 deletions
|
@ -22,52 +22,32 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#include "../game/quake2/q_shared.h"
|
#include "../game/quake2/q_shared.h"
|
||||||
|
|
||||||
|
#define VERSION 0.01
|
||||||
#define VERSION 3.21
|
|
||||||
|
|
||||||
#define BASEDIRNAME "baseq2"
|
#define BASEDIRNAME "baseq2"
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
#define BUILDSTRING "Windows"
|
||||||
#ifdef NDEBUG
|
#elif defined __linux__
|
||||||
#define BUILDSTRING "Win32 RELEASE"
|
|
||||||
#else
|
|
||||||
#define BUILDSTRING "Win32 DEBUG"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _M_IX86
|
|
||||||
#define CPUSTRING "x86"
|
|
||||||
#elif defined _M_ALPHA
|
|
||||||
#define CPUSTRING "AXP"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif defined __linux__ || defined __FreeBSD__
|
|
||||||
|
|
||||||
#define BUILDSTRING "Linux"
|
#define BUILDSTRING "Linux"
|
||||||
|
#elif defined __FreeBSD__
|
||||||
|
#define BUILDSTRING "FreeBSD"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
#define CPUSTRING "i386"
|
#define CPUSTRING "i386"
|
||||||
#elif defined __alpha__
|
#elif defined __x86_64__
|
||||||
#define CPUSTRING "axp"
|
#define CPUSTRING "amd64"
|
||||||
#else
|
#else
|
||||||
#define CPUSTRING "Unknown"
|
#define CPUSTRING "Unknown"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined __sun__
|
#if defined __sun__
|
||||||
|
|
||||||
#define BUILDSTRING "Solaris"
|
#define BUILDSTRING "Solaris"
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
#define CPUSTRING "i386"
|
#define CPUSTRING "i386"
|
||||||
#else
|
#else
|
||||||
#define CPUSTRING "sparc"
|
#define CPUSTRING "sparc"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else // !WIN32
|
|
||||||
|
|
||||||
#define BUILDSTRING "NON-WIN32"
|
|
||||||
#define CPUSTRING "NON-WIN32"
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
@ -527,24 +507,14 @@ NET
|
||||||
#define MAX_MSGLEN 1400 // max length of a message
|
#define MAX_MSGLEN 1400 // max length of a message
|
||||||
#define PACKET_HEADER 10 // two ints and a short
|
#define PACKET_HEADER 10 // two ints and a short
|
||||||
|
|
||||||
#ifdef HAVE_IPV6
|
|
||||||
typedef enum {NA_LOOPBACK, NA_BROADCAST, NA_IP, NA_IPX, NA_BROADCAST_IPX, NA_IP6, NA_MULTICAST6} netadrtype_t;
|
|
||||||
#else
|
|
||||||
typedef enum {NA_LOOPBACK, NA_BROADCAST, NA_IP, NA_IPX, NA_BROADCAST_IPX} netadrtype_t;
|
typedef enum {NA_LOOPBACK, NA_BROADCAST, NA_IP, NA_IPX, NA_BROADCAST_IPX} netadrtype_t;
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef enum {NS_CLIENT, NS_SERVER} netsrc_t;
|
typedef enum {NS_CLIENT, NS_SERVER} netsrc_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
netadrtype_t type;
|
netadrtype_t type;
|
||||||
#ifdef HAVE_IPV6
|
|
||||||
/* TODO. Use sockaddr_storage instead. */
|
|
||||||
byte ip[16];
|
|
||||||
unsigned int scope_id;
|
|
||||||
#else
|
|
||||||
byte ip[4];
|
byte ip[4];
|
||||||
#endif
|
|
||||||
byte ipx[10];
|
byte ipx[10];
|
||||||
|
|
||||||
unsigned short port;
|
unsigned short port;
|
||||||
|
@ -585,7 +555,7 @@ typedef struct
|
||||||
netadr_t remote_address;
|
netadr_t remote_address;
|
||||||
int qport; // qport value to write when transmitting
|
int qport; // qport value to write when transmitting
|
||||||
|
|
||||||
// sequencing variables
|
// sequencing variables
|
||||||
int incoming_sequence;
|
int incoming_sequence;
|
||||||
int incoming_acknowledged;
|
int incoming_acknowledged;
|
||||||
int incoming_reliable_acknowledged; // single bit
|
int incoming_reliable_acknowledged; // single bit
|
||||||
|
@ -596,11 +566,11 @@ typedef struct
|
||||||
int reliable_sequence; // single bit
|
int reliable_sequence; // single bit
|
||||||
int last_reliable_sequence; // sequence number of last send
|
int last_reliable_sequence; // sequence number of last send
|
||||||
|
|
||||||
// reliable staging and holding areas
|
// reliable staging and holding areas
|
||||||
sizebuf_t message; // writing buffer to send to server
|
sizebuf_t message; // writing buffer to send to server
|
||||||
byte message_buf[MAX_MSGLEN-16]; // leave space for header
|
byte message_buf[MAX_MSGLEN-16]; // leave space for header
|
||||||
|
|
||||||
// message is copied to this buffer when it is first transfered
|
// message is copied to this buffer when it is first transfered
|
||||||
int reliable_length;
|
int reliable_length;
|
||||||
byte reliable_buf[MAX_MSGLEN-16]; // unacked reliable message
|
byte reliable_buf[MAX_MSGLEN-16]; // unacked reliable message
|
||||||
} netchan_t;
|
} netchan_t;
|
||||||
|
|
|
@ -416,7 +416,7 @@ typedef struct
|
||||||
short numedges;
|
short numedges;
|
||||||
short texinfo;
|
short texinfo;
|
||||||
|
|
||||||
// lighting info
|
// lighting info
|
||||||
byte styles[MAXLIGHTMAPS];
|
byte styles[MAXLIGHTMAPS];
|
||||||
int lightofs; // start of [numstyles*surfsize] samples
|
int lightofs; // start of [numstyles*surfsize] samples
|
||||||
} dface_t;
|
} dface_t;
|
||||||
|
@ -454,7 +454,6 @@ typedef struct
|
||||||
#define ANGLE_UP -1
|
#define ANGLE_UP -1
|
||||||
#define ANGLE_DOWN -2
|
#define ANGLE_DOWN -2
|
||||||
|
|
||||||
|
|
||||||
// the visibility lump consists of a header with a count, then
|
// the visibility lump consists of a header with a count, then
|
||||||
// byte offsets for the PVS and PHS of each cluster, then the raw
|
// byte offsets for the PVS and PHS of each cluster, then the raw
|
||||||
// compressed bit vectors
|
// compressed bit vectors
|
||||||
|
|
Loading…
Reference in a new issue