Crossfire Client, Branches  R11627
init.c File Reference
#include <client.h>
#include "p_cmd.h"
+ Include dependency graph for init.c:

Go to the source code of this file.

Macros

#define FREE_AND_CLEAR(xyz)   { free(xyz); xyz=NULL; }
 

Functions

void init_client_vars (void)
 
void reset_client_vars (void)
 
void reset_player_data (void)
 
void SendAddMe (ClientSocket csock)
 
void SendSetFaceMode (ClientSocket csock, int mode)
 
void SendVersion (ClientSocket csock)
 
void VersionCmd (char *data, int len)
 

Variables

const char *const config_names [CONFIG_NUMS]
 
const char *const rcsid_common_init_c
 
sint16 use_config [CONFIG_NUMS]
 
sint16 want_config [CONFIG_NUMS]
 

Macro Definition Documentation

#define FREE_AND_CLEAR (   xyz)    { free(xyz); xyz=NULL; }

Definition at line 52 of file init.c.

Referenced by reset_client_vars().

Function Documentation

void init_client_vars ( void  )

Definition at line 97 of file init.c.

References Player_Struct::below, Face_Information_struct::bmaps_checksum, Face_Information_struct::cache_hits, Face_Information_struct::cache_misses, CFG_DM_PIXMAP, CFG_LT_TILE, client_libdir, ClientSocket::command_received, ClientSocket::command_sent, ClientSocket::command_time, COMMAND_WINDOW, FaceSets_struct::comment, CONFIG_APPLY_CONTAINER, CONFIG_CACHE, CONFIG_CWINDOW, CONFIG_DARKNESS, CONFIG_DISPLAYMODE, CONFIG_DOWNLOAD, CONFIG_ECHO, CONFIG_FASTTCP, CONFIG_FOGWAR, CONFIG_FOODBEEP, CONFIG_GRAD_COLOR, CONFIG_ICONSCALE, CONFIG_LIGHTING, CONFIG_MAPHEIGHT, CONFIG_MAPSCALE, CONFIG_MAPSCROLL, CONFIG_MAPWIDTH, CONFIG_NUMS, CONFIG_POPUPS, CONFIG_PORT, CONFIG_RESISTS, CONFIG_SHOWGRID, CONFIG_SHOWICON, CONFIG_SIGNPOPUP, CONFIG_SMOOTH, CONFIG_SOUND, CONFIG_SPLASH, CONFIG_SPLITINFO, CONFIG_SPLITWIN, CONFIG_TIMESTAMP, CONFIG_TOOLTIPS, CONFIG_TRIMINFO, Player_Struct::container, Player_Struct::count_left, cpl, csocket, EPORT, exp_table, exp_table_max, FaceSets_struct::extension, face_info, Face_Information_struct::faceset, Face_Information_struct::facesets, FaceSets_struct::fallback, FALSE, FaceSets_struct::fullname, Face_Information_struct::have_faceset_info, init_commands(), init_metaserver(), Player_Struct::input_text, Player_Struct::last_command, last_used_skills, LOG(), LOG_INFO, Player_Struct::magicmap, map_item(), MAX_BUF, MAX_FACE_SETS, MAX_SKILL, Stat_struct::maxgrace, Stat_struct::maxhp, Stat_struct::maxsp, Face_Information_struct::num_images, Player_Struct::ob, Face_Information_struct::old_bmaps_checksum, player_item(), FaceSets_struct::prefix, Player_Struct::range, range_size, Player_Struct::ranges, Player_Struct::showmagic, FaceSets_struct::size, Stat_struct::skill_exp, Stat_struct::skill_level, skill_names, Stat_struct::speed, Player_Struct::stats, Player_Struct::title, TRUE, use_config, want_config, and Face_Information_struct::want_faceset.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void reset_player_data ( void  )

Definition at line 234 of file init.c.

References cpl, MAX_SKILL, Stat_struct::skill_exp, Stat_struct::skill_level, and Player_Struct::stats.

Referenced by PlayerCmd(), and reset_client_vars().

+ Here is the caller graph for this function:

void SendAddMe ( ClientSocket  csock)

Definition at line 85 of file init.c.

References cs_print_string(), and ClientSocket::fd.

Referenced by negotiate_connection().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SendSetFaceMode ( ClientSocket  csock,
int  mode 
)

Definition at line 91 of file init.c.

References cs_print_string(), and ClientSocket::fd.

Referenced by SetupCmd().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SendVersion ( ClientSocket  csock)

Definition at line 78 of file init.c.

References cs_print_string(), ClientSocket::fd, VERSION_CS, VERSION_INFO, and VERSION_SC.

Referenced by negotiate_connection().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void VersionCmd ( char *  data,
int  len 
)

Definition at line 54 of file init.c.

References ClientSocket::cs_version, csocket, LOG(), LOG_INFO, LOG_WARNING, ClientSocket::sc_version, VERSION_CS, and VERSION_SC.

+ Here is the call graph for this function:

Variable Documentation

const char* const config_names[CONFIG_NUMS]
Initial value:
= {
NULL, "download_all_images", "echo_bindings",
"fasttcpsend", "command_window", "cacheimages", "fog_of_war", "iconscale",
"mapscale", "popups", "displaymode", "showicon", "tooltips", "sound", "splitinfo",
"split", "show_grid", "lighting", "trim_info_window",
"map_width", "map_height", "foodbeep", "darkness", "port",
"grad_color_bars", "resistances", "smoothing", "nosplash",
"auto_apply_container", "mapscroll", "sign_popups", "message_timestamping"
}

See common/init.c - basically, this is a string to number mapping that is used when loading/saving the values.

Definition at line 40 of file init.c.

Referenced by load_defaults(), and save_defaults().

const char* const rcsid_common_init_c
Initial value:
=
"$Id: init.c 10973 2008-12-14 08:51:26Z ryo_saeba $"

Definition at line 1 of file init.c.