Crossfire Server, Trunk  R20739
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 
87 typedef struct buffer_struct {
88  char data[SOCKETBUFSIZE];
89  int start;
90  int len;
92 
94 #define MAX_PASSWORD_FAILURES 5
95 
99 typedef struct socket_struct {
100  enum Sock_Status status;
101  int fd;
103  struct Map lastmap;
104  int8_t map_scroll_x, map_scroll_y;
105  size_t faces_sent_len;
107  uint8_t anims_sent[MAXANIMNUM];
108  struct statsinfo stats;
110  char *host;
124  bool heartbeat;
125  uint32_t cs_version, sc_version;
128  uint8_t mapx, mapy;
131  /* Below are flags for extedend infos to pass to client
132  * with S->C mapextended command (note: this comment seems incorrect?) */
138  char *account_name;
143 } socket_struct;
144 
149 #define NS_FACESENT_FACE 0x1
150 #define NS_FACESENT_SMOOTH 0x2
151 
153 typedef struct Socket_Info {
154  struct timeval timeout;
157 } Socket_Info;
158 
159 extern Socket_Info socket_info;
160 
161 #define VERSION_CS 1023
162 #define VERSION_SC 1029
163 #define VERSION_INFO "Crossfire Server"
164 
165 #endif /* NEWSERVER_H */
uint8_t login_method
Definition: newserver.h:140
uint8_t faceset
Definition: newserver.h:129
struct buffer_struct buffer_struct
uint32_t tick
Definition: newserver.h:118
uint32_t want_pickup
Definition: newserver.h:120
char * account_name
Definition: newserver.h:138
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:126
uint32_t last_tick
Definition: newserver.h:142
struct socket_struct socket_struct
struct sockaddr * addr
Definition: newserver.h:80
bool heartbeat
Definition: newserver.h:124
struct Socket_Info Socket_Info
int8_t sounds_this_tick
Definition: newserver.h:133
uint16_t container_position
Definition: newserver.h:127
#define socklen_t
Definition: win32.h:130
int max_filedescriptor
Definition: newserver.h:155
char * title
Definition: newserver.h:57
int socktype
Definition: newserver.h:77
char * host
Definition: newserver.h:110
socklen_t addrlen
Definition: newserver.h:79
uint16_t notifications
Definition: newserver.h:141
size_t faces_sent_len
Definition: newserver.h:105
uint32_t update_look
Definition: newserver.h:115
uint32_t facecache
Definition: newserver.h:113
buffer_struct outputbuffer
Definition: newserver.h:111
uint32_t sound
Definition: newserver.h:123
Socket_Info socket_info
Definition: init.c:47
Account_Char * account_chars
Definition: newserver.h:139
uint8_t num_look_objects
Definition: newserver.h:134
#define MAX_CLIENT_Y
Definition: newserver.h:45
Definition: newserver.h:48
#define SOCKETBUFSIZE
Definition: config.h:522
#define MAXANIMNUM
Definition: newserver.h:53
#define MAP_LAYERS
Definition: map.h:32
int8_t map_scroll_y
Definition: newserver.h:104
uint32_t sc_version
Definition: newserver.h:125
uint32_t can_write
Definition: newserver.h:117
uint32_t update_inventory
Definition: newserver.h:116
int allocated_sockets
Definition: newserver.h:156
uint32_t is_bot
Definition: newserver.h:119
uint32_t extended_stats
Definition: newserver.h:121
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:114
uint8_t password_fails
Definition: newserver.h:112
signed char int8_t
Definition: win32.h:158
uint32_t monitor_spells
Definition: newserver.h:122
int family
Definition: newserver.h:76
uint8_t mapy
Definition: newserver.h:128
struct listen_info * listen
Definition: newserver.h:102
uint8_t * faces_sent
Definition: newserver.h:106
uint16_t faces[MAP_LAYERS]
Definition: newserver.h:32
SockList inbuf
Definition: newserver.h:109