Crossfire Client, Branches
R11627
|
Go to the source code of this file.
Functions | |
void | AddMeFail (char *data, int len) |
void | AddMeSuccess (char *data, int len) |
void | AddspellCmd (unsigned char *data, int len) |
void | animate_objects (void) |
void | AnimCmd (unsigned char *data, int len) |
int | can_write_spell_on (item *it) |
int | check_server_version (int entry) |
void | clear_fire (void) |
void | clear_fire_run (void) |
void | clear_run (void) |
void | clearLogListener (void) |
void | client_send_apply (int tag) |
void | client_send_examine (int tag) |
void | client_send_move (int loc, int tag, int nrof) |
void | command_take (const char *command, const char *cpnext) |
void | CompleteCmd (unsigned char *data, int len) |
item * | create_new_item (item *env, sint32 tag) |
int | cs_print_string (int fd, const char *str,...) |
void | DeleteInventory (unsigned char *data, int len) |
void | DeleteItem (unsigned char *data, int len) |
void | DeleteSpell (unsigned char *data, int len) |
void | display_newpng (int face, uint8 *buf, int buflen, int setnum) |
void | DoClient (ClientSocket *csocket) |
void | DrawExtInfoCmd (char *data, int len) |
void | DrawInfoCmd (char *data, int len) |
void | ExtendedInfoSetCmd (char *data, int len) |
int | ExtSmooth (unsigned char *data, int len, int x, int y, int layer) |
void | Face2Cmd (uint8 *data, int len) |
void | finish_face_cmd (int pnum, uint32 checksum, int has_sum, char *face, int faceset) |
void | fire_dir (int dir) |
void | free_all_items (item *op) |
void | get_image_info (uint8 *data, int len) |
void | get_image_sums (char *data, int len) |
const char * | get_number (uint32 i) |
uint8 | get_type_from_name (const char *name) |
char | GetChar_String (const unsigned char *data) |
sint64 | GetInt64_String (const unsigned char *data) |
int | GetInt_String (const unsigned char *data) |
char * | getLogText (const LogEntry *le) |
char * | getLogTextRaw (LogLevel level, const char *origin, const char *message) |
short | GetShort_String (const unsigned char *data) |
void | GoodbyeCmd (char *data, int len) |
void | handle_query (char *data, int len) |
void | Image2Cmd (uint8 *data, int len) |
void | init_client_vars (void) |
void | init_common_cache_data (void) |
int | init_connection (char *host, int port) |
void | init_metaserver (void) |
void | inscribe_magical_scroll (item *scroll, Spell *spell) |
void | Item2Cmd (unsigned char *data, int len) |
void | item_actions (item *op) |
item * | locate_item (sint32 tag) |
void | LOG (LogLevel level, const char *origin, const char *format,...) |
void | logChildPipe (ChildProcess *child, LogLevel level, int flag) |
void | logPipe (ChildProcess *child, LogLevel level, int pipe) |
void | look_at (int x, int y) |
void | MagicMapCmd (unsigned char *data, int len) |
int | make_path_to_dir (char *directory) |
int | make_path_to_file (char *filename) |
void | Map2Cmd (unsigned char *data, int len) |
item * | map_item (void) |
void | map_scrollCmd (char *data, int len) |
void | mapdata_animation (void) |
sint16 | mapdata_bigface (int x, int y, int layer, int *ww, int *hh) |
sint16 | mapdata_bigface_head (int x, int y, int layer, int *ww, int *hh) |
void | mapdata_clear_old (int x, int y) |
void | mapdata_clear_space (int x, int y) |
sint16 | mapdata_face (int x, int y, int layer) |
void | mapdata_init (void) |
int | mapdata_is_inside (int x, int y) |
void | mapdata_newmap (void) |
void | mapdata_reset (void) |
void | mapdata_scroll (int dx, int dy) |
void | mapdata_set_anim_layer (int x, int y, uint16 anim, uint8 anim_speed, int layer) |
void | mapdata_set_check_space (int x, int y) |
void | mapdata_set_darkness (int x, int y, int darkness) |
void | mapdata_set_face_layer (int x, int y, sint16 face, int layer) |
void | mapdata_set_size (int viewx, int viewy) |
void | mapdata_set_smooth (int x, int y, int smooth, int layer) |
void | MapExtendedCmd (unsigned char *data, int len) |
int | metaserver1_get_info (void) |
void * | metaserver1_thread (void *junk) |
int | metaserver2_get_info (void) |
void * | metaserver2_thread (void *junk) |
size_t | metaserver2_writer (void *ptr, size_t size, size_t nmemb, void *data) |
int | metaserver_check_status (void) |
int | metaserver_get_info (char *metaserver, int meta_port) |
int | metaserver_select (char *sel) |
void | metaserver_show (int show_selection) |
void | monitorChilds (void) |
void | move_player (int dir) |
void | negotiate_connection (int sound) |
void | new_player (long tag, char *name, long weight, long face) |
void | NewmapCmd (unsigned char *data, int len) |
int | num_free_items (void) |
void | PickupCmd (uint8 *data, int len) |
item * | player_item (void) |
void | PlayerCmd (unsigned char *data, int len) |
void | print_inventory (item *op) |
void | purgePipe (ChildProcess *cp, int pipe) |
ChildProcess * | raiseChild (char *name, int flag) |
void | remove_item (item *op) |
void | remove_item_inventory (item *op) |
void | ReplyInfoCmd (uint8 *buf, int len) |
void | requestface (int pnum, char *facename) |
void | reset_client_vars (void) |
void | reset_image_cache_data (void) |
void | reset_player_data (void) |
void | run_dir (int dir) |
int | script_lua_command (const char *command, const char *param) |
void | script_lua_kill (const char *param) |
void | script_lua_list (const char *param) |
void | script_lua_load (const char *name) |
void | script_lua_stats (void) |
int | send_command (const char *command, int repeat, int must_send) |
void | send_mark_obj (item *op) |
void | send_reply (const char *text) |
void | SendAddMe (ClientSocket csock) |
void | SendSetFaceMode (ClientSocket csock, int mode) |
void | SendVersion (ClientSocket csock) |
void | set_item_values (item *op, char *name, sint32 weight, uint16 face, uint16 flags, uint16 anim, uint16 animspeed, uint32 nrof, uint16 type) |
int | setLogListener (LogListener li) |
void | setTextManager (int type, ExtTextManager callback) |
void | SetupCmd (char *buf, int len) |
void | SinkCmd (unsigned char *data, int len) |
void | SmoothCmd (unsigned char *data, int len) |
void | SockList_AddChar (SockList *sl, char c) |
void | SockList_AddInt (SockList *sl, uint32 data) |
void | SockList_AddShort (SockList *sl, uint16 data) |
void | SockList_AddString (SockList *sl, const char *str) |
void | SockList_Init (SockList *sl, uint8 *buf) |
int | SockList_ReadPacket (int fd, SockList *sl, int len) |
int | SockList_Send (SockList *sl, int fd) |
void | StatsCmd (unsigned char *data, int len) |
void | stop_fire (void) |
void | stop_run (void) |
char * | strdup_local (const char *str) |
void | TickCmd (uint8 *data, int len) |
void | toggle_locked (item *op) |
void | update_item (int tag, int loc, char *name, int weight, int face, int flags, int anim, int animspeed, uint32 nrof, int type) |
void | update_item_sort (item *it) |
void | UpdateItemCmd (unsigned char *data, int len) |
void | UpdspellCmd (unsigned char *data, int len) |
void | use_skill (int skill_id) |
void | VersionCmd (char *data, int len) |
void AddMeFail | ( | char * | data, |
int | len | ||
) |
Definition at line 387 of file commands.c.
References LOG(), and LOG_INFO.
void AddMeSuccess | ( | char * | data, |
int | len | ||
) |
Definition at line 398 of file commands.c.
References LOG(), and LOG_INFO.
void AddspellCmd | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 979 of file commands.c.
References cpl, CS_STAT_SKILLINFO, Spell_struct::dam, Spell_struct::face, GetChar_String(), GetInt_String(), GetShort_String(), Spell_struct::grace, Spell_struct::level, LOG(), LOG_WARNING, Spell_struct::message, Spell_struct::name, Spell_struct::next, Spell_struct::path, Spell_struct::skill, skill_names, Spell_struct::skill_number, Spell_struct::sp, Player_Struct::spelldata, Player_Struct::spells_updated, Spell_struct::tag, and Spell_struct::time.
void animate_objects | ( | void | ) |
Definition at line 687 of file item.c.
References item_struct::anim_speed, item_struct::anim_state, item_struct::animation_id, animations, Player_Struct::below, Player_Struct::container, cpl, item_struct::face, Animations::faces, item_struct::inv, item_struct::inv_updated, item_struct::last_anim, item_struct::next, and Animations::num_animations.
Referenced by event_loop().
void AnimCmd | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 421 of file commands.c.
References Animations::faces, Animations::flags, GetShort_String(), LOG(), LOG_DEBUG, LOG_WARNING, MAXANIM, Animations::num_animations, Animations::phase, Animations::speed, and Animations::speed_left.
int can_write_spell_on | ( | item * | it | ) |
Definition at line 752 of file item.c.
References item_struct::type.
Referenced by item_event_item_changed(), item_event_item_deleting(), and spellinventory_redraw().
int check_server_version | ( | int | entry | ) |
Definition at line 69 of file metaserver.c.
References VERSION_CS, and VERSION_SC.
Referenced by get_metaserver(), and metaserver_show().
void clear_fire | ( | void | ) |
Definition at line 134 of file player.c.
References dfire, SC_FIRERUN, and send_command().
Referenced by button_map_event(), on_drawingarea_map_button_press_event(), parse_game_button_press(), and parse_key_release().
void clear_fire_run | ( | void | ) |
Definition at line 122 of file player.c.
References dfire, drun, SC_FIRERUN, and send_command().
Referenced by check_x_events().
void clear_run | ( | void | ) |
Definition at line 142 of file player.c.
References drun, SC_FIRERUN, and send_command().
Referenced by parse_key_release().
void client_send_apply | ( | int | tag | ) |
Definition at line 80 of file player.c.
References cs_print_string(), csocket, and ClientSocket::fd.
Referenced by buttonpress_in_list(), close_container(), close_container_callback(), list_button_event(), list_item_action(), and list_row_collapse().
void client_send_examine | ( | int | tag | ) |
Definition at line 85 of file player.c.
References cs_print_string(), csocket, and ClientSocket::fd.
Referenced by buttonpress_in_list(), list_button_event(), and list_item_action().
void client_send_move | ( | int | loc, |
int | tag, | ||
int | nrof | ||
) |
Definition at line 92 of file player.c.
References cs_print_string(), csocket, and ClientSocket::fd.
Referenced by buttonpress_in_list(), list_button_event(), and list_item_action().
void command_take | ( | const char * | command, |
const char * | cpnext | ||
) |
Definition at line 264 of file player.c.
References Player_Struct::container, Player_Struct::count, cpl, cs_print_string(), csocket, draw_info(), ClientSocket::fd, item_struct::inv, NDI_BLACK, Player_Struct::ob, send_command(), and item_struct::tag.
Referenced by do_take().
void CompleteCmd | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 246 of file player.c.
References ClientSocket::command_received, ClientSocket::command_sent, ClientSocket::command_time, csocket, GetInt_String(), GetShort_String(), LOG(), LOG_ERROR, and script_sync().
Definition at line 422 of file item.c.
References add_item(), alloc_items(), free_items, item_struct::locked, item_struct::next, NROF_ITEMS, item_struct::prev, and item_struct::tag.
Referenced by update_item().
int cs_print_string | ( | int | fd, |
const char * | str, | ||
... | |||
) |
Definition at line 259 of file newsocket.c.
References SockList::buf, SockList::len, MAX_BUF, script_monitor_str(), SockList_Init(), and SockList_Send().
Referenced by applyconfig(), client_send_apply(), client_send_examine(), client_send_move(), command_take(), get_image_info(), look_at(), negotiate_connection(), on_drawingarea_map_configure_event(), read_config_window(), requestface(), script_process_cmd(), send_command(), send_reply(), SendAddMe(), SendSetFaceMode(), SendVersion(), and SetupCmd().
void DeleteInventory | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 960 of file commands.c.
References locate_item(), LOG(), LOG_WARNING, and remove_item_inventory().
void DeleteItem | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 941 of file commands.c.
References GetInt_String(), locate_item(), LOG(), LOG_WARNING, and remove_item().
void DeleteSpell | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 1051 of file commands.c.
References cpl, GetInt_String(), LOG(), LOG_WARNING, Spell_struct::next, Player_Struct::spelldata, Player_Struct::spells_updated, and Spell_struct::tag.
void display_newpng | ( | int | face, |
uint8 * | buf, | ||
int | buflen, | ||
int | setnum | ||
) |
Definition at line 535 of file image.c.
References CONFIG_CACHE, create_and_rescale_image_from_data(), Face_Information_struct::facesets, height, image_add_hash(), LOG(), LOG_WARNING, MAX_BUF, MAX_FACE_SETS, png_to_data(), FaceSets_struct::prefix, ROTATE_RIGHT, use_config, and width.
Referenced by Image2Cmd().
void DoClient | ( | ClientSocket * | csocket | ) |
Definition at line 149 of file client.c.
References SockList::buf, CmdMapping::cmdformat, CmdMapping::cmdname, CmdMapping::cmdproc, ClientSocket::fd, ClientSocket::inbuf, SockList::len, MAXSOCKBUF, NCOMMANDS, script_watch(), and SockList_ReadPacket().
Referenced by do_network(), event_loop(), and negotiate_connection().
void DrawExtInfoCmd | ( | char * | data, |
int | len | ||
) |
Definition at line 526 of file commands.c.
References getTextManager(), LOG(), and LOG_WARNING.
void DrawInfoCmd | ( | char * | data, |
int | len | ||
) |
Definition at line 475 of file commands.c.
References draw_color_info(), draw_info(), LOG(), LOG_WARNING, and NDI_BLACK.
void ExtendedInfoSetCmd | ( | char * | data, |
int | len | ||
) |
Definition at line 370 of file commands.c.
int ExtSmooth | ( | unsigned char * | data, |
int | len, | ||
int | x, | ||
int | y, | ||
int | layer | ||
) |
Definition at line 1244 of file commands.c.
References Map::cells, GetChar_String(), MapCell::need_resmooth, pl_pos, MapCell::smooth, the_map, Map::x, PlayerPosition::x, Map::y, and PlayerPosition::y.
Referenced by MapExtendedCmd().
void Face2Cmd | ( | uint8 * | data, |
int | len | ||
) |
Definition at line 491 of file image.c.
References checksum, CONFIG_CACHE, finish_face_cmd(), GetInt_String(), GetShort_String(), LOG(), LOG_WARNING, and use_config.
void finish_face_cmd | ( | int | pnum, |
uint32 | checksum, | ||
int | has_sum, | ||
char * | face, | ||
int | faceset | ||
) |
Definition at line 400 of file image.c.
References associate_cache_entry(), create_and_rescale_image_from_data(), Cache_Entry::filename, Cache_Entry::image_data, image_find_cache_entry(), image_remove_hash(), Cache_Entry::ispublic, load_image(), LOG(), LOG_WARNING, png_to_data(), and requestface().
Referenced by Face2Cmd(), and get_image_sums().
void fire_dir | ( | int | dir | ) |
Definition at line 151 of file player.c.
References Player_Struct::count, cpl, dfire, Player_Struct::input_state, MAX_BUF, Playing, SC_NORMAL, and send_command().
Referenced by button_map_event(), on_drawingarea_map_button_press_event(), parse_game_button_press(), and parse_key().
void free_all_items | ( | item * | op | ) |
Definition at line 258 of file item.c.
References free_all_items(), item_struct::inv, and item_struct::next.
Referenced by free_all_items().
void get_image_info | ( | uint8 * | data, |
int | len | ||
) |
Definition at line 653 of file image.c.
References Face_Information_struct::bmaps_checksum, FaceSets_struct::comment, cs_print_string(), csocket, draw_info(), FaceSets_struct::extension, Face_Information_struct::faceset, Face_Information_struct::facesets, FaceSets_struct::fallback, ClientSocket::fd, FaceSets_struct::fullname, Face_Information_struct::have_faceset_info, LOG(), LOG_WARNING, MAX_BUF, MAX_FACE_SETS, NDI_RED, Face_Information_struct::num_images, FaceSets_struct::prefix, replyinfo_status, RI_IMAGE_INFO, FaceSets_struct::size, strdup_local(), and Face_Information_struct::want_faceset.
Referenced by ReplyInfoCmd().
void get_image_sums | ( | char * | data, |
int | len | ||
) |
Definition at line 737 of file image.c.
References checksum, finish_face_cmd(), GetInt_String(), GetShort_String(), LOG(), LOG_WARNING, and replyinfo_last_face.
Referenced by ReplyInfoCmd().
const char* get_number | ( | uint32 | i | ) |
Definition at line 182 of file item.c.
References MAX_BUF.
Referenced by set_item_values().
uint8 get_type_from_name | ( | const char * | name | ) |
Definition at line 49 of file item.c.
References item_types, LOG(), LOG_WARNING, and NUM_ITEM_TYPES.
Referenced by set_item_values().
char GetChar_String | ( | const unsigned char * | data | ) |
Definition at line 136 of file newsocket.c.
Referenced by AddspellCmd(), ExtSmooth(), MapExtendedCmd(), and UpdspellCmd().
sint64 GetInt64_String | ( | const unsigned char * | data | ) |
Definition at line 149 of file newsocket.c.
Referenced by get_exp_info(), script_watch(), and StatsCmd().
int GetInt_String | ( | const unsigned char * | data | ) |
Definition at line 143 of file newsocket.c.
Referenced by AddspellCmd(), common_item_command(), CompleteCmd(), DeleteItem(), DeleteSpell(), Face2Cmd(), get_image_sums(), Image2Cmd(), PickupCmd(), PlayerCmd(), script_watch(), StatsCmd(), TickCmd(), UpdateItemCmd(), and UpdspellCmd().
char* getLogText | ( | const LogEntry * | le | ) |
Definition at line 164 of file misc.c.
References getLogTextRaw(), LogEntry::level, LogEntry::message, and LogEntry::origin.
Referenced by createBugTracker(), gtkLogListener(), and LOG().
char* getLogTextRaw | ( | LogLevel | level, |
const char * | origin, | ||
const char * | message | ||
) |
Definition at line 157 of file misc.c.
References getLogLevelText().
Referenced by getLogText().
short GetShort_String | ( | const unsigned char * | data | ) |
Definition at line 162 of file newsocket.c.
Referenced by AddspellCmd(), AnimCmd(), common_item_command(), CompleteCmd(), Face2Cmd(), get_exp_info(), get_image_sums(), Map2Cmd(), MapExtendedCmd(), script_watch(), SmoothCmd(), SoundCmd(), StatsCmd(), UpdateItemCmd(), and UpdspellCmd().
void GoodbyeCmd | ( | char * | data, |
int | len | ||
) |
Definition at line 406 of file commands.c.
References LOG(), and LOG_WARNING.
void handle_query | ( | char * | data, |
int | len | ||
) |
Definition at line 717 of file commands.c.
References cpl, CS_QUERY_HIDEINPUT, CS_QUERY_SINGLECHAR, CS_QUERY_YESNO, draw_info(), draw_prompt(), Player_Struct::input_state, LOG(), LOG_DEBUG, NDI_BLACK, Player_Struct::no_echo, Reply_Many, Reply_One, and x_set_echo().
void Image2Cmd | ( | uint8 * | data, |
int | len | ||
) |
Definition at line 514 of file image.c.
References display_newpng(), GetInt_String(), LOG(), and LOG_WARNING.
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().
void init_common_cache_data | ( | void | ) |
Definition at line 332 of file image.c.
References CONFIG_CACHE, draw_info(), FD_Cache::fd, fd_cache, image_cache, IMAGE_HASH, image_process_line(), MAX_BUF, MAX_FACE_SETS, MAXPIXMAPNUM, FD_Cache::name, NDI_RED, and want_config.
Referenced by init_cache_data().
int init_connection | ( | char * | host, |
int | port | ||
) |
Definition at line 205 of file client.c.
References CONFIG_FASTTCP, LOG(), LOG_ERROR, LOG_WARNING, ClientSocket::servername, SOL_TCP, and use_config.
Referenced by main(), metaserver_connect_to(), metaserver_select(), and on_metaserver_select_clicked().
void init_metaserver | ( | void | ) |
Does single use initalization of metaserver2 variables.
Definition at line 459 of file metaserver.c.
References ms2_info_mutex.
Referenced by init_client_vars().
Definition at line 756 of file item.c.
References command_inscribe, csocket, ClientSocket::fd, LOG(), LOG_WARNING, MAX_BUF, script_monitor_str(), SockList_AddChar(), SockList_AddInt(), SockList_AddString(), SockList_Init(), SockList_Send(), item_struct::tag, and Spell_struct::tag.
Referenced by click_inscribe_spell().
void Item2Cmd | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 857 of file commands.c.
References common_item_command().
void item_actions | ( | item * | op | ) |
Definition at line 801 of file commands.c.
References close_container(), Player_Struct::container, cpl, item_struct::open, open_container(), and item_struct::was_open.
Referenced by common_item_command(), and UpdateItemCmd().
Definition at line 292 of file item.c.
References Player_Struct::container, cpl, item_struct::inv, locate_item_from_item(), map, and item_struct::tag.
Referenced by common_item_command(), DeleteInventory(), DeleteItem(), main(), update_item(), and UpdateItemCmd().
void LOG | ( | LogLevel | level, |
const char * | origin, | ||
const char * | format, | ||
... | |||
) |
Definition at line 178 of file misc.c.
References getLogText(), LogEntry::level, LOG_APPEND, LOG_NEW_ENTRY, LOG_SETMESSAGE, and LOG_SETORIGIN.
Referenced by add_to_textbuf(), AddMeFail(), AddMeSuccess(), AddspellCmd(), admin_callback(), AnimCmd(), book_callback(), check_x_events(), client_exit(), common_item_command(), CompleteCmd(), configdialog(), create_icon_image(), DeleteInventory(), DeleteItem(), DeleteSpell(), display_newpng(), do_network(), do_num_free_items(), draw_info(), draw_magic_map(), DrawExtInfoCmd(), DrawInfoCmd(), event_loop(), Face2Cmd(), fill_combobox_from_datadir(), finish_face_cmd(), get_exp_info(), get_image_info(), get_image_sums(), get_skill_info(), get_type_from_name(), gLogHandler(), GoodbyeCmd(), gtk_draw_map(), handle_query(), Image2Cmd(), image_add_hash(), image_find_hash(), image_process_line(), image_remove_hash(), info_get_styles(), init_cache_data(), init_client_vars(), init_connection(), init_keys(), init_sounds(), init_windows(), inscribe_magical_scroll(), insert_key(), inventory_get_styles(), inventory_init(), keybinding_get_data(), keybinding_selection_func(), keyfunc(), keys_init(), list_selection_func(), load_a_font(), load_defaults(), load_image(), load_theme(), load_window_positions(), logPipe(), MagicMapCmd(), main(), make_path_to_file(), Map2Cmd(), map_scrollCmd(), mapdata_init(), menu_quit_program(), message_callback(), metaserver1_get_info(), metaserver1_thread(), metaserver2_get_info(), metaserver2_writer(), monitorChilds(), motd_callback(), MusicCmd(), negotiate_connection(), on_keybinding_button_remove_clicked(), on_keybinding_button_update_clicked(), on_spell_cast_clicked(), on_spell_invoke_clicked(), on_spell_treeview_row_activated(), on_window_destroy_event(), parse_args(), parse_keybind_line(), pickup_init(), play_sound(), PlayerCmd(), png_to_data(), purgePipe(), raiseChild(), ReplyInfoCmd(), rescale_rgba_data(), save_defaults(), save_keys(), script_init(), send_command(), set_window_pos(), setup_config_window(), SetupCmd(), SockList_ReadPacket(), Sound2Cmd(), SoundCmd(), spell_get_styles(), stats_get_styles(), StatsCmd(), unbind_key(), UpdateItemCmd(), UpdspellCmd(), VersionCmd(), void_callback(), write_media_with_state(), and write_socket().
void logChildPipe | ( | ChildProcess * | child, |
LogLevel | level, | ||
int | flag | ||
) |
Definition at line 290 of file misc.c.
References CHILD_STDERR, CHILD_STDOUT, ChildProcess::flag, and logPipe().
Referenced by init_sounds().
void logPipe | ( | ChildProcess * | child, |
LogLevel | level, | ||
int | pipe | ||
) |
Definition at line 271 of file misc.c.
References PipeLog::level, LOG(), PipeLog::log, LOG_WARNING, ChildProcess::logger, PipeLog::name, ChildProcess::name, ChildProcess::pid, and ChildProcess::tube.
Referenced by logChildPipe().
void look_at | ( | int | x, |
int | y | ||
) |
Definition at line 75 of file player.c.
References cs_print_string(), csocket, and ClientSocket::fd.
Referenced by button_map_event(), on_drawingarea_map_button_press_event(), and parse_game_button_press().
void MagicMapCmd | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 1336 of file commands.c.
References cpl, draw_magic_map(), LOG(), LOG_WARNING, Player_Struct::magicmap, Player_Struct::mmapx, Player_Struct::mmapy, Player_Struct::pmapx, Player_Struct::pmapy, and Player_Struct::showmagic.
int make_path_to_file | ( | char * | filename | ) |
Definition at line 94 of file misc.c.
References LOG(), LOG_ERROR, and MAX_BUF.
Referenced by save_defaults(), and save_keys().
void Map2Cmd | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 1116 of file commands.c.
References display_map_doneupdate(), display_map_startupdate(), FACE_IS_ANIM, FALSE, GetShort_String(), LOG(), LOG_WARNING, MAP2_COORD_OFFSET, mapdata_clear_old(), mapdata_clear_space(), mapdata_scroll(), mapdata_set_anim_layer(), mapdata_set_check_space(), mapdata_set_darkness(), mapdata_set_face_layer(), mapdata_set_smooth(), mapupdatesent, mask, MAX_VIEW, and MAXLAYERS.
item* map_item | ( | void | ) |
Definition at line 611 of file item.c.
References map, new_item(), and item_struct::weight.
Referenced by init_client_vars().
void map_scrollCmd | ( | char * | data, |
int | len | ||
) |
Definition at line 1221 of file commands.c.
References display_map_doneupdate(), display_map_startupdate(), FALSE, LOG(), LOG_WARNING, mapdata_scroll(), and TRUE.
void mapdata_animation | ( | void | ) |
Definition at line 1264 of file mapdata.c.
References MapCellLayer::animation, MapCellLayer::animation_left, MapCellLayer::animation_phase, MapCellLayer::animation_speed, animations, bigfaces, Map::cells, MapCell::cleared, CURRENT_MAX_VIEW, expand_clear_face_from_layer(), expand_set_bigface(), expand_set_face(), Animations::faces, FALSE, BigCell::head, MapCell::heads, BigCell::layer, MAXANIM, MAXLAYERS, Animations::num_animations, Animations::phase, pl_pos, MapCell::smooth, Animations::speed_left, the_map, BigCell::x, PlayerPosition::x, BigCell::y, and PlayerPosition::y.
Referenced by client_tick(), and do_timeout().
sint16 mapdata_bigface | ( | int | x, |
int | y, | ||
int | layer, | ||
int * | ww, | ||
int * | hh | ||
) |
Returns the face to display at a given location. This function returns the "tail" information, i.e. big faces expanded by the client.
*ww and *hh return the offset of the current tile relative to the head; 0 <= *ww < (width of face), 0 <= *hh < (height of face).
When drawing the map view, this function must be used instead than a direct access to the_map.cells[]. This is because the_map.cells[] eventually still contains obsolete (fog of war) big face information; this function detects and clears such faces.
Definition at line 966 of file mapdata.c.
References bigfaces, Map::cells, MapCell::cleared, expand_clear_face_from_layer(), MapCellLayer::face, BigCell::head, MapCell::heads, height, BigCell::layer, MAX_FACE_SIZE, MAXLAYERS, pl_pos, MapCellLayer::size_x, MapCellLayer::size_y, BigCell::tail, MapCell::tails, the_map, width, BigCell::x, PlayerPosition::x, BigCell::y, and PlayerPosition::y.
Referenced by display_mapcell().
sint16 mapdata_bigface_head | ( | int | x, |
int | y, | ||
int | layer, | ||
int * | ww, | ||
int * | hh | ||
) |
Definition at line 1052 of file mapdata.c.
References bigfaces, MapCellLayer::face, BigCell::head, BigCell::layer, MAX_VIEW, MAXLAYERS, MapCellLayer::size_x, MapCellLayer::size_y, width, BigCell::x, and BigCell::y.
void mapdata_clear_old | ( | int | x, |
int | y | ||
) |
Definition at line 744 of file mapdata.c.
References Map::cells, MapCell::cleared, MapCell::darkness, expand_clear_face_from_layer(), FOG_MAP_SIZE, MapCell::have_darkness, height, MAX_VIEW, MAXLAYERS, pl_pos, the_map, width, PlayerPosition::x, and PlayerPosition::y.
Referenced by Map2Cmd().
void mapdata_clear_space | ( | int | x, |
int | y | ||
) |
Definition at line 596 of file mapdata.c.
References Map::cells, MapCell::cleared, expand_need_update_from_layer(), expand_set_bigface(), MapCellLayer::face, FOG_MAP_SIZE, MapCell::heads, height, MAX_VIEW, MAXLAYERS, MapCell::need_update, pl_pos, the_map, TRUE, width, PlayerPosition::x, and PlayerPosition::y.
Referenced by Map2Cmd().
sint16 mapdata_face | ( | int | x, |
int | y, | ||
int | layer | ||
) |
Returns the face to display at a given location. This function returns the "head" information, i.e. the face information sent by the server.
Definition at line 955 of file mapdata.c.
References Map::cells, MapCellLayer::face, MapCell::heads, height, MAXLAYERS, pl_pos, the_map, width, PlayerPosition::x, and PlayerPosition::y.
Referenced by display_mapcell().
void mapdata_init | ( | void | ) |
Initializes the module. Allocates memory for the_map. This functions must be called before any other function is used.
Definition at line 514 of file mapdata.c.
References bigfaces, Map::cells, CLEAR_CELLS, MapCellLayer::face, FOG_MAP_SIZE, BigCell::head, height, BigCell::layer, LOG(), LOG_ERROR, MAX_VIEW, MAXLAYERS, BigCell::next, pl_pos, BigCell::prev, MapCellLayer::size_x, MapCellLayer::size_y, BigCell::tail, the_map, width, BigCell::x, Map::x, PlayerPosition::x, BigCell::y, Map::y, and PlayerPosition::y.
Referenced by init_windows(), mapdata_reset(), mapdata_set_size(), and parse_args().
int mapdata_is_inside | ( | int | x, |
int | y | ||
) |
void mapdata_newmap | ( | void | ) |
Clears the map view. Must be called whenever a newmap command was received from the server.
Definition at line 935 of file mapdata.c.
References Map::cells, CLEAR_CELLS, display_map_newmap(), expand_clear_bigface_from_layer(), FOG_MAP_SIZE, BigCell::layer, MapCell::need_update, the_map, BigCell::x, and BigCell::y.
Referenced by NewmapCmd().
void mapdata_reset | ( | void | ) |
Resets all stored information.
Definition at line 572 of file mapdata.c.
References mapdata_init().
Referenced by main().
void mapdata_scroll | ( | int | dx, |
int | dy | ||
) |
Scrolls the map view. Must be called whenever a map_scroll command was received from the server.
Definition at line 859 of file mapdata.c.
References Map::cells, MapCell::cleared, CONFIG_MAPSCROLL, display_mapscroll(), expand_clear_bigface_from_layer(), BigCell::head, height, BigCell::layer, MapCell::need_update, BigCell::next, pl_pos, recenter_virtual_map_view(), MapCellLayer::size_x, MapCellLayer::size_y, the_map, want_config, width, BigCell::x, PlayerPosition::x, BigCell::y, and PlayerPosition::y.
Referenced by Map2Cmd(), and map_scrollCmd().
Definition at line 802 of file mapdata.c.
References ANIM_FLAGS_MASK, ANIM_MASK, ANIM_RANDOM, ANIM_SYNC, MapCellLayer::animation, MapCellLayer::animation_left, MapCellLayer::animation_phase, MapCellLayer::animation_speed, animations, Map::cells, MapCell::cleared, MapCell::darkness, expand_clear_face_from_layer(), expand_set_bigface(), expand_set_face(), Animations::faces, FOG_MAP_SIZE, MapCell::have_darkness, MapCell::heads, height, MAX_VIEW, MAXLAYERS, MapCell::need_update, Animations::num_animations, Animations::phase, pl_pos, Animations::speed, Animations::speed_left, the_map, TRUE, width, PlayerPosition::x, and PlayerPosition::y.
Referenced by Map2Cmd().
void mapdata_set_check_space | ( | int | x, |
int | y | ||
) |
Definition at line 638 of file mapdata.c.
References Map::cells, MapCell::cleared, expand_need_update_from_layer(), MapCellLayer::face, FOG_MAP_SIZE, MapCell::have_darkness, MapCell::heads, height, MAX_VIEW, MAXLAYERS, MapCell::need_update, pl_pos, MapCell::tails, the_map, width, PlayerPosition::x, and PlayerPosition::y.
Referenced by Map2Cmd().
void mapdata_set_darkness | ( | int | x, |
int | y, | ||
int | darkness | ||
) |
Definition at line 688 of file mapdata.c.
References FOG_MAP_SIZE, height, MAX_VIEW, pl_pos, set_darkness(), width, PlayerPosition::x, and PlayerPosition::y.
Referenced by Map2Cmd().
void mapdata_set_face_layer | ( | int | x, |
int | y, | ||
sint16 | face, | ||
int | layer | ||
) |
Definition at line 770 of file mapdata.c.
References Map::cells, MapCell::cleared, expand_clear_face_from_layer(), expand_set_bigface(), expand_set_face(), FOG_MAP_SIZE, height, MAX_VIEW, MapCell::need_update, pl_pos, the_map, TRUE, width, PlayerPosition::x, and PlayerPosition::y.
Referenced by Map2Cmd().
void mapdata_set_size | ( | int | viewx, |
int | viewy | ||
) |
Sets the current display size. Must be called whenever a new display size was negotiated with the server.
Definition at line 577 of file mapdata.c.
References FOG_MAP_SIZE, height, mapdata_init(), pl_pos, width, PlayerPosition::x, and PlayerPosition::y.
Referenced by negotiate_connection(), on_drawingarea_map_configure_event(), and SetupCmd().
void mapdata_set_smooth | ( | int | x, |
int | y, | ||
int | smooth, | ||
int | layer | ||
) |
Definition at line 711 of file mapdata.c.
References Map::cells, FOG_MAP_SIZE, MAX_VIEW, MapCell::need_resmooth, pl_pos, MapCell::smooth, the_map, Map::x, PlayerPosition::x, Map::y, and PlayerPosition::y.
Referenced by Map2Cmd().
void MapExtendedCmd | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 1278 of file commands.c.
References display_map_doneupdate(), display_map_startupdate(), EMI_HASMOREBITS, EMI_NOREDRAW, EMI_SMOOTH, ExtSmooth(), FALSE, GetChar_String(), GetShort_String(), mapupdatesent, mask, and NUM_LAYERS.
int metaserver1_get_info | ( | void | ) |
Definition at line 729 of file metaserver.c.
References LOG(), LOG_ERROR, MAX_METASERVER, metaserver1_thread(), metaserver_load_cache(), metaserver_on, ms1_is_running, and ms2_info_mutex.
Referenced by metaserver_get_info().
void* metaserver1_thread | ( | void * | junk | ) |
Definition at line 548 of file metaserver.c.
References draw_info(), Meta_Info::hostname, Meta_Info::idle_time, Meta_Info::ip_addr, LOG(), LOG_WARNING, MAX_METASERVER, meta_numservers, meta_port, meta_server, meta_sort(), ms1_is_running, ms2_info_mutex, MS_LARGE_BUF, NDI_BLACK, Meta_Info::num_players, Meta_Info::text_comment, and Meta_Info::version.
Referenced by metaserver1_get_info().
int metaserver2_get_info | ( | void | ) |
this is basically a replacement to the metaserver_get_info - idea being that when metaserver 1 support goes away, just yank that entire function and replace it with this.
Definition at line 423 of file metaserver.c.
References LOG(), LOG_ERROR, MAX_METASERVER, metaserver2_on, metaserver2_thread(), metaserver_load_cache(), ms2_info_mutex, and ms2_is_running.
Referenced by metaserver_get_info().
void* metaserver2_thread | ( | void * | junk | ) |
Thread function that goes off and collects metaserver data.
Definition at line 397 of file metaserver.c.
References get_metaserver2_data(), meta_numservers, meta_sort(), metaservers, ms2_info_mutex, and ms2_is_running.
Referenced by metaserver2_get_info().
size_t metaserver2_writer | ( | void * | ptr, |
size_t | size, | ||
size_t | nmemb, | ||
void * | data | ||
) |
Curle doesn't really have any built in way to get data from the URL into string data - instead, we get a blob of data which we need to find the newlines, etc from. Curl also provides the data in multiple calls if there is lots of data, and does not break the data on newline, so we need to store the extra (unprocessed) data from one call to the next.
ptr | pointer to data to process. |
size | |
nmemb | the size of each piece of data, and the number of these elements. We always presume the data is byte sized, and just multiple these together to get total amount of data. |
data | user supplied data pointer - in this case, it points to a buffer which is used to store unprocessed information from one call to the next. |
Definition at line 214 of file metaserver.c.
References Meta_Info::cs_version, Meta_Info::idle_time, Meta_Info::in_bytes, LOG(), LOG_CRITICAL, LOG_ERROR, meta_numservers, ms2_info_mutex, Meta_Info::num_players, Meta_Info::out_bytes, Meta_Info::port, Meta_Info::sc_version, and Meta_Info::uptime.
Referenced by get_metaserver2_data().
int metaserver_check_status | ( | void | ) |
Sees if we are gathering data or not. Note that we don't have to check to see what update methods are being used - the is_running flag is initialized to zero no matter if we are using that method to get the data, and unless we are using ms1 or ms2, the is_running flag will never get changed to be non-zero.
Definition at line 774 of file metaserver.c.
References ms1_is_running, ms2_info_mutex, and ms2_is_running.
Referenced by get_metaserver(), and metaserver_show().
int metaserver_get_info | ( | char * | metaserver, |
int | meta_port | ||
) |
Definition at line 791 of file metaserver.c.
References meta_numservers, metaserver1_get_info(), metaserver2_get_info(), and metaserver_on.
Referenced by do_metaserver(), main(), and metaserver_select().
int metaserver_select | ( | char * | sel | ) |
Definition at line 861 of file metaserver.c.
References cached_servers_ip, CACHED_SERVERS_MAX, cached_servers_name, cached_servers_num, CONFIG_PORT, csocket, draw_info(), ClientSocket::fd, Meta_Info::hostname, init_connection(), Meta_Info::ip_addr, MAX_BUF, meta_numservers, meta_server, metaserver_get_info(), metaserver_save_cache(), metaserver_show(), MIN, ms2_info_mutex, name, NDI_BLACK, Meta_Info::port, server, TRUE, and use_config.
Referenced by main().
void metaserver_show | ( | int | show_selection | ) |
Definition at line 807 of file metaserver.c.
References cached_servers_ip, cached_servers_name, cached_servers_num, check_server_version(), draw_info(), meta_numservers, meta_sort(), metaserver_check_status(), ms2_info_mutex, NDI_BLACK, and server.
Referenced by do_metaserver(), main(), and metaserver_select().
void monitorChilds | ( | void | ) |
Definition at line 239 of file misc.c.
References FirstChild, LOG(), PipeLog::log, LOG_INFO, ChildProcess::logger, ChildProcess::name, ChildProcess::next, ChildProcess::pid, and purgePipe().
Referenced by check_x_events(), and gtk_checkchilds().
void move_player | ( | int | dir | ) |
Definition at line 99 of file player.c.
References directions, SC_NORMAL, and send_command().
Referenced by button_map_event(), on_drawingarea_map_button_press_event(), and parse_game_button_press().
void negotiate_connection | ( | int | sound | ) |
Definition at line 338 of file client.c.
References Face_Information_struct::cache_hits, Face_Information_struct::cache_misses, CONFIG_CACHE, CONFIG_DOWNLOAD, CONFIG_LIGHTING, CONFIG_MAPHEIGHT, CONFIG_MAPWIDTH, CONFIG_SMOOTH, cs_print_string(), ClientSocket::cs_version, DoClient(), draw_info(), face_info, Face_Information_struct::faceset, ClientSocket::fd, image_update_download_status(), LOG(), LOG_WARNING, mapdata_set_size(), MAX_BUF, NDI_GOLD, Face_Information_struct::num_images, replyinfo_last_face, replyinfo_status, requestinfo_sent, RI_IMAGE_INFO, RI_IMAGE_SUMS, ClientSocket::sc_version, SendAddMe(), SendVersion(), use_config, want_config, Face_Information_struct::want_faceset, and want_skill_exp.
Referenced by main().
void new_player | ( | long | tag, |
char * | name, | ||
long | weight, | ||
long | face | ||
) |
Definition at line 55 of file player.c.
References copy_name, cpl, item_struct::d_name, item_struct::face, Spell_struct::next, item_struct::nrof, Player_Struct::ob, Player_Struct::spelldata, item_struct::tag, and item_struct::weight.
Referenced by PlayerCmd().
void NewmapCmd | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 1093 of file commands.c.
References mapdata_newmap().
int num_free_items | ( | void | ) |
Definition at line 444 of file item.c.
References item_struct::next.
Referenced by do_num_free_items().
void PickupCmd | ( | uint8 * | data, |
int | len | ||
) |
Server gives us current player's pickup.
data | buffer sent by server. |
len | length of data. |
Definition at line 1399 of file commands.c.
References client_pickup(), and GetInt_String().
item* player_item | ( | void | ) |
Definition at line 606 of file item.c.
References new_item(), and player.
Referenced by init_client_vars().
void PlayerCmd | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 782 of file commands.c.
References GetInt_String(), LOG(), LOG_WARNING, MAX_BUF, name, new_player(), and reset_player_data().
void print_inventory | ( | item * | op | ) |
Definition at line 654 of file item.c.
References item_struct::d_name, draw_info(), item_struct::flags, get_info_width(), item_struct::inv, MAX_BUF, NDI_BLACK, item_struct::next, item_struct::nrof, print_inventory(), item_struct::tag, and item_struct::weight.
Referenced by do_inv(), and print_inventory().
void purgePipe | ( | ChildProcess * | cp, |
int | pipe | ||
) |
Definition at line 210 of file misc.c.
References PipeLog::level, LOG(), LOG_ERROR, ChildProcess::logger, PipeLog::name, ChildProcess::name, and ChildProcess::tube.
Referenced by monitorChilds().
ChildProcess* raiseChild | ( | char * | name, |
int | flag | ||
) |
Definition at line 297 of file misc.c.
References CHILD_PIPEERR, CHILD_PIPEIN, CHILD_PIPEOUT, CHILD_SILENTFAIL, CHILD_STDERR, CHILD_STDIN, CHILD_STDOUT, CHILD_TUBE, ChildProcess::flag, LOG(), LOG_ERROR, LOG_INFO, name, ChildProcess::name, ChildProcess::next, and ChildProcess::pid.
Referenced by init_sounds().
void remove_item | ( | item * | op | ) |
Definition at line 321 of file item.c.
References item_struct::anim_state, item_struct::animation_id, item_struct::applied, Player_Struct::container, copy_name, cpl, item_struct::cursed, item_struct::d_name, item_struct::damned, item_struct::env, item_struct::face, item_struct::flagsval, free_items, item_struct::inv, item_struct::inv_updated, item_event_item_deleting(), item_struct::last_anim, item_struct::locked, item_struct::magical, item_struct::next, NO_ITEM_TYPE, item_struct::nrof, item_struct::open, item_struct::p_name, item_struct::prev, remove_item_inventory(), item_struct::s_name, item_struct::tag, item_struct::type, item_struct::unpaid, and item_struct::weight.
Referenced by DeleteItem(), remove_item_inventory(), and update_item().
void remove_item_inventory | ( | item * | op | ) |
Definition at line 382 of file item.c.
References item_struct::inv, item_struct::inv_updated, item_event_container_clearing(), and remove_item().
Referenced by DeleteInventory(), main(), and remove_item().
void ReplyInfoCmd | ( | uint8 * | buf, |
int | len | ||
) |
Definition at line 131 of file commands.c.
References get_exp_info(), get_image_info(), get_image_sums(), get_skill_info(), LOG(), and LOG_DEBUG.
void requestface | ( | int | pnum, |
char * | facename | ||
) |
Definition at line 381 of file image.c.
References Face_Information_struct::cache_misses, cs_print_string(), csocket, ClientSocket::fd, and strdup_local().
Referenced by finish_face_cmd().
void reset_client_vars | ( | void | ) |
Definition at line 249 of file init.c.
References Face_Information_struct::bmaps_checksum, Face_Information_struct::cache_hits, Face_Information_struct::cache_misses, ClientSocket::command_received, ClientSocket::command_sent, ClientSocket::command_time, FaceSets_struct::comment, Player_Struct::container, Player_Struct::count_left, cpl, csocket, FaceSets_struct::extension, face_info, Face_Information_struct::faceset, Face_Information_struct::facesets, FaceSets_struct::fallback, FREE_AND_CLEAR, FaceSets_struct::fullname, Face_Information_struct::have_faceset_info, Player_Struct::input_text, Player_Struct::last_command, Player_Struct::magicmap, MAX_FACE_SETS, MAX_SKILL, Stat_struct::maxgrace, Stat_struct::maxhp, Stat_struct::maxsp, Face_Information_struct::num_images, Face_Information_struct::old_bmaps_checksum, FaceSets_struct::prefix, Player_Struct::range, range_size, Player_Struct::ranges, reset_player_data(), Player_Struct::showmagic, FaceSets_struct::size, skill_names, Stat_struct::speed, Player_Struct::stats, and Player_Struct::title.
Referenced by main().
void reset_image_cache_data | ( | void | ) |
Definition at line 474 of file image.c.
References CONFIG_CACHE, MAXPIXMAPNUM, and want_config.
Referenced by reset_image_data().
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().
void run_dir | ( | int | dir | ) |
Definition at line 172 of file player.c.
References drun, MAX_BUF, SC_NORMAL, and send_command().
Referenced by parse_key().
int script_lua_command | ( | const char * | command, |
const char * | param | ||
) |
void script_lua_kill | ( | const char * | param | ) |
void script_lua_list | ( | const char * | param | ) |
void script_lua_load | ( | const char * | name | ) |
void script_lua_stats | ( | void | ) |
int send_command | ( | const char * | command, |
int | repeat, | ||
int | must_send | ||
) |
Definition at line 195 of file player.c.
References ClientSocket::command_received, ClientSocket::command_sent, CONFIG_CWINDOW, Player_Struct::count, cpl, cs_print_string(), ClientSocket::cs_version, csocket, ClientSocket::fd, Player_Struct::input_state, LOG(), LOG_ERROR, MAX_BUF, Reply_One, script_monitor(), SockList_AddInt(), SockList_AddShort(), SockList_AddString(), SockList_Init(), SockList_Send(), and use_config.
Referenced by clear_fire(), clear_fire_run(), clear_run(), command_help(), command_take(), do_serverhelp(), extended_command(), fire_dir(), menu_pickup0(), menu_pickup1(), menu_pickup10(), menu_pickup2(), menu_pickup3(), menu_pickup4(), menu_pickup5(), menu_pickup6(), menu_pickup7(), move_player(), new_menu_pickup(), on_spell_cast_clicked(), on_spell_invoke_clicked(), on_spell_treeview_row_activated(), run_dir(), script_process_cmd(), select_spell_event(), and stop_run().
void send_mark_obj | ( | item * | op | ) |
Definition at line 590 of file item.c.
References csocket, item_struct::env, ClientSocket::fd, MAX_BUF, script_monitor_str(), SockList_AddInt(), SockList_AddString(), SockList_Init(), SockList_Send(), and item_struct::tag.
Referenced by buttonpress_in_list(), list_button_event(), and list_item_action().
void send_reply | ( | const char * | text | ) |
Definition at line 769 of file commands.c.
References cpl, cs_print_string(), csocket, ClientSocket::fd, Player_Struct::no_echo, and x_set_echo().
Referenced by confirmUserPass(), dialog_callback(), do_key_press(), enter_callback(), keyfunc(), on_entry_commands_activate(), sendPassword(), sendstr(), and setUserPass().
void SendAddMe | ( | ClientSocket | csock | ) |
Definition at line 85 of file init.c.
References cs_print_string(), and ClientSocket::fd.
Referenced by negotiate_connection().
void SendSetFaceMode | ( | ClientSocket | csock, |
int | mode | ||
) |
Definition at line 91 of file init.c.
References cs_print_string(), and ClientSocket::fd.
Referenced by SetupCmd().
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().
void set_item_values | ( | item * | op, |
char * | name, | ||
sint32 | weight, | ||
uint16 | face, | ||
uint16 | flags, | ||
uint16 | anim, | ||
uint16 | animspeed, | ||
uint32 | nrof, | ||
uint16 | type | ||
) |
Definition at line 506 of file item.c.
References item_struct::anim_speed, item_struct::animation_id, copy_name, csocket, item_struct::d_name, item_struct::env, item_struct::face, get_flags(), get_number(), get_type_from_name(), item_struct::inv_updated, item_event_item_changed(), NO_ITEM_TYPE, item_struct::nrof, item_struct::p_name, item_struct::s_name, ClientSocket::sc_version, item_struct::type, update_item_sort(), and item_struct::weight.
Referenced by update_item().
int setLogListener | ( | LogListener | li | ) |
void setTextManager | ( | int | type, |
ExtTextManager | callback | ||
) |
Definition at line 497 of file commands.c.
References TextManager::callback, firstTextManager, TextManager::next, and TextManager::type.
Referenced by info_init(), and init_text_callbacks().
void SetupCmd | ( | char * | buf, |
int | len | ||
) |
Definition at line 173 of file commands.c.
References CF_FACE_CACHE, command_inscribe, CONFIG_CACHE, CONFIG_MAPHEIGHT, CONFIG_MAPWIDTH, CONFIG_SMOOTH, CONFIG_SOUND, cs_print_string(), csocket, draw_info(), face_info, Face_Information_struct::faceset, ClientSocket::fd, firstTextManager, LOG(), LOG_DEBUG, LOG_INFO, LOG_WARNING, mapdata_set_size(), MAX_BUF, NDI_RED, TextManager::next, resize_map_window(), SendSetFaceMode(), TRUE, TextManager::type, use_config, and want_config.
void SinkCmd | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 1376 of file commands.c.
void SmoothCmd | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 461 of file commands.c.
References addsmooth(), and GetShort_String().
void SockList_AddChar | ( | SockList * | sl, |
char | c | ||
) |
Definition at line 97 of file newsocket.c.
References SockList::buf, and SockList::len.
Referenced by inscribe_magical_scroll(), script_process_cmd(), and toggle_locked().
Definition at line 109 of file newsocket.c.
References SockList::buf, and SockList::len.
Referenced by inscribe_magical_scroll(), script_process_cmd(), send_command(), send_mark_obj(), and toggle_locked().
Definition at line 102 of file newsocket.c.
References SockList::buf, and SockList::len.
Referenced by send_command().
void SockList_AddString | ( | SockList * | sl, |
const char * | str | ||
) |
Definition at line 117 of file newsocket.c.
References SockList::buf, SockList::len, and MAX_BUF.
Referenced by inscribe_magical_scroll(), script_process_cmd(), send_command(), send_mark_obj(), and toggle_locked().
Definition at line 91 of file newsocket.c.
References SockList::buf, and SockList::len.
Referenced by cs_print_string(), inscribe_magical_scroll(), script_process_cmd(), send_command(), send_mark_obj(), and toggle_locked().
int SockList_ReadPacket | ( | int | fd, |
SockList * | sl, | ||
int | len | ||
) |
Definition at line 173 of file newsocket.c.
References SockList::buf, cst_lst, cst_tot, CS_Stats::ibytes, SockList::len, llevDebug, llevError, and LOG().
Referenced by DoClient().
int SockList_Send | ( | SockList * | sl, |
int | fd | ||
) |
Definition at line 127 of file newsocket.c.
References SockList::buf, SockList::len, and write_socket().
Referenced by cs_print_string(), inscribe_magical_scroll(), script_process_cmd(), send_command(), send_mark_obj(), and toggle_locked().
void StatsCmd | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 596 of file commands.c.
References Stat_struct::ac, Stat_struct::attuned, Stat_struct::Cha, Stat_struct::Con, cpl, CS_NUM_SKILLS, CS_STAT_AC, CS_STAT_ARMOUR, CS_STAT_CHA, CS_STAT_CON, CS_STAT_DAM, CS_STAT_DEX, CS_STAT_EXP, CS_STAT_EXP64, CS_STAT_FLAGS, CS_STAT_FOOD, CS_STAT_GRACE, CS_STAT_HP, CS_STAT_INT, CS_STAT_LEVEL, CS_STAT_MAXGRACE, CS_STAT_MAXHP, CS_STAT_MAXSP, CS_STAT_POW, CS_STAT_RANGE, CS_STAT_RESIST_END, CS_STAT_RESIST_START, CS_STAT_SKILLEXP_AGILITY, CS_STAT_SKILLEXP_AGLEVEL, CS_STAT_SKILLEXP_MAGIC, CS_STAT_SKILLEXP_MALEVEL, CS_STAT_SKILLEXP_MELEVEL, CS_STAT_SKILLEXP_MENTAL, CS_STAT_SKILLEXP_PELEVEL, CS_STAT_SKILLEXP_PERSONAL, CS_STAT_SKILLEXP_PHLEVEL, CS_STAT_SKILLEXP_PHYSIQUE, CS_STAT_SKILLEXP_START, CS_STAT_SKILLEXP_WILEVEL, CS_STAT_SKILLEXP_WISDOM, CS_STAT_SKILLINFO, CS_STAT_SP, CS_STAT_SPEED, CS_STAT_SPELL_ATTUNE, CS_STAT_SPELL_DENY, CS_STAT_SPELL_REPEL, CS_STAT_STR, CS_STAT_TITLE, CS_STAT_WC, CS_STAT_WEAP_SP, CS_STAT_WEIGHT_LIM, CS_STAT_WIS, Stat_struct::dam, Stat_struct::denied, Stat_struct::Dex, draw_message_window(), draw_stats(), Stat_struct::exp, Stat_struct::flags, Stat_struct::food, GetInt64_String(), GetInt_String(), GetShort_String(), Stat_struct::grace, Stat_struct::hp, Stat_struct::Int, Stat_struct::level, LOG(), LOG_WARNING, Stat_struct::maxgrace, Stat_struct::maxhp, Stat_struct::maxsp, Stat_struct::Pow, Player_Struct::range, Stat_struct::repelled, Stat_struct::resist_change, Stat_struct::resists, script_lua_stats(), set_weight_limit(), Stat_struct::skill_exp, Stat_struct::skill_level, Stat_struct::sp, Stat_struct::speed, Player_Struct::spells_updated, Player_Struct::stats, Stat_struct::Str, Player_Struct::title, use_skill(), Stat_struct::wc, Stat_struct::weapon_sp, Stat_struct::weight_limit, and Stat_struct::Wis.
void stop_fire | ( | void | ) |
Definition at line 116 of file player.c.
References cpl, dfire, Player_Struct::input_state, and Playing.
Referenced by keyfunc(), and parse_key_release().
void stop_run | ( | void | ) |
Definition at line 166 of file player.c.
References drun, SC_FIRERUN, and send_command().
Referenced by keyfunc(), and parse_key_release().
char* strdup_local | ( | const char * | str | ) |
Definition at line 125 of file misc.c.
Referenced by applyconfig(), get_image_info(), get_root_display(), get_skill_info(), insert_key(), load_defaults(), on_keybinding_button_update_clicked(), read_config_window(), and requestface().
void TickCmd | ( | uint8 * | data, |
int | len | ||
) |
Definition at line 1383 of file commands.c.
References client_tick(), GetInt_String(), and tick.
void toggle_locked | ( | item * | op | ) |
Definition at line 573 of file item.c.
References csocket, item_struct::env, ClientSocket::fd, item_struct::locked, MAX_BUF, script_monitor_str(), SockList_AddChar(), SockList_AddInt(), SockList_AddString(), SockList_Init(), SockList_Send(), and item_struct::tag.
Referenced by buttonpress_in_list(), list_button_event(), and list_item_action().
void update_item | ( | int | tag, |
int | loc, | ||
char * | name, | ||
int | weight, | ||
int | face, | ||
int | flags, | ||
int | anim, | ||
int | animspeed, | ||
uint32 | nrof, | ||
int | type | ||
) |
Definition at line 618 of file item.c.
References item_struct::anim_speed, item_struct::animation_id, copy_name, create_new_item(), item_struct::d_name, item_struct::env, item_struct::face, get_flags(), item_struct::inv, item_struct::inv_updated, locate_item(), item_struct::nrof, remove_item(), set_item_values(), item_struct::tag, and item_struct::weight.
Referenced by common_item_command(), and UpdateItemCmd().
void update_item_sort | ( | item * | it | ) |
Definition at line 96 of file item.c.
References item_struct::applied, item_struct::env, insert_item_before_item(), item_struct::inv, item_struct::locked, item_struct::next, item_struct::prev, item_struct::s_name, and item_struct::type.
Referenced by set_item_values().
void UpdateItemCmd | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 862 of file commands.c.
References item_struct::anim_speed, item_struct::animation_id, item_struct::env, item_struct::face, item_struct::flagsval, GetInt_String(), GetShort_String(), item_actions(), locate_item(), LOG(), LOG_WARNING, MAX_BUF, name, item_struct::nrof, item_struct::tag, item_struct::type, UPD_ANIM, UPD_ANIMSPEED, UPD_FACE, UPD_FLAGS, UPD_LOCATION, UPD_NAME, UPD_NROF, UPD_WEIGHT, update_item(), and item_struct::weight.
void UpdspellCmd | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 1019 of file commands.c.
References cpl, Spell_struct::dam, GetChar_String(), GetInt_String(), GetShort_String(), Spell_struct::grace, LOG(), LOG_WARNING, Spell_struct::next, Spell_struct::sp, Player_Struct::spelldata, Player_Struct::spells_updated, Spell_struct::tag, UPD_SP_DAMAGE, UPD_SP_GRACE, and UPD_SP_MANA.
void use_skill | ( | int | skill_id | ) |
Definition at line 573 of file commands.c.
References last_used_skills.
Referenced by StatsCmd().
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.