Crossfire Client, Branches
R11627
|
Go to the source code of this file.
Macros | |
#define | NUM_LAYERS (MAP1_LAYERS-1) |
Functions | |
void | AddMeFail (char *data, int len) |
void | AddMeSuccess (char *data, int len) |
void | AddspellCmd (unsigned char *data, int len) |
void | AnimCmd (unsigned char *data, int len) |
static void | common_item_command (uint8 *data, int len) |
void | DeleteInventory (unsigned char *data, int len) |
void | DeleteItem (unsigned char *data, int len) |
void | DeleteSpell (unsigned char *data, int len) |
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) |
static void | get_exp_info (const unsigned char *data, int len) |
static void | get_skill_info (char *data, int len) |
static ExtTextManager | getTextManager (int type) |
void | GoodbyeCmd (char *data, int len) |
void | handle_query (char *data, int len) |
void | Item2Cmd (unsigned char *data, int len) |
void | item_actions (item *op) |
void | MagicMapCmd (unsigned char *data, int len) |
void | Map2Cmd (unsigned char *data, int len) |
void | map_scrollCmd (char *data, int len) |
void | MapExtendedCmd (unsigned char *data, int len) |
void | NewmapCmd (unsigned char *data, int len) |
void | PickupCmd (uint8 *data, int len) |
void | PlayerCmd (unsigned char *data, int len) |
void | ReplyInfoCmd (uint8 *buf, int len) |
void | send_reply (const char *text) |
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 | StatsCmd (unsigned char *data, int len) |
void | TickCmd (uint8 *data, int len) |
void | UpdateItemCmd (unsigned char *data, int len) |
void | UpdspellCmd (unsigned char *data, int len) |
void | use_skill (int skill_id) |
Variables | |
Animations | animations [MAXANIM] |
TextManager * | firstTextManager = NULL |
int | mapupdatesent = 0 |
const char *const | rcsid_common_commands_c |
#define NUM_LAYERS (MAP1_LAYERS-1) |
Definition at line 1114 of file commands.c.
Referenced by MapExtendedCmd().
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 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.
|
static |
Definition at line 819 of file commands.c.
References GetInt_String(), GetShort_String(), item_actions(), locate_item(), LOG(), LOG_WARNING, MAX_BUF, name, and update_item().
Referenced by Item2Cmd().
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 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().
|
static |
Definition at line 75 of file commands.c.
References exp_table, exp_table_max, GetInt64_String(), GetShort_String(), LOG(), and LOG_ERROR.
Referenced by ReplyInfoCmd().
|
static |
Definition at line 96 of file commands.c.
References CS_NUM_SKILLS, CS_STAT_SKILLINFO, LOG(), LOG_WARNING, skill_names, and strdup_local().
Referenced by ReplyInfoCmd().
|
static |
Definition at line 514 of file commands.c.
References TextManager::callback, firstTextManager, TextManager::next, and TextManager::type.
Referenced by DrawExtInfoCmd().
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 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().
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.
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.
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 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.
void NewmapCmd | ( | unsigned char * | data, |
int | len | ||
) |
Definition at line 1093 of file commands.c.
References mapdata_newmap().
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().
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 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 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 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 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 TickCmd | ( | uint8 * | data, |
int | len | ||
) |
Definition at line 1383 of file commands.c.
References client_tick(), GetInt_String(), and tick.
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().
Animations animations[MAXANIM] |
Definition at line 419 of file commands.c.
Referenced by animate_inventory(), animate_look(), animate_objects(), animate_one_item(), draw_inv_table(), mapdata_animation(), and mapdata_set_anim_layer().
TextManager* firstTextManager = NULL |
Definition at line 495 of file commands.c.
Referenced by getTextManager(), setTextManager(), and SetupCmd().
int mapupdatesent = 0 |
Definition at line 66 of file commands.c.
Referenced by Map2Cmd(), and MapExtendedCmd().
const char* const rcsid_common_commands_c |
Definition at line 1 of file commands.c.