Crossfire Client, Trunk
client.h
Go to the documentation of this file.
1 
7 #ifndef _CLIENT_H
8 #define _CLIENT_H
9 
10 #include "config.h"
11 
12 // This is required for 'newclient.h' to expose client variables.
13 #define CLIENT_TYPES_H
14 
15 #include <fcntl.h>
16 #include <glib.h>
17 #include <stdbool.h>
18 #include <stdio.h>
19 #include <stdlib.h>
20 #include <string.h>
21 #include <sys/time.h>
22 #include <sys/types.h>
23 #include <time.h>
24 #include <unistd.h>
25 
26 #include <gio/gio.h>
27 
28 #ifdef WIN32
29 # include <winsock2.h>
30 #endif
31 
32 #include "item.h"
33 #include "shared/newclient.h"
34 #include "version.h"
35 
36 #ifndef SOL_TCP
37 #define SOL_TCP IPPROTO_TCP
38 #endif
39 
40 #define MAX_BUF 256
41 #define BIG_BUF 1024
42 
43 /* used to register gui callbacks to extended texts
44  * (which are supposed to be handled more friendly than raw text)*/
45 typedef void (*ExtTextManager)(int flag, int type, int subtype, char* message);
46 
47 typedef struct TextManager{
48  int type;
50  struct TextManager* next;
51 } TextManager;
52 
53 /* This is how often the client checks for X events, as well as how often
54  * it performs animations (or will). This value can be most anything.
55  * IT is only configurable because the exact value it needs to be set to
56  * has to be figured out. This value is in microseconds (100,000 microseconds=
57  * 0.1 seconds
58  */
59 #define MAX_TIME 100000
60 
61 /* This is the default port to connect to the server with. */
62 #define EPORT 13327
63 
64 /* This is the default port to connect to the server with in string form. */
65 #define DEFPORT "13327"
66 
67 #define VERSION_CS 1023
68 #define VERSION_SC 1030
69 
70 extern char VERSION_INFO[256];
71 
76 #define COMMAND_WINDOW 10
77 
78 #define STRINGCOMMAND 0
79 
84 #define MAX_SKILL CS_NUM_SKILLS
85 
86 #define MAXANIM 2000
87 
93 #define SC_NORMAL 0
94 #define SC_FIRERUN 1
95 #define SC_ALWAYS 2
96 #define SC_MOVETO 3
97 
99 typedef struct Animations {
100  guint16 flags;
101  guint8 num_animations;
105  guint8 speed;
106  guint8 speed_left;
107  guint8 phase;
108  guint16 *faces;
109 
110 } Animations;
111 
113 
115 #define COMMAND_MAX 255
116 
123 typedef struct {
124  GSocketConnection* fd;
125  int cs_version, sc_version;
127  guint16 command_sent, command_received;
135  char* servername;
136  gint8 dir[COMMAND_MAX]; //< Direction of sent movement command (or -1) for local prediction
137 } ClientSocket;
138 
139 extern ClientSocket csocket;
140 
141 extern char *sound_server;
142 extern const char *cache_dir, *config_dir;
143 
144 typedef enum {
145  Playing, //< including account login, character selection
147  Metaserver_Select //< only when metaserver window is up
148 } Input_State;
149 
150 typedef enum {
155 } rangetype;
156 
183 #define CONFIG_DOWNLOAD 1
184 #define CONFIG_ECHO 2
185 #define CONFIG_FASTTCP 3
186 #define CONFIG_CWINDOW 4
187 #define CONFIG_CACHE 5
188 #define CONFIG_FOGWAR 6
189 #define CONFIG_ICONSCALE 7
190 #define CONFIG_MAPSCALE 8
191 #define CONFIG_POPUPS 9
192 #define CONFIG_DISPLAYMODE 10
193 #define CONFIG_SHOWICON 11
194 #define CONFIG_TOOLTIPS 12
195 #define CONFIG_SOUND 13
196 #define CONFIG_SPLITINFO 14
197 #define CONFIG_SPLITWIN 15
198 #define CONFIG_SHOWGRID 16
199 #define CONFIG_LIGHTING 17
200 #define CONFIG_TRIMINFO 18
201 #define CONFIG_MAPWIDTH 19
202 #define CONFIG_MAPHEIGHT 20
203 #define CONFIG_FOODBEEP 21
204 #define CONFIG_DARKNESS 22
205 #define CONFIG_PORT 23
206 #define CONFIG_GRAD_COLOR 24
207 #define CONFIG_RESISTS 25
208 #define CONFIG_SMOOTH 26
209 #define CONFIG_SPLASH 27
210 #define CONFIG_APPLY_CONTAINER 28
211 #define CONFIG_MAPSCROLL 29
213 #define CONFIG_SIGNPOPUP 30
214 #define CONFIG_TIMESTAMP 31
215 #define CONFIG_AUTO_AFK 32
216 #define CONFIG_INV_MENU 33
217 #define CONFIG_MUSIC_VOL 34
218 #define CONFIG_SERVER_TICKS 35 //< Send "setup tick 1" for the server to send ticks, else generate our own
219 #define CONFIG_NUMS 36
222 
223 
228 #define CFG_LT_NONE 0
229 #define CFG_LT_TILE 1
230 #define CFG_LT_PIXEL 2
231 #define CFG_LT_PIXEL_BEST 3
232 
239 #define CFG_DM_PIXMAP 0
240 #define CFG_DM_SDL 1
241 #define CFG_DM_OPENGL 2
242 
245 
246 extern const char *const config_names[CONFIG_NUMS];
251 typedef struct Stat_struct {
252  gint8 Str;
253  gint8 Dex;
254  gint8 Con;
255  gint8 Wis;
256  gint8 Cha;
257  gint8 Int;
258  gint8 Pow;
259  gint8 wc;
260  gint8 ac;
261  gint8 level;
262  gint16 hp;
263  gint16 maxhp;
264  gint16 sp;
265  gint16 maxsp;
266  gint16 grace;
267  gint16 maxgrace;
268  gint64 exp;
269  gint16 food;
272  gint16 dam;
275  gint32 speed;
276  gint32 weapon_sp;
279  guint32 attuned;
282  guint32 repelled;
285  guint32 denied;
286  guint16 flags;
287  gint16 resists[30];
288  guint32 resist_change:1;
291  guint32 weight_limit;
292 } Stats;
293 
294 typedef struct Spell_struct {
296  char name[256];
297  char message[10000];
299  guint32 tag;
301  guint16 level;
302  guint16 time;
303  guint16 sp;
304  guint16 grace;
305  guint16 dam;
309  guint8 skill_number;
313  char *skill;
315  guint32 path;
319  gint32 face;
322  guint8 usage;
327  char requirements[256];
333 } Spell;
334 
335 typedef struct Player_Struct {
336  item *ob;
340  guint16 count_left;
346  guint8 ready_spell;
347  char spells[255][40];
351  char title[MAX_BUF];
352  char range[MAX_BUF];
353  guint32 spells_updated;
354  guint32 fire_on:1;
355  guint32 run_on:1;
356  guint32 meta_on:1;
357  guint32 alt_on:1;
358  guint32 no_echo:1;
359  guint32 count;
360  guint16 mmapx, mmapy;
361  guint16 pmapx, pmapy;
363  guint8 *magicmap;
364  guint8 showmagic;
366  guint16 mapxres,mapyres;
369  char *name;
376 } Client_Player;
377 
383 #define MAX_FACE_SETS 20
384 #define MAX_IMAGE_SIZE 320
392 
393 typedef struct FaceSets_struct {
394  guint8 setnum;
395  guint8 fallback;
396  char *prefix;
397  char *fullname;
398  char *size;
399  char *extension;
400  char *comment;
401 } FaceSets;
402 
407 typedef struct Face_Information_struct {
408  guint8 faceset;
410  gint16 num_images;
424 
426 
427 extern Client_Player cpl;
428 extern char *skill_names[MAX_SKILL];
429 
430 extern int last_used_skills[MAX_SKILL+1];
434 typedef enum {
435  LOG_DEBUG = 0,
436  LOG_INFO = 1,
438  LOG_ERROR = 3,
440 } LogLevel;
441 
445 #define NUM_RESISTS 18
446 
447 extern const char *const resists_name[NUM_RESISTS];
448 extern char *meta_server;
450 
454 typedef struct {
455  const char *name;
456  int value;
457 } NameMapping;
458 
460 
461 extern guint64 *exp_table;
462 extern guint16 exp_table_max;
463 
468 #define MAP_MAX_SIZE 25
469 
477 #define MIN_ALLOCATED_MAP_SIZE MAP_MAX_SIZE * 2
478 
484 #define MAX_MAP_OFFSET 8
485 
486 /* Start of map handling code.
487  *
488  * For the most part, this actually is not window system specific, but
489  * certainly how the client wants to store this may vary.
490  */
491 
492 #define MAXPIXMAPNUM 10000
493 
501 typedef struct Cache_Entry {
502  char *filename;
503  guint32 checksum;
504  guint32 ispublic:1;
505  void *image_data;
506  struct Cache_Entry *next;
507 } Cache_Entry;
508 
520 #define RI_IMAGE_INFO 0x1
521 #define RI_IMAGE_SUMS 0x2
522 
525 
526 typedef struct PlayerPosition {
527  int x;
528  int y;
530 
531 extern PlayerPosition pl_pos;
532 
533 typedef struct Msg_Type_Names {
534  int type;
535  int subtype;
536  const char *style_name;
540 
542 
543 /* declared/handled in commands.c . These variables are documented
544  * in that file - the data they present is created by the command
545  * code, but consumed by the GUI code.
546  */
547 extern char *motd, *news, *rules;
548 extern char *motd, *news, *rules; /* Declared/handled in commands.c */
551 
552 
553 
554 /*
555  * This structure is used to hold race/class adjustment info, as
556  * received by the requestinfo command. We get the same info
557  * for both races and class, so it simplifies code to share a structure.
558  */
559 /* This is how many stats (str, dex, con, etc) that are present
560  * in the create character window.
561  */
562 #define NUM_NEW_CHAR_STATS 7
563 
570 struct Stat_Mapping {
571  const char *widget_suffix; /* within the glade file, suffix used on widget */
572  guint8 cs_value; /* within the protocol, the CS_STAT value */
573  guint8 rc_offset; /* Offset into the stat_adj array */
574 };
575 
577 
587 struct RC_Choice {
588  char *choice_name; /* name to respond, eg, race_choice_1 */
589  char *choice_desc; /* Longer description of choice */
590  int num_values; /* How many values we have */
591  char **value_arch; /* Array arch names */
592  char **value_desc; /* Array of description */
593 };
594 
595 typedef struct Race_Class_Info {
596  char *arch_name; /* Name of the archetype this correponds to */
597  char *public_name; /* Public (human readadable) name */
598  char *description; /* Description of the race/class */
599  gint8 stat_adj[NUM_NEW_CHAR_STATS]; /* Adjustment values */
600  int num_rc_choice; /* Size of following array */
601  struct RC_Choice *rc_choice; /* array of choices */
603 
604 typedef struct Starting_Map_Info {
605  char *arch_name; /* Name of archetype for this map */
606  char *public_name; /* Name of the human readable name */
607  char *description; /* Description of this map */
609 
612 extern int starting_map_number;
613 extern int maxfd;
614 
615 /* End of commands.c data, start of other declarations */
616 #ifndef MIN
617 #define MIN(X__,Y__) ( (X__)<(Y__)?(X__):(Y__) )
618 #endif
619 
626 #define INFO_NEWS 1
627 #define INFO_MOTD 2
628 #define INFO_RULES 3
629 
631 #define CLIENT_ERROR client_error_quark()
632 
633 inline GQuark client_error_quark() {
634  return g_quark_from_static_string("client-error-quark");
635 }
636 
639 };
640 
641 /* We need to declare most of the structs before we can include this */
642 #include "proto.h"
643 
649 extern void client_connect(const char *hostname);
650 
657 extern void client_disconnect(void);
658 
667 extern void client_negotiate(int sound);
668 
672 extern void client_mapsize(int width, int height);
673 
678 extern void client_run(void);
679 
683 extern bool client_write(const void *buf, int len);
684 
685 extern bool client_is_connected(void);
686 
690 extern GSource *client_get_source(void);
691 
692 extern GTimer* global_time;
693 
694 extern bool debug_protocol;
695 char *printable(void *data, int len);
696 
697 #endif
range_wand
@ range_wand
Definition: client.h:152
Player_Struct::stats
Stats stats
Player stats.
Definition: client.h:349
Stat_struct::skill_level
gint16 skill_level[MAX_SKILL]
Level of known skills.
Definition: client.h:289
LOG_INFO
@ LOG_INFO
Minor, non-harmful issues.
Definition: client.h:436
Race_Class_Info::public_name
char * public_name
Definition: client.h:597
TextManager::type
int type
Definition: client.h:48
Stat_struct::Str
gint8 Str
Strength.
Definition: client.h:252
FaceSets_struct::comment
char * comment
Definition: client.h:400
NUM_RESISTS
#define NUM_RESISTS
Translation of the STAT_RES names into printable names, in matching order.
Definition: client.h:445
Spell_struct::message
char message[10000]
This is huge, the packets can't be much bigger than this anyway.
Definition: client.h:297
news
char * news
Definition: client.h:547
Msg_Type_Names
Definition: client.h:533
rangetype
rangetype
Definition: client.h:150
num_classes
int num_classes
Definition: client.h:549
LOG_WARNING
@ LOG_WARNING
Warning that something might not work.
Definition: client.h:437
Playing
@ Playing
Definition: client.h:145
Stat_Mapping::widget_suffix
const char * widget_suffix
Definition: client.h:571
ExtTextManager
void(* ExtTextManager)(int flag, int type, int subtype, char *message)
Definition: client.h:45
csocket
ClientSocket csocket
Definition: client.c:70
Animations
struct Animations Animations
Stat_Mapping
The usage of the stat_mapping is to simplify the code and make it easier to expand.
Definition: client.h:570
Spell_struct::tag
guint32 tag
Unique ID number for a spell so updspell etc can operate on it.
Definition: client.h:299
NameMapping
Holds the names that correspond to skill and resistance numbers.
Definition: client.h:454
Stat_struct::skill_exp
gint64 skill_exp[MAX_SKILL]
Experience points for skills.
Definition: client.h:290
Player_Struct::title
char title[MAX_BUF]
Title of character.
Definition: client.h:351
replyinfo_last_face
int replyinfo_last_face
Definition: client.h:524
Msg_Type_Names::style_name
const char * style_name
Name of this message in the configfile.
Definition: client.h:536
Player_Struct::fire_on
guint32 fire_on
True if fire key is pressed.
Definition: client.h:354
Msg_Type_Names::type
int type
Type of message.
Definition: client.h:534
client_mapsize
void client_mapsize(int width, int height)
Ask the server for the given map size.
Definition: client.c:171
RC_Choice
For classes & races, the server can present some number of choices, eg, the character gets to choose ...
Definition: client.h:587
ClientError
ClientError
Definition: client.h:637
PlayerPosition::x
int x
Definition: client.h:527
races
Race_Class_Info * races
Definition: commands.c:98
Msg_Type_Names::subtype
int subtype
Subtype of message.
Definition: client.h:535
Player_Struct::input_state
Input_State input_state
What the input state is.
Definition: client.h:341
used_classes
int used_classes
Definition: client.h:549
ClientSocket::fd
GSocketConnection * fd
Definition: client.h:124
Face_Information_struct::num_images
gint16 num_images
Definition: client.h:410
Cache_Entry
Used mostly in the cache.c file, however, it can be returned to the graphic side of things so that th...
Definition: client.h:501
range_magic
@ range_magic
Definition: client.h:151
Player_Struct::run_on
guint32 run_on
True if run key is on.
Definition: client.h:355
Configure_Keys
@ Configure_Keys
Definition: client.h:146
Stat_struct::Con
gint8 Con
Constitution.
Definition: client.h:254
Starting_Map_Info::public_name
char * public_name
Definition: client.h:606
used_races
int used_races
Definition: client.h:549
config_dir
const char * config_dir
Definition: client.h:142
RC_Choice::value_desc
char ** value_desc
Definition: client.h:592
COMMAND_MAX
#define COMMAND_MAX
Largest ncom command number to send before wrapping.
Definition: client.h:115
Animations::phase
guint8 phase
Definition: client.h:107
resists_name
const char *const resists_name[NUM_RESISTS]
Definition: client.c:73
Stat_struct::food
gint16 food
Quantity food in stomach.
Definition: client.h:269
FaceSets_struct
Definition: client.h:393
Player_Struct::mapyres
guint16 mapyres
Resolution to draw on the magic map.
Definition: client.h:366
RC_Choice::value_arch
char ** value_arch
Definition: client.h:591
Player_Struct::spells
char spells[255][40]
List of all the spells the.
Definition: client.h:347
Player_Struct::meta_on
guint32 meta_on
True if fire key is pressed.
Definition: client.h:356
RC_Choice::choice_desc
char * choice_desc
Definition: client.h:589
Stat_struct::ac
gint8 ac
Armour Class.
Definition: client.h:260
requestinfo_sent
int requestinfo_sent
Definition: client.h:524
range_bottom
@ range_bottom
Definition: client.h:151
Reply_One
@ Reply_One
Definition: client.h:146
Face_Information
struct Face_Information_struct Face_Information
One struct that holds most of the image related data to reduce danger of namespace collision.
resist_mapping
NameMapping resist_mapping[NUM_RESISTS]
Definition: client.h:459
Stat_Mapping::rc_offset
guint8 rc_offset
Definition: client.h:573
Stat_struct::weapon_sp
gint32 weapon_sp
Weapon speed (displayed in client as a float)
Definition: client.h:276
Animations::num_animations
guint8 num_animations
Number of animations.
Definition: client.h:101
ClientSocket::command_time
int command_time
Time (in ms) players commands currently take to execute.
Definition: client.h:132
Stat_struct::hp
gint16 hp
Hit Points.
Definition: client.h:262
face_info
Face_Information face_info
Definition: image.c:169
FaceSets_struct::size
char * size
Definition: client.h:398
Stat_struct::maxgrace
gint16 maxgrace
Maximum spell points.
Definition: client.h:267
range_rod
@ range_rod
Definition: client.h:152
RC_Choice::num_values
int num_values
Definition: client.h:590
height
static int height
Definition: mapdata.c:101
NameMapping::name
const char * name
Definition: client.h:455
Stat_struct::exp
gint64 exp
Experience.
Definition: client.h:268
range_bow
@ range_bow
Definition: client.h:151
serverloginmethod
int serverloginmethod
Definition: client.c:62
range_scroll
@ range_scroll
Definition: client.h:152
client_disconnect
void client_disconnect(void)
Closes the connection to the server.
Definition: client.c:175
client_run
void client_run(void)
Read available packets from the server and handle commands until there are no more,...
Definition: client.c:202
Spell_struct::skill_number
guint8 skill_number
The index in the skill arrays, plus CS_STAT_SKILLINFO.
Definition: client.h:309
Face_Information_struct
One struct that holds most of the image related data to reduce danger of namespace collision.
Definition: client.h:407
LogLevel
LogLevel
Definition: client.h:434
Spell_struct::requirements
char requirements[256]
Spellmon 2 data.
Definition: client.h:327
Player_Struct::count_left
guint16 count_left
count for commands
Definition: client.h:340
client_is_connected
bool client_is_connected(void)
Definition: client.c:320
Player_Struct::input_text
char input_text[MAX_BUF]
keys typed (for long commands)
Definition: client.h:343
Animations::speed
guint8 speed
Definition: client.h:105
Stat_Mapping::cs_value
guint8 cs_value
Definition: client.h:572
ClientSocket::sc_version
int sc_version
Server versions of these.
Definition: client.h:125
Face_Information_struct::bmaps_checksum
guint32 bmaps_checksum
Definition: client.h:411
config_names
const char *const config_names[CONFIG_NUMS]
See common/init.c - number mapping used when loading/saving the values.
Definition: init.c:30
Stat_struct::resists
gint16 resists[30]
Resistant values.
Definition: client.h:287
version.h
TextManager::next
struct TextManager * next
Definition: client.h:50
CLIENT_ERROR_TOOBIG
@ CLIENT_ERROR_TOOBIG
Definition: client.h:638
Stat_struct::flags
guint16 flags
Contains fire on/run on flags.
Definition: client.h:286
TextManager::callback
ExtTextManager callback
Definition: client.h:49
PlayerPosition::y
int y
Definition: client.h:528
Cache_Entry
struct Cache_Entry Cache_Entry
Used mostly in the cache.c file, however, it can be returned to the graphic side of things so that th...
FaceSets_struct::prefix
char * prefix
Definition: client.h:396
Player_Struct::mmapx
guint16 mmapx
Definition: client.h:360
Reply_Many
@ Reply_Many
Definition: client.h:146
Stat_struct::grace
gint16 grace
Spell points for using prayers.
Definition: client.h:266
TextManager
Definition: client.h:47
range_size
@ range_size
Definition: client.h:154
Stat_struct::resist_change
guint32 resist_change
Resistant value change flag.
Definition: client.h:288
LOG_CRITICAL
@ LOG_CRITICAL
Fatal crash-worthy error.
Definition: client.h:439
Spell_struct
Definition: client.h:294
printable
char * printable(void *data, int len)
Replace the non-printable characters in 'data' with a dot ('.
Definition: client.c:186
Starting_Map_Info::arch_name
char * arch_name
Definition: client.h:605
Stat_struct::Int
gint8 Int
Intelligence.
Definition: client.h:257
Spell_struct::next
struct Spell_struct * next
Definition: client.h:295
starting_map_info
Starting_Map_Info * starting_map_info
Definition: commands.c:99
Face_Information_struct::cache_misses
gint16 cache_misses
Definition: client.h:418
NUM_NEW_CHAR_STATS
#define NUM_NEW_CHAR_STATS
Definition: client.h:562
skill_mapping
NameMapping skill_mapping[MAX_SKILL]
Definition: client.c:67
stat_min
int stat_min
Definition: client.h:550
Stat_struct::sp
gint16 sp
Spell points for casting spells.
Definition: client.h:264
Spell_struct::face
gint32 face
A face ID that may be used to show a graphic representation of the spell.
Definition: client.h:319
CONFIG_NUMS
#define CONFIG_NUMS
This should always be the last value in the CONFIG_xxx list.
Definition: client.h:219
Player_Struct::container
item * container
open container
Definition: client.h:339
client_connect
void client_connect(const char *hostname)
Open a socket to the given hostname and store connection information.
Face_Information_struct::facesets
FaceSets facesets[MAX_FACE_SETS]
Definition: client.h:422
Stat_struct::speed
gint32 speed
Speed (is displayed as a float)
Definition: client.h:275
FaceSets
struct FaceSets_struct FaceSets
proto.h
maxfd
int maxfd
Definition: client.c:58
MAX_BUF
#define MAX_BUF
Definition: client.h:40
Stat_struct::level
gint8 level
Experience level.
Definition: client.h:261
Stat_struct::maxhp
gint16 maxhp
Maximum hit points.
Definition: client.h:263
Player_Struct::last_command
char last_command[MAX_BUF]
Last command entered.
Definition: client.h:342
Race_Class_Info::rc_choice
struct RC_Choice * rc_choice
Definition: client.h:601
Player_Struct::ranges
item * ranges[range_size]
Object that is used for that.
Definition: client.h:344
Spell_struct::name
char name[256]
One length byte plus data
Definition: client.h:296
debug_protocol
bool debug_protocol
Definition: main.c:61
replyinfo_status
int replyinfo_status
Definition: client.c:57
Race_Class_Info::description
char * description
Definition: client.h:598
client_get_source
GSource * client_get_source(void)
Return a source triggered when input from the server is available.
Definition: client.c:324
ClientSocket::servername
char * servername
Definition: client.h:135
Player_Struct::ob
item * ob
Player object.
Definition: client.h:336
Player_Struct::pmapx
guint16 pmapx
Definition: client.h:361
Cache_Entry::checksum
guint32 checksum
Definition: client.h:503
Player_Struct::range
char range[MAX_BUF]
Range attack chosen.
Definition: client.h:352
Stat_struct::maxsp
gint16 maxsp
Maximum spell points.
Definition: client.h:265
Spell_struct::skill
char * skill
Pointer to the skill name, derived from the skill number.
Definition: client.h:313
meta_server
char * meta_server
stat_maximum
int stat_maximum
Definition: client.h:550
MAX_SKILL
#define MAX_SKILL
How many skill types server supports/client will get sent to it.
Definition: client.h:84
Spell
struct Spell_struct Spell
NameMapping::value
int value
Definition: client.h:456
Face_Information_struct::want_faceset
char * want_faceset
Definition: client.h:409
Command_Mode
@ Command_Mode
Definition: client.h:146
width
static int width
Definition: mapdata.c:100
Player_Struct::alt_on
guint32 alt_on
True if fire key is pressed.
Definition: client.h:357
Race_Class_Info::num_rc_choice
int num_rc_choice
Definition: client.h:600
starting_map_number
int starting_map_number
Definition: commands.c:96
want_config
gint16 want_config[CONFIG_NUMS]
Definition: init.c:43
Race_Class_Info::stat_adj
gint8 stat_adj[NUM_NEW_CHAR_STATS]
Definition: client.h:599
Race_Class_Info
struct Race_Class_Info Race_Class_Info
RC_Choice::choice_name
char * choice_name
Definition: client.h:588
MAX_FACE_SETS
#define MAX_FACE_SETS
Definition: client.h:383
Race_Class_Info
Definition: client.h:595
FaceSets_struct::extension
char * extension
Definition: client.h:399
Player_Struct::magicmap
guint8 * magicmap
Magic map data.
Definition: client.h:363
Player_Struct::no_echo
guint32 no_echo
If TRUE, don't echo keystrokes.
Definition: client.h:358
Stat_struct::wc
gint8 wc
Weapon Class.
Definition: client.h:259
Spell_struct::path
guint32 path
The bitmask of paths this spell belongs to.
Definition: client.h:315
range_none
@ range_none
Definition: client.h:151
FaceSets_struct::setnum
guint8 setnum
Definition: client.h:394
cache_dir
const char * cache_dir
Definition: client.c:53
skill_names
char * skill_names[MAX_SKILL]
Definition: client.c:50
Animations::speed_left
guint8 speed_left
Definition: client.h:106
Player_Struct::name
char * name
Name of PC, set and freed in account.c play_character() (using data returned from server to AccountPl...
Definition: client.h:369
stat_mapping
struct Stat_Mapping stat_mapping[NUM_NEW_CHAR_STATS]
Definition: commands.c:118
Stats
struct Stat_struct Stats
Stat_struct::dam
gint16 dam
How much damage this object does for each hit.
Definition: client.h:272
firstTextManager
TextManager * firstTextManager
Definition: commands.c:1244
Cache_Entry::image_data
void * image_data
Definition: client.h:505
Input_State
Input_State
Definition: client.h:144
Spell_struct::usage
guint8 usage
Spellmon 2 data.
Definition: client.h:322
client_error_quark
GQuark client_error_quark()
Definition: client.h:633
item_struct
Definition: item.h:50
ClientSocket
Basic support for socket communications, including the file descriptor, input buffer,...
Definition: client.h:123
Player_Struct::showmagic
guint8 showmagic
If 0, show the normal map, otherwise show the magic map.
Definition: client.h:364
Player_Struct::mapxres
guint16 mapxres
Definition: client.h:366
last_used_skills
int last_used_skills[MAX_SKILL+1]
maps position to skill id with trailing zero as stop mark.
Definition: client.c:55
cpl
Client_Player cpl
Player object.
Definition: client.c:69
Player_Struct::pmapy
guint16 pmapy
Where the player is on the magic map.
Definition: client.h:361
Face_Information_struct::old_bmaps_checksum
guint32 old_bmaps_checksum
Definition: client.h:411
LOG_ERROR
@ LOG_ERROR
Warning that something definitely didn't work.
Definition: client.h:438
range_steal
@ range_steal
Definition: client.h:153
Animations::faces
guint16 * faces
Definition: client.h:108
Animations
Definition: client.h:99
Cache_Entry::ispublic
guint32 ispublic
Definition: client.h:504
sound_server
char * sound_server
Definition: client.c:51
FaceSets_struct::fullname
char * fullname
Definition: client.h:397
Player_Struct
Definition: client.h:335
Stat_struct::Pow
gint8 Pow
Power.
Definition: client.h:258
Starting_Map_Info::description
char * description
Definition: client.h:607
Player_Struct::below
item * below
Items below the player (pl.below->inv)
Definition: client.h:337
Animations::flags
guint16 flags
Definition: client.h:100
Spell_struct::sp
guint16 sp
Mana per cast; may be zero.
Definition: client.h:303
Starting_Map_Info
struct Starting_Map_Info Starting_Map_Info
Stat_struct::repelled
guint32 repelled
Spell paths to which the player is repelled.
Definition: client.h:282
global_time
GTimer * global_time
Definition: misc.c:31
Stat_struct
Definition: client.h:251
VERSION_INFO
char VERSION_INFO[256]
Definition: client.c:48
Face_Information_struct::faceset
guint8 faceset
Definition: client.h:408
rules
char * rules
Definition: client.h:547
Spell_struct::dam
guint16 dam
Damage done by spell though the meaning is spell dependent and actual damage may depend on how the sp...
Definition: client.h:305
motd
char * motd
Definition: client.h:548
PlayerPosition
Definition: client.h:526
TextManager
struct TextManager TextManager
exp_table_max
guint16 exp_table_max
Definition: client.c:64
range_horn
@ range_horn
Definition: client.h:152
Spell_struct::level
guint16 level
The casting level of the spell.
Definition: client.h:301
newclient.h
Stat_struct::weight_limit
guint32 weight_limit
Carrying weight limit.
Definition: client.h:291
Metaserver_Select
@ Metaserver_Select
Definition: client.h:147
Player_Struct::count
guint32 count
Repeat count on command.
Definition: client.h:359
num_races
int num_races
Definition: commands.c:87
pl_pos
PlayerPosition pl_pos
Position of the player on the internal map.
Definition: mapdata.c:30
Msg_Type_Names
struct Msg_Type_Names Msg_Type_Names
stat_points
int stat_points
Definition: commands.c:93
use_config
gint16 use_config[CONFIG_NUMS]
Definition: client.h:244
Face_Information_struct::have_faceset_info
guint8 have_faceset_info
Simple value to know if there is data in facesets[].
Definition: client.h:419
Player_Struct::ready_spell
guint8 ready_spell
Index to spell that is readied.
Definition: client.h:346
Stat_struct::denied
guint32 denied
Spell paths denied to the player.
Definition: client.h:285
wantloginmethod
int wantloginmethod
Definition: client.h:449
Stat_struct::Cha
gint8 Cha
Charisma.
Definition: client.h:256
exp_table
guint64 * exp_table
Definition: client.c:65
Face_Information_struct::cache_hits
gint16 cache_hits
Just for debugging/logging purposes.
Definition: client.h:418
Stat_struct::Wis
gint8 Wis
Wisdom.
Definition: client.h:255
Player_Struct::mmapy
guint16 mmapy
size of magic map
Definition: client.h:360
ClientSocket::command_sent
guint16 command_sent
Definition: client.h:127
Spell_struct::time
guint16 time
Casting time in server ticks.
Definition: client.h:302
MAXANIM
#define MAXANIM
Definition: client.h:86
Spell_struct::grace
guint16 grace
Grace per cast; may be zero.
Definition: client.h:304
animations
Animations animations[MAXANIM]
Definition: commands.c:1155
Cache_Entry::filename
char * filename
Definition: client.h:502
Stat_struct::attuned
guint32 attuned
Spell paths to which the player is attuned.
Definition: client.h:279
Player_Struct::spelldata
Spell * spelldata
List of spells known.
Definition: client.h:350
Player_Struct::spells_updated
guint32 spells_updated
Whether or not spells updated.
Definition: client.h:353
LOG_DEBUG
@ LOG_DEBUG
Useful debugging information.
Definition: client.h:435
PlayerPosition
struct PlayerPosition PlayerPosition
client_negotiate
void client_negotiate(int sound)
This function negotiates the characteriistics of a connection to the server.
Definition: client.c:329
client_write
bool client_write(const void *buf, int len)
Write the given data to the server.
Client_Player
struct Player_Struct Client_Player
Stat_struct::Dex
gint8 Dex
Dexterity.
Definition: client.h:253
Cache_Entry::next
struct Cache_Entry * next
Definition: client.h:506
Starting_Map_Info
Definition: client.h:604
FaceSets_struct::fallback
guint8 fallback
Definition: client.h:395
Race_Class_Info::arch_name
char * arch_name
Definition: client.h:596
classes
Race_Class_Info * classes
Definition: client.h:610
item.h