-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.h
More file actions
60 lines (46 loc) · 1.4 KB
/
common.h
File metadata and controls
60 lines (46 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#pragma once
#include "stdafx.h"
#include <WinSock2.h>
#define MAX_MSGLEN 16384 // max length of a message, which may
typedef enum {
NA_BOT,
NA_BAD, // an address lookup failed
NA_LOOPBACK,
NA_BROADCAST,
NA_IP,
NA_IPX,
NA_BROADCAST_IPX
} netadrtype_t;
typedef enum {
NS_CLIENT,
NS_SERVER
} netsrc_t;
typedef struct {
netadrtype_t type;
union {
int _ip;
unsigned char ip[4];
};
unsigned char ipx[10];
unsigned short port;
} netadr_t;
typedef enum {
ERR_FATAL, // exit the entire game with a popup window
//ERR_VID_FATAL, // exit the entire game with a popup window and doesn't delete profile.pid
ERR_DROP, // print to console and disconnect from game
ERR_SERVERDISCONNECT, // don't kill server
ERR_DISCONNECT, // client disconnected from the server
ERR_NEED_CD, // pop up the need-cd dialog
ERR_AUTOUPDATE
} errorParm_t;
typedef void(*Com_Printf_t)(const char*, ...);
extern Com_Printf_t Com_Printf;
typedef void(*Com_DPrintf_t)(const char *, ...);
extern Com_DPrintf_t Com_DPrintf;
typedef void(*Com_Error_t)(int, const char*, ...);
extern Com_Error_t Com_Error;
typedef void(*xfunc)(void);
typedef void(*Cmd_AddCommand_t)(const char*, xfunc);
extern Cmd_AddCommand_t Cmd_AddCommand;
char * va(char *format, ...);
int Q_vsnprintf(char *dest, int size, const char *fmt, va_list argptr);