Crossfire Server, Trunk  R21017
newserver.h
Go to the documentation of this file.
1 
9 #ifndef NEWSERVER_H
10 #define NEWSERVER_H
11 
16 #define MIN_NUM_LOOK_OBJECTS 3 /* 3=prev group, one object, next group */
17 
22 #define DEFAULT_NUM_LOOK_OBJECTS 50
23 
28 #define MAX_NUM_LOOK_OBJECTS 100
29 
33  int darkness;
34 };
35 
42 #define MAX_HEAD_OFFSET 8
43 
44 #define MAX_CLIENT_X (MAP_CLIENT_X+MAX_HEAD_OFFSET)
45 #define MAX_CLIENT_Y (MAP_CLIENT_Y+MAX_HEAD_OFFSET)
46 
48 struct Map {
50 };
51 
53 #define MAXANIMNUM 2000
54 
56 struct statsinfo {
57  char *range, *title;
58 };
59 
60 
68 };
69 
75 struct listen_info {
76  int family;
77  int socktype;
78  int protocol;
80  struct sockaddr *addr;
81 };
82 
84 #define MAX_PASSWORD_FAILURES 5
85 
89 typedef struct socket_struct {
90  enum Sock_Status status;
91  int fd;
93  struct Map lastmap;
94  int8_t map_scroll_x, map_scroll_y;
95  size_t faces_sent_len;
97  uint8_t anims_sent[MAXANIMNUM];
98  struct statsinfo stats;
100  char *host;
112  bool heartbeat;
113  uint32_t cs_version, sc_version;
116  uint8_t mapx, mapy;
119  /* Below are flags for extedend infos to pass to client
120  * with S->C mapextended command (note: this comment seems incorrect?) */
126  char *account_name;
131 } socket_struct;
132 
137 #define NS_FACESENT_FACE 0x1
138 #define NS_FACESENT_SMOOTH 0x2
139 
141 typedef struct Socket_Info {
142  struct timeval timeout;
145 } Socket_Info;
146 
147 extern Socket_Info socket_info;
148 
149 #define VERSION_CS 1023
150 #define VERSION_SC 1029
151 #define VERSION_INFO "Crossfire Server"
152 
153 #endif /* NEWSERVER_H */
uint8_t login_method
Definition: newserver.h:128
uint8_t faceset
Definition: newserver.h:117
uint32_t tick
Definition: newserver.h:106
uint32_t want_pickup
Definition: newserver.h:108
char * account_name
Definition: newserver.h:126
Sock_Status
Definition: newserver.h:64
unsigned char uint8_t
Definition: win32.h:161
int protocol
Definition: newserver.h:78
uint16_t look_position
Definition: newserver.h:114
uint32_t last_tick
Definition: newserver.h:130
struct socket_struct socket_struct
struct sockaddr * addr
Definition: newserver.h:80
bool heartbeat
Definition: newserver.h:112
struct Socket_Info Socket_Info
int8_t sounds_this_tick
Definition: newserver.h:121
uint16_t container_position
Definition: newserver.h:115
#define socklen_t
Definition: win32.h:130
int max_filedescriptor
Definition: newserver.h:143
char * title
Definition: newserver.h:57
int socktype
Definition: newserver.h:77
char * host
Definition: newserver.h:100
socklen_t addrlen
Definition: newserver.h:79
uint16_t notifications
Definition: newserver.h:129
size_t faces_sent_len
Definition: newserver.h:95
uint32_t update_look
Definition: newserver.h:104
uint32_t facecache
Definition: newserver.h:102
uint32_t sound
Definition: newserver.h:111
Socket_Info socket_info
Definition: init.c:47
Account_Char * account_chars
Definition: newserver.h:127
uint8_t num_look_objects
Definition: newserver.h:122
#define MAX_CLIENT_Y
Definition: newserver.h:45
Definition: newserver.h:48
#define MAXANIMNUM
Definition: newserver.h:53
#define MAP_LAYERS
Definition: map.h:32
int8_t map_scroll_y
Definition: newserver.h:94
uint32_t sc_version
Definition: newserver.h:113
uint32_t update_inventory
Definition: newserver.h:105
int allocated_sockets
Definition: newserver.h:144
uint32_t is_bot
Definition: newserver.h:107
uint32_t extended_stats
Definition: newserver.h:109
unsigned short uint16_t
Definition: win32.h:163
#define MAX_CLIENT_X
Definition: newserver.h:44
unsigned int uint32_t
Definition: win32.h:162
uint32_t darkness
Definition: newserver.h:103
uint8_t password_fails
Definition: newserver.h:101
signed char int8_t
Definition: win32.h:158
uint32_t monitor_spells
Definition: newserver.h:110
int family
Definition: newserver.h:76
uint8_t mapy
Definition: newserver.h:116
struct listen_info * listen
Definition: newserver.h:92
uint8_t * faces_sent
Definition: newserver.h:96
uint16_t faces[MAP_LAYERS]
Definition: newserver.h:32
SockList inbuf
Definition: newserver.h:99