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_DEBOUNCE 36
220 #define CONFIG_NUMS 37
223 
224 
229 #define CFG_LT_NONE 0
230 #define CFG_LT_TILE 1
231 #define CFG_LT_PIXEL 2
232 #define CFG_LT_PIXEL_BEST 3
233 
240 #define CFG_DM_PIXMAP 0
241 #define CFG_DM_SDL 1
242 #define CFG_DM_OPENGL 2
243 
246 
247 extern const char *const config_names[CONFIG_NUMS];
252 typedef struct Stat_struct {
253  gint8 Str;
254  gint8 Dex;
255  gint8 Con;
256  gint8 Wis;
257  gint8 Cha;
258  gint8 Int;
259  gint8 Pow;
260  gint8 wc;
261  gint8 ac;
262  gint8 level;
263  gint16 hp;
264  gint16 maxhp;
265  gint16 sp;
266  gint16 maxsp;
267  gint16 grace;
268  gint16 maxgrace;
269  gint64 exp;
270  gint16 food;
273  gint16 dam;
276  gint32 speed;
277  gint32 weapon_sp;
280  guint32 attuned;
283  guint32 repelled;
286  guint32 denied;
287  guint16 flags;
288  gint16 resists[30];
289  guint32 resist_change:1;
292  guint32 weight_limit;
293 } Stats;
294 
295 typedef struct Spell_struct {
297  char name[256];
298  char message[10000];
300  guint32 tag;
302  guint16 level;
303  guint16 time;
304  guint16 sp;
305  guint16 grace;
306  guint16 dam;
310  guint8 skill_number;
314  char *skill;
316  guint32 path;
320  gint32 face;
323  guint8 usage;
328  char requirements[256];
334 } Spell;
335 
336 typedef struct Player_Struct {
337  item *ob;
341  guint16 count_left;
347  guint8 ready_spell;
348  char spells[255][40];
352  char title[MAX_BUF];
353  char range[MAX_BUF];
354  guint32 spells_updated;
355  guint32 fire_on:1;
356  guint32 run_on:1;
357  guint32 meta_on:1;
358  guint32 alt_on:1;
359  guint32 no_echo:1;
360  guint32 count;
361  guint16 mmapx, mmapy;
362  guint16 pmapx, pmapy;
364  guint8 *magicmap;
365  guint8 showmagic;
367  guint16 mapxres,mapyres;
370  char *name;
377 } Client_Player;
378 
384 #define MAX_FACE_SETS 20
385 #define MAX_IMAGE_SIZE 320
393 
394 typedef struct FaceSets_struct {
395  guint8 setnum;
396  guint8 fallback;
397  char *prefix;
398  char *fullname;
399  char *size;
400  char *extension;
401  char *comment;
402 } FaceSets;
403 
408 typedef struct Face_Information_struct {
409  guint8 faceset;
411  gint16 num_images;
425 
427 
428 extern Client_Player cpl;
429 extern char *skill_names[MAX_SKILL];
430 
431 extern int last_used_skills[MAX_SKILL+1];
435 typedef enum {
436  LOG_DEBUG = 0,
437  LOG_INFO = 1,
439  LOG_ERROR = 3,
441 } LogLevel;
442 
446 #define NUM_RESISTS 18
447 
448 extern const char *const resists_name[NUM_RESISTS];
449 extern char *meta_server;
451 
455 typedef struct {
456  const char *name;
457  int value;
458 } NameMapping;
459 
461 
462 extern guint64 *exp_table;
463 extern guint16 exp_table_max;
464 
469 #define MAP_MAX_SIZE 25
470 
478 #define MIN_ALLOCATED_MAP_SIZE MAP_MAX_SIZE * 2
479 
485 #define MAX_MAP_OFFSET 8
486 
487 /* Start of map handling code.
488  *
489  * For the most part, this actually is not window system specific, but
490  * certainly how the client wants to store this may vary.
491  */
492 
493 #define MAXPIXMAPNUM 10000
494 
502 typedef struct Cache_Entry {
503  char *filename;
504  guint32 checksum;
505  guint32 ispublic:1;
506  void *image_data;
507  struct Cache_Entry *next;
508 } Cache_Entry;
509 
521 #define RI_IMAGE_INFO 0x1
522 #define RI_IMAGE_SUMS 0x2
523 
526 
527 typedef struct PlayerPosition {
528  int x;
529  int y;
531 
532 extern PlayerPosition pl_pos;
533 
534 typedef struct Msg_Type_Names {
535  int type;
536  int subtype;
537  const char *style_name;
541 
543 
544 /* declared/handled in commands.c . These variables are documented
545  * in that file - the data they present is created by the command
546  * code, but consumed by the GUI code.
547  */
548 extern char *motd, *news, *rules;
549 extern char *motd, *news, *rules; /* Declared/handled in commands.c */
552 
553 
554 
555 /*
556  * This structure is used to hold race/class adjustment info, as
557  * received by the requestinfo command. We get the same info
558  * for both races and class, so it simplifies code to share a structure.
559  */
560 /* This is how many stats (str, dex, con, etc) that are present
561  * in the create character window.
562  */
563 #define NUM_NEW_CHAR_STATS 7
564 
571 struct Stat_Mapping {
572  const char *widget_suffix; /* within the glade file, suffix used on widget */
573  guint8 cs_value; /* within the protocol, the CS_STAT value */
574  guint8 rc_offset; /* Offset into the stat_adj array */
575 };
576 
578 
588 struct RC_Choice {
589  char *choice_name; /* name to respond, eg, race_choice_1 */
590  char *choice_desc; /* Longer description of choice */
591  int num_values; /* How many values we have */
592  char **value_arch; /* Array arch names */
593  char **value_desc; /* Array of description */
594 };
595 
596 typedef struct Race_Class_Info {
597  char *arch_name; /* Name of the archetype this correponds to */
598  char *public_name; /* Public (human readadable) name */
599  char *description; /* Description of the race/class */
600  gint8 stat_adj[NUM_NEW_CHAR_STATS]; /* Adjustment values */
601  int num_rc_choice; /* Size of following array */
602  struct RC_Choice *rc_choice; /* array of choices */
604 
605 typedef struct Starting_Map_Info {
606  char *arch_name; /* Name of archetype for this map */
607  char *public_name; /* Name of the human readable name */
608  char *description; /* Description of this map */
610 
613 extern int starting_map_number;
614 extern int maxfd;
615 
616 /* End of commands.c data, start of other declarations */
617 #ifndef MIN
618 #define MIN(X__,Y__) ( (X__)<(Y__)?(X__):(Y__) )
619 #endif
620 
627 #define INFO_NEWS 1
628 #define INFO_MOTD 2
629 #define INFO_RULES 3
630 
632 #define CLIENT_ERROR client_error_quark()
633 
634 inline GQuark client_error_quark() {
635  return g_quark_from_static_string("client-error-quark");
636 }
637 
640 };
641 
642 /* We need to declare most of the structs before we can include this */
643 #include "proto.h"
644 
649 extern int render_debug_layers;
650 
656 extern void client_connect(const char *hostname);
657 
664 extern void client_disconnect(void);
665 
674 extern bool client_negotiate(int sound);
675 
679 extern void client_mapsize(int width, int height);
680 
685 extern void client_run(void);
686 
690 extern bool client_write(const void *buf, int len);
691 
692 extern bool client_is_connected(void);
693 
697 extern GSource *client_get_source(void);
698 
699 extern GTimer* global_time;
700 
701 extern bool debug_protocol;
702 char *printable(void *data, int len);
703 
704 #endif
range_wand
@ range_wand
Definition: client.h:152
Player_Struct::stats
Stats stats
Player stats.
Definition: client.h:350
Stat_struct::skill_level
gint16 skill_level[MAX_SKILL]
Level of known skills.
Definition: client.h:290
LOG_INFO
@ LOG_INFO
Minor, non-harmful issues.
Definition: client.h:437
Race_Class_Info::public_name
char * public_name
Definition: client.h:598
TextManager::type
int type
Definition: client.h:48
Stat_struct::Str
gint8 Str
Strength.
Definition: client.h:253
FaceSets_struct::comment
char * comment
Definition: client.h:401
NUM_RESISTS
#define NUM_RESISTS
Translation of the STAT_RES names into printable names, in matching order.
Definition: client.h:446
Spell_struct::message
char message[10000]
This is huge, the packets can't be much bigger than this anyway.
Definition: client.h:298
news
char * news
Definition: client.h:548
Msg_Type_Names
Definition: client.h:534
rangetype
rangetype
Definition: client.h:150
num_classes
int num_classes
Definition: client.h:550
LOG_WARNING
@ LOG_WARNING
Warning that something might not work.
Definition: client.h:438
Playing
@ Playing
Definition: client.h:145
Stat_Mapping::widget_suffix
const char * widget_suffix
Definition: client.h:572
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:571
Spell_struct::tag
guint32 tag
Unique ID number for a spell so updspell etc can operate on it.
Definition: client.h:300
NameMapping
Holds the names that correspond to skill and resistance numbers.
Definition: client.h:455
Stat_struct::skill_exp
gint64 skill_exp[MAX_SKILL]
Experience points for skills.
Definition: client.h:291
Player_Struct::title
char title[MAX_BUF]
Title of character.
Definition: client.h:352
replyinfo_last_face
int replyinfo_last_face
Definition: client.h:525
Msg_Type_Names::style_name
const char * style_name
Name of this message in the configfile.
Definition: client.h:537
Player_Struct::fire_on
guint32 fire_on
True if fire key is pressed.
Definition: client.h:355
Msg_Type_Names::type
int type
Type of message.
Definition: client.h:535
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:588
ClientError
ClientError
Definition: client.h:638
PlayerPosition::x
int x
Definition: client.h:528
races
Race_Class_Info * races
Definition: commands.c:98
Msg_Type_Names::subtype
int subtype
Subtype of message.
Definition: client.h:536
Player_Struct::input_state
Input_State input_state
What the input state is.
Definition: client.h:342
used_classes
int used_classes
Definition: client.h:550
ClientSocket::fd
GSocketConnection * fd
Definition: client.h:124
Face_Information_struct::num_images
gint16 num_images
Definition: client.h:411
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:502
range_magic
@ range_magic
Definition: client.h:151
Player_Struct::run_on
guint32 run_on
True if run key is on.
Definition: client.h:356
Configure_Keys
@ Configure_Keys
Definition: client.h:146
Stat_struct::Con
gint8 Con
Constitution.
Definition: client.h:255
Starting_Map_Info::public_name
char * public_name
Definition: client.h:607
used_races
int used_races
Definition: client.h:550
config_dir
const char * config_dir
Definition: client.h:142
RC_Choice::value_desc
char ** value_desc
Definition: client.h:593
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:270
FaceSets_struct
Definition: client.h:394
Player_Struct::mapyres
guint16 mapyres
Resolution to draw on the magic map.
Definition: client.h:367
RC_Choice::value_arch
char ** value_arch
Definition: client.h:592
Player_Struct::spells
char spells[255][40]
List of all the spells the.
Definition: client.h:348
Player_Struct::meta_on
guint32 meta_on
True if fire key is pressed.
Definition: client.h:357
RC_Choice::choice_desc
char * choice_desc
Definition: client.h:590
Stat_struct::ac
gint8 ac
Armour Class.
Definition: client.h:261
requestinfo_sent
int requestinfo_sent
Definition: client.h:525
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:460
Stat_Mapping::rc_offset
guint8 rc_offset
Definition: client.h:574
Stat_struct::weapon_sp
gint32 weapon_sp
Weapon speed (displayed in client as a float)
Definition: client.h:277
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:263
face_info
Face_Information face_info
Definition: image.c:169
FaceSets_struct::size
char * size
Definition: client.h:399
Stat_struct::maxgrace
gint16 maxgrace
Maximum spell points.
Definition: client.h:268
range_rod
@ range_rod
Definition: client.h:152
RC_Choice::num_values
int num_values
Definition: client.h:591
height
static int height
Definition: mapdata.c:101
NameMapping::name
const char * name
Definition: client.h:456
Stat_struct::exp
gint64 exp
Experience.
Definition: client.h:269
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:310
Face_Information_struct
One struct that holds most of the image related data to reduce danger of namespace collision.
Definition: client.h:408
LogLevel
LogLevel
Definition: client.h:435
Spell_struct::requirements
char requirements[256]
Spellmon 2 data.
Definition: client.h:328
Player_Struct::count_left
guint16 count_left
count for commands
Definition: client.h:341
client_is_connected
bool client_is_connected(void)
Definition: client.c:321
Player_Struct::input_text
char input_text[MAX_BUF]
keys typed (for long commands)
Definition: client.h:344
Animations::speed
guint8 speed
Definition: client.h:105
Stat_Mapping::cs_value
guint8 cs_value
Definition: client.h:573
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:412
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:288
version.h
TextManager::next
struct TextManager * next
Definition: client.h:50
CLIENT_ERROR_TOOBIG
@ CLIENT_ERROR_TOOBIG
Definition: client.h:639
Stat_struct::flags
guint16 flags
Contains fire on/run on flags.
Definition: client.h:287
TextManager::callback
ExtTextManager callback
Definition: client.h:49
PlayerPosition::y
int y
Definition: client.h:529
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:397
Player_Struct::mmapx
guint16 mmapx
Definition: client.h:361
render_debug_layers
int render_debug_layers
Current number of layers to render for renderer debugging purposes.
Definition: p_cmd.c:46
Reply_Many
@ Reply_Many
Definition: client.h:146
Stat_struct::grace
gint16 grace
Spell points for using prayers.
Definition: client.h:267
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:289
LOG_CRITICAL
@ LOG_CRITICAL
Fatal crash-worthy error.
Definition: client.h:440
Spell_struct
Definition: client.h:295
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:606
Stat_struct::Int
gint8 Int
Intelligence.
Definition: client.h:258
Spell_struct::next
struct Spell_struct * next
Definition: client.h:296
starting_map_info
Starting_Map_Info * starting_map_info
Definition: commands.c:99
Face_Information_struct::cache_misses
gint16 cache_misses
Definition: client.h:419
NUM_NEW_CHAR_STATS
#define NUM_NEW_CHAR_STATS
Definition: client.h:563
skill_mapping
NameMapping skill_mapping[MAX_SKILL]
Definition: client.c:67
stat_min
int stat_min
Definition: client.h:551
Stat_struct::sp
gint16 sp
Spell points for casting spells.
Definition: client.h:265
Spell_struct::face
gint32 face
A face ID that may be used to show a graphic representation of the spell.
Definition: client.h:320
CONFIG_NUMS
#define CONFIG_NUMS
This should always be the last value in the CONFIG_xxx list.
Definition: client.h:220
Player_Struct::container
item * container
open container
Definition: client.h:340
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:423
Stat_struct::speed
gint32 speed
Speed (is displayed as a float)
Definition: client.h:276
FaceSets
struct FaceSets_struct FaceSets
proto.h
maxfd
int maxfd
Definition: client.c:58
client_negotiate
bool client_negotiate(int sound)
This function negotiates the characteriistics of a connection to the server.
Definition: client.c:330
MAX_BUF
#define MAX_BUF
Definition: client.h:40
Stat_struct::level
gint8 level
Experience level.
Definition: client.h:262
Stat_struct::maxhp
gint16 maxhp
Maximum hit points.
Definition: client.h:264
Player_Struct::last_command
char last_command[MAX_BUF]
Last command entered.
Definition: client.h:343
Race_Class_Info::rc_choice
struct RC_Choice * rc_choice
Definition: client.h:602
Player_Struct::ranges
item * ranges[range_size]
Object that is used for that.
Definition: client.h:345
Spell_struct::name
char name[256]
One length byte plus data
Definition: client.h:297
debug_protocol
bool debug_protocol
Definition: main.c:65
replyinfo_status
int replyinfo_status
Definition: client.c:57
Race_Class_Info::description
char * description
Definition: client.h:599
client_get_source
GSource * client_get_source(void)
Return a source triggered when input from the server is available.
Definition: client.c:325
ClientSocket::servername
char * servername
Definition: client.h:135
Player_Struct::ob
item * ob
Player object.
Definition: client.h:337
Player_Struct::pmapx
guint16 pmapx
Definition: client.h:362
Cache_Entry::checksum
guint32 checksum
Definition: client.h:504
Player_Struct::range
char range[MAX_BUF]
Range attack chosen.
Definition: client.h:353
Stat_struct::maxsp
gint16 maxsp
Maximum spell points.
Definition: client.h:266
Spell_struct::skill
char * skill
Pointer to the skill name, derived from the skill number.
Definition: client.h:314
meta_server
char * meta_server
stat_maximum
int stat_maximum
Definition: client.h:551
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:457
Face_Information_struct::want_faceset
char * want_faceset
Definition: client.h:410
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:358
Race_Class_Info::num_rc_choice
int num_rc_choice
Definition: client.h:601
starting_map_number
int starting_map_number
Definition: commands.c:96
want_config
gint16 want_config[CONFIG_NUMS]
Definition: init.c:44
Race_Class_Info::stat_adj
gint8 stat_adj[NUM_NEW_CHAR_STATS]
Definition: client.h:600
Race_Class_Info
struct Race_Class_Info Race_Class_Info
RC_Choice::choice_name
char * choice_name
Definition: client.h:589
MAX_FACE_SETS
#define MAX_FACE_SETS
Definition: client.h:384
Race_Class_Info
Definition: client.h:596
FaceSets_struct::extension
char * extension
Definition: client.h:400
Player_Struct::magicmap
guint8 * magicmap
Magic map data.
Definition: client.h:364
Player_Struct::no_echo
guint32 no_echo
If TRUE, don't echo keystrokes.
Definition: client.h:359
Stat_struct::wc
gint8 wc
Weapon Class.
Definition: client.h:260
Spell_struct::path
guint32 path
The bitmask of paths this spell belongs to.
Definition: client.h:316
range_none
@ range_none
Definition: client.h:151
FaceSets_struct::setnum
guint8 setnum
Definition: client.h:395
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:370
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:273
firstTextManager
TextManager * firstTextManager
Definition: commands.c:1245
Cache_Entry::image_data
void * image_data
Definition: client.h:506
Input_State
Input_State
Definition: client.h:144
Spell_struct::usage
guint8 usage
Spellmon 2 data.
Definition: client.h:323
client_error_quark
GQuark client_error_quark()
Definition: client.h:634
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:365
Player_Struct::mapxres
guint16 mapxres
Definition: client.h:367
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:362
Face_Information_struct::old_bmaps_checksum
guint32 old_bmaps_checksum
Definition: client.h:412
LOG_ERROR
@ LOG_ERROR
Warning that something definitely didn't work.
Definition: client.h:439
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:505
sound_server
char * sound_server
Definition: client.c:51
FaceSets_struct::fullname
char * fullname
Definition: client.h:398
Player_Struct
Definition: client.h:336
Stat_struct::Pow
gint8 Pow
Power.
Definition: client.h:259
Starting_Map_Info::description
char * description
Definition: client.h:608
Player_Struct::below
item * below
Items below the player (pl.below->inv)
Definition: client.h:338
Animations::flags
guint16 flags
Definition: client.h:100
Spell_struct::sp
guint16 sp
Mana per cast; may be zero.
Definition: client.h:304
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:283
global_time
GTimer * global_time
Definition: misc.c:31
Stat_struct
Definition: client.h:252
VERSION_INFO
char VERSION_INFO[256]
Definition: client.c:48
Face_Information_struct::faceset
guint8 faceset
Definition: client.h:409
rules
char * rules
Definition: client.h:548
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:306
motd
char * motd
Definition: client.h:549
PlayerPosition
Definition: client.h:527
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:302
newclient.h
Stat_struct::weight_limit
guint32 weight_limit
Carrying weight limit.
Definition: client.h:292
Metaserver_Select
@ Metaserver_Select
Definition: client.h:147
Player_Struct::count
guint32 count
Repeat count on command.
Definition: client.h:360
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:245
Face_Information_struct::have_faceset_info
guint8 have_faceset_info
Simple value to know if there is data in facesets[].
Definition: client.h:420
Player_Struct::ready_spell
guint8 ready_spell
Index to spell that is readied.
Definition: client.h:347
Stat_struct::denied
guint32 denied
Spell paths denied to the player.
Definition: client.h:286
wantloginmethod
int wantloginmethod
Definition: client.h:450
Stat_struct::Cha
gint8 Cha
Charisma.
Definition: client.h:257
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:419
Stat_struct::Wis
gint8 Wis
Wisdom.
Definition: client.h:256
Player_Struct::mmapy
guint16 mmapy
size of magic map
Definition: client.h:361
ClientSocket::command_sent
guint16 command_sent
Definition: client.h:127
Spell_struct::time
guint16 time
Casting time in server ticks.
Definition: client.h:303
MAXANIM
#define MAXANIM
Definition: client.h:86
Spell_struct::grace
guint16 grace
Grace per cast; may be zero.
Definition: client.h:305
animations
Animations animations[MAXANIM]
Definition: commands.c:1156
Cache_Entry::filename
char * filename
Definition: client.h:503
Stat_struct::attuned
guint32 attuned
Spell paths to which the player is attuned.
Definition: client.h:280
Player_Struct::spelldata
Spell * spelldata
List of spells known.
Definition: client.h:351
Player_Struct::spells_updated
guint32 spells_updated
Whether or not spells updated.
Definition: client.h:354
LOG_DEBUG
@ LOG_DEBUG
Useful debugging information.
Definition: client.h:436
PlayerPosition
struct PlayerPosition PlayerPosition
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:254
Cache_Entry::next
struct Cache_Entry * next
Definition: client.h:507
Starting_Map_Info
Definition: client.h:605
FaceSets_struct::fallback
guint8 fallback
Definition: client.h:396
Race_Class_Info::arch_name
char * arch_name
Definition: client.h:597
classes
Race_Class_Info * classes
Definition: client.h:611
item.h