Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
const.h
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software
14
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15
*/
16
17
/*
18
* Constants - Network Interface Constants - written by Stephane Vaxelaire <svax@free.fr>
19
*/
20
21
#ifndef __CONST_H
22
#define __CONST_H
23
24
#include "config.h"
25
#include "
posh.h
"
26
#include <assert.h>
27
#include <stdio.h>
28
29
#define GAMESERVER_VERSION 0.2
30
#define ACCOUNTSERVER_VERSION 0.2
31
#define NETCLIENT_VERSION 0.2
32
33
#define SERVER_PORT 6777
34
#define CLIENT_PORT 6778
35
#define ACCT_PORT 6779
36
#define VIDEO_PORT 6776
37
38
#define HASHMETHOD SHA
39
#define DESKEY_SIZE 64
40
#define MAXBUFFER 16384
41
42
#define MAXSERIAL 0xFFFF
43
#define OBJSERIAL_ToBig POSH_WriteU16ToBig
44
#define INSTSERIAL_ToBig POSH_WriteU32ToBig
45
#define OBJSERIAL_FromBig POSH_ReadU16FromBig
46
#define INSTSERIAL_FromBig POSH_ReadU32FromBig
47
typedef
unsigned
short
ObjSerial
;
48
typedef
unsigned
int
InstSerial
;
49
50
extern
double
NETWORK_ATOM
;
51
extern
double
DAMAGE_ATOM
;
52
53
#if defined (_WIN32) && !defined (__CYGWIN__) || defined (MAC_OS_X_VERSION_10_3) || defined (MAC_OS_X_VERSION_10_2) \
54
|| defined (MAC_OS_X_VERSION_10_1)
55
//#warning "Win32 platform"
56
#define in_addr_t unsigned long
57
#define socklen_t int
58
#else
59
//#warning "GCC platform"
60
#ifndef SOCKET_ERROR
61
#define SOCKET_ERROR -1
62
#endif
63
#endif
64
65
#if !defined (_WIN32) || defined (__CYGWIN__) || defined (__MINGW32__)
66
#define LOCALCONST_DECL( Type, cName, Value ) static const Type cName = Value;
67
#define LOCALCONST_DEF( Class, Type, cName, Value )
68
#else
69
#define LOCALCONST_DECL( Type, cName, Value ) static Type cName;
70
#define LOCALCONST_DEF( Class, Type, cName, Value ) Type Class::cName = Value;
71
#endif
72
73
#if _WIN32_WINNT >= 0x0400
74
typedef
unsigned
int
u_int32_t
;
75
typedef
unsigned
short
u_int16_t;
76
typedef
unsigned
char
u_int8_t
;
77
#endif
78
79
#endif
/* __CONST_H */
80
src
networking
const.h
Generated on Fri May 29 2015 23:07:34 for Vegastrike 0.5.1 rc1 by
1.8.4