Crossfire Server, Trunk
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
31
struct
map_cell_struct
{
32
uint16_t
faces
[
MAP_LAYERS
];
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
{
49
struct
map_cell_struct
cells
[
MAX_CLIENT_X
][
MAX_CLIENT_Y
];
50
};
51
53
#define MAXANIMNUM 2000
54
56
struct
statsinfo
{
57
char
*
range
, *
title
, *
god
;
58
};
59
60
64
enum
Sock_Status
{
65
Ns_Avail
,
66
Ns_Add
,
67
Ns_Dead
68
};
69
75
struct
listen_info
{
76
int
family
;
77
int
socktype
;
78
int
protocol
;
79
socklen_t
addrlen
;
80
struct
sockaddr *
addr
;
81
};
82
84
#define MAX_PASSWORD_FAILURES 5
85
89
struct
socket_struct
{
90
enum
Sock_Status
status
;
91
int
fd
;
92
struct
listen_info
*
listen
;
93
struct
Map
lastmap
;
94
int8_t
map_scroll_x
,
map_scroll_y
;
95
size_t
faces_sent_len
;
96
uint8_t *
faces_sent
;
97
uint8_t
anims_sent
[
MAXANIMNUM
];
98
struct
statsinfo
stats
;
99
SockList
inbuf
;
100
char
*
host
;
101
uint8_t
password_fails
;
102
uint32_t
facecache
:1;
103
uint32_t
darkness
:1;
104
uint32_t
update_look
:1;
105
uint32_t
update_inventory
:1;
106
uint32_t
tick
:1;
107
uint32_t
is_bot
:1;
108
uint32_t
want_pickup
:1;
109
uint32_t
extended_stats
:1;
110
uint32_t
monitor_spells
;
111
uint32_t
sound
;
112
bool
heartbeat
;
113
uint32_t
cs_version
,
sc_version
;
114
uint16_t
look_position
;
115
uint16_t
container_position
;
116
uint8_t
mapx
,
mapy
;
117
uint8_t
faceset
;
119
/* Below are flags for extedend infos to pass to client
120
* with S->C mapextended command (note: this comment seems incorrect?) */
121
int8_t
sounds_this_tick
;
122
uint8_t
num_look_objects
;
126
char
*
account_name
;
127
Account_Chars
*
account_chars
;
128
uint8_t
login_method
;
129
uint16_t
notifications
;
130
uint32_t
last_tick
;
131
};
132
137
#define NS_FACESENT_FACE 0x1
138
#define NS_FACESENT_SMOOTH 0x2
139
141
struct
Socket_Info
{
142
struct
timeval
timeout
;
143
int
max_filedescriptor
;
144
int
allocated_sockets
;
145
};
146
147
extern
Socket_Info
socket_info
;
148
149
#define VERSION_CS 1023
150
#define VERSION_SC 1030
151
#define VERSION_INFO "Crossfire Server"
152
153
#endif
/* NEWSERVER_H */
socket_struct::tick
uint32_t tick
Definition:
newserver.h:106
socket_struct::sc_version
uint32_t sc_version
Definition:
newserver.h:113
socket_struct::heartbeat
bool heartbeat
Definition:
newserver.h:112
Map
Definition:
newserver.h:48
socket_struct::container_position
uint16_t container_position
Definition:
newserver.h:115
socket_struct::look_position
uint16_t look_position
Definition:
newserver.h:114
listen_info::protocol
int protocol
Definition:
newserver.h:78
listen_info
Definition:
newserver.h:75
socket_struct::sound
uint32_t sound
Definition:
newserver.h:111
socket_struct
Definition:
newserver.h:89
socket_struct::mapx
uint8_t mapx
Definition:
newserver.h:116
Socket_Info::allocated_sockets
int allocated_sockets
Definition:
newserver.h:144
socket_struct::num_look_objects
uint8_t num_look_objects
Definition:
newserver.h:122
socket_info
Socket_Info socket_info
Definition:
init.cpp:52
socket_struct::extended_stats
uint32_t extended_stats
Definition:
newserver.h:109
socket_struct::update_inventory
uint32_t update_inventory
Definition:
newserver.h:105
listen_info::addr
struct sockaddr * addr
Definition:
newserver.h:80
Socket_Info::max_filedescriptor
int max_filedescriptor
Definition:
newserver.h:143
MAP_LAYERS
#define MAP_LAYERS
Definition:
map.h:32
socket_struct::is_bot
uint32_t is_bot
Definition:
newserver.h:107
socket_struct::listen
struct listen_info * listen
Definition:
newserver.h:92
listen_info::socktype
int socktype
Definition:
newserver.h:77
MAXANIMNUM
#define MAXANIMNUM
Definition:
newserver.h:53
socket_struct::inbuf
SockList inbuf
Definition:
newserver.h:99
socket_struct::map_scroll_x
int8_t map_scroll_x
Definition:
newserver.h:94
Socket_Info
Definition:
newserver.h:141
socket_struct::update_look
uint32_t update_look
Definition:
newserver.h:104
Ns_Dead
@ Ns_Dead
Definition:
newserver.h:67
socket_struct::account_chars
Account_Chars * account_chars
Definition:
newserver.h:127
socket_struct::mapy
uint8_t mapy
Definition:
newserver.h:116
socket_struct::stats
struct statsinfo stats
Definition:
newserver.h:98
Ns_Avail
@ Ns_Avail
Definition:
newserver.h:65
map_cell_struct
Definition:
newserver.h:31
socklen_t
#define socklen_t
Definition:
win32.h:17
socket_struct::facecache
uint32_t facecache
Definition:
newserver.h:102
map_cell_struct::darkness
int darkness
Definition:
newserver.h:33
MAX_CLIENT_X
#define MAX_CLIENT_X
Definition:
newserver.h:44
statsinfo
Definition:
newserver.h:56
socket_struct::lastmap
struct Map lastmap
Definition:
newserver.h:93
socket_struct::host
char * host
Definition:
newserver.h:100
socket_struct::account_name
char * account_name
Definition:
newserver.h:126
socket_struct::monitor_spells
uint32_t monitor_spells
Definition:
newserver.h:110
map_cell_struct::faces
uint16_t faces[MAP_LAYERS]
Definition:
newserver.h:32
socket_struct::faceset
uint8_t faceset
Definition:
newserver.h:117
socket_struct::map_scroll_y
int8_t map_scroll_y
Definition:
newserver.h:94
statsinfo::title
char * title
Definition:
newserver.h:57
socket_struct::cs_version
uint32_t cs_version
Definition:
newserver.h:113
Ns_Add
@ Ns_Add
Definition:
newserver.h:66
listen_info::family
int family
Definition:
newserver.h:76
socket_struct::sounds_this_tick
int8_t sounds_this_tick
Definition:
newserver.h:121
socket_struct::want_pickup
uint32_t want_pickup
Definition:
newserver.h:108
socket_struct::last_tick
uint32_t last_tick
Definition:
newserver.h:130
Socket_Info::timeout
struct timeval timeout
Definition:
newserver.h:142
socket_struct::status
enum Sock_Status status
Definition:
newserver.h:90
statsinfo::god
char * god
Definition:
newserver.h:57
Map::cells
struct map_cell_struct cells[MAX_CLIENT_X][MAX_CLIENT_Y]
Definition:
newserver.h:49
socket_struct::faces_sent_len
size_t faces_sent_len
Definition:
newserver.h:95
socket_struct::anims_sent
uint8_t anims_sent[MAXANIMNUM]
Definition:
newserver.h:97
socket_struct::faces_sent
uint8_t * faces_sent
Definition:
newserver.h:96
Account_Chars
Definition:
account_char.h:27
socket_struct::fd
int fd
Definition:
newserver.h:91
MAX_CLIENT_Y
#define MAX_CLIENT_Y
Definition:
newserver.h:45
socket_struct::login_method
uint8_t login_method
Definition:
newserver.h:128
statsinfo::range
char * range
Definition:
newserver.h:57
listen_info::addrlen
socklen_t addrlen
Definition:
newserver.h:79
Sock_Status
Sock_Status
Definition:
newserver.h:64
socket_struct::darkness
uint32_t darkness
Definition:
newserver.h:103
socket_struct::notifications
uint16_t notifications
Definition:
newserver.h:129
socket_struct::password_fails
uint8_t password_fails
Definition:
newserver.h:101
SockList
Definition:
newclient.h:684
crossfire-crossfire-server
include
newserver.h
Generated by
1.8.17