Crossfire Client, Branch  R11627
proto.h
Go to the documentation of this file.
00001 /* client.c */
00002 void DoClient(ClientSocket *csocket);
00003 int init_connection(char *host, int port);
00004 void negotiate_connection(int sound);
00005 /* commands.c */
00006 void ReplyInfoCmd(uint8 *buf, int len);
00007 void SetupCmd(char *buf, int len);
00008 void ExtendedInfoSetCmd(char *data, int len);
00009 void AddMeFail(char *data, int len);
00010 void AddMeSuccess(char *data, int len);
00011 void GoodbyeCmd(char *data, int len);
00012 void AnimCmd(unsigned char *data, int len);
00013 void SmoothCmd(unsigned char *data, int len);
00014 void DrawInfoCmd(char *data, int len);
00015 void setTextManager(int type, ExtTextManager callback);
00016 void DrawExtInfoCmd(char *data, int len);
00017 void use_skill(int skill_id);
00018 void StatsCmd(unsigned char *data, int len);
00019 void handle_query(char *data, int len);
00020 void send_reply(const char *text);
00021 void PlayerCmd(unsigned char *data, int len);
00022 void item_actions(item *op);
00023 void Item2Cmd(unsigned char *data, int len);
00024 void UpdateItemCmd(unsigned char *data, int len);
00025 void DeleteItem(unsigned char *data, int len);
00026 void DeleteInventory(unsigned char *data, int len);
00027 void AddspellCmd(unsigned char *data, int len);
00028 void UpdspellCmd(unsigned char *data, int len);
00029 void DeleteSpell(unsigned char *data, int len);
00030 void NewmapCmd(unsigned char *data, int len);
00031 void Map2Cmd(unsigned char *data, int len);
00032 void map_scrollCmd(char *data, int len);
00033 int ExtSmooth(unsigned char *data, int len, int x, int y, int layer);
00034 void MapExtendedCmd(unsigned char *data, int len);
00035 void MagicMapCmd(unsigned char *data, int len);
00036 void SinkCmd(unsigned char *data, int len);
00037 void TickCmd(uint8 *data, int len);
00038 void PickupCmd(uint8 *data, int len);
00039 /* image.c */
00040 void init_common_cache_data(void);
00041 void requestface(int pnum, char *facename);
00042 void finish_face_cmd(int pnum, uint32 checksum, int has_sum, char *face, int faceset);
00043 void reset_image_cache_data(void);
00044 void Face2Cmd(uint8 *data, int len);
00045 void Image2Cmd(uint8 *data, int len);
00046 void display_newpng(int face, uint8 *buf, int buflen, int setnum);
00047 void get_image_info(uint8 *data, int len);
00048 void get_image_sums(char *data, int len);
00049 /* init.c */
00050 void VersionCmd(char *data, int len);
00051 void SendVersion(ClientSocket csock);
00052 void SendAddMe(ClientSocket csock);
00053 void SendSetFaceMode(ClientSocket csock, int mode);
00054 void init_client_vars(void);
00055 void reset_player_data(void);
00056 void reset_client_vars(void);
00057 /* item.c */
00058 uint8 get_type_from_name(const char *name);
00059 void update_item_sort(item *it);
00060 const char *get_number(uint32 i);
00061 void free_all_items(item *op);
00062 item *locate_item(sint32 tag);
00063 void remove_item(item *op);
00064 void remove_item_inventory(item *op);
00065 item *create_new_item(item *env, sint32 tag);
00066 int num_free_items(void);
00067 void set_item_values(item *op, char *name, sint32 weight, uint16 face, uint16 flags, uint16 anim, uint16 animspeed, uint32 nrof, uint16 type);
00068 void toggle_locked(item *op);
00069 void send_mark_obj(item *op);
00070 item *player_item(void);
00071 item *map_item(void);
00072 void update_item(int tag, int loc, char *name, int weight, int face, int flags, int anim, int animspeed, uint32 nrof, int type);
00073 void print_inventory(item *op);
00074 void animate_objects(void);
00075 int can_write_spell_on(item *it);
00076 void inscribe_magical_scroll(item *scroll, Spell *spell);
00077 /* mapdata.c */
00078 void mapdata_init(void);
00079 void mapdata_reset(void);
00080 void mapdata_set_size(int viewx, int viewy);
00081 int mapdata_is_inside(int x, int y);
00082 void mapdata_clear_space(int x, int y);
00083 void mapdata_set_check_space(int x, int y);
00084 void mapdata_set_darkness(int x, int y, int darkness);
00085 void mapdata_set_smooth(int x, int y, int smooth, int layer);
00086 void mapdata_clear_old(int x, int y);
00087 void mapdata_set_face_layer(int x, int y, sint16 face, int layer);
00088 void mapdata_set_anim_layer(int x, int y, uint16 anim, uint8 anim_speed, int layer);
00089 void mapdata_scroll(int dx, int dy);
00090 void mapdata_newmap(void);
00091 sint16 mapdata_face(int x, int y, int layer);
00092 sint16 mapdata_bigface(int x, int y, int layer, int *ww, int *hh);
00093 sint16 mapdata_bigface_head(int x, int y, int layer, int *ww, int *hh);
00094 void mapdata_animation(void);
00095 /* metaserver.c */
00096 int check_server_version(int entry);
00097 size_t metaserver2_writer(void *ptr, size_t size, size_t nmemb, void *data);
00098 void *metaserver2_thread(void *junk);
00099 int metaserver2_get_info(void);
00100 void init_metaserver(void);
00101 void *metaserver1_thread(void *junk);
00102 int metaserver1_get_info(void);
00103 int metaserver_check_status(void);
00104 int metaserver_get_info(char *metaserver, int meta_port);
00105 void metaserver_show(int show_selection);
00106 int metaserver_select(char *sel);
00107 /* misc.c */
00108 int make_path_to_dir(char *directory);
00109 int make_path_to_file(char *filename);
00110 char *strdup_local(const char *str);
00111 int setLogListener(LogListener li);
00112 void clearLogListener(void);
00113 char *getLogTextRaw(LogLevel level, const char *origin, const char *message);
00114 char *getLogText(const LogEntry *le);
00115 void LOG(LogLevel level, const char *origin, const char *format, ...);
00116 void purgePipe(ChildProcess *cp, int pipe);
00117 void monitorChilds(void);
00118 void logPipe(ChildProcess *child, LogLevel level, int pipe);
00119 void logChildPipe(ChildProcess *child, LogLevel level, int flag);
00120 ChildProcess *raiseChild(char *name, int flag);
00121 /* newsocket.c */
00122 void SockList_Init(SockList *sl, uint8 *buf);
00123 void SockList_AddChar(SockList *sl, char c);
00124 void SockList_AddShort(SockList *sl, uint16 data);
00125 void SockList_AddInt(SockList *sl, uint32 data);
00126 void SockList_AddString(SockList *sl, const char *str);
00127 int SockList_Send(SockList *sl, int fd);
00128 char GetChar_String(const unsigned char *data);
00129 int GetInt_String(const unsigned char *data);
00130 sint64 GetInt64_String(const unsigned char *data);
00131 short GetShort_String(const unsigned char *data);
00132 int SockList_ReadPacket(int fd, SockList *sl, int len);
00133 int cs_print_string(int fd, const char *str, ...);
00134 /* p_cmd.c */
00135 /* player.c */
00136 void new_player(long tag, char *name, long weight, long face);
00137 void look_at(int x, int y);
00138 void client_send_apply(int tag);
00139 void client_send_examine(int tag);
00140 void client_send_move(int loc, int tag, int nrof);
00141 void move_player(int dir);
00142 void stop_fire(void);
00143 void clear_fire_run(void);
00144 void clear_fire(void);
00145 void clear_run(void);
00146 void fire_dir(int dir);
00147 void stop_run(void);
00148 void run_dir(int dir);
00149 int send_command(const char *command, int repeat, int must_send);
00150 void CompleteCmd(unsigned char *data, int len);
00151 void command_take(const char *command, const char *cpnext);
00152 /* script.c */
00153 /* script_lua.c */
00154 void script_lua_load(const char *name);
00155 void script_lua_list(const char *param);
00156 void script_lua_kill(const char *param);
00157 void script_lua_stats(void);
00158 int script_lua_command(const char *command, const char *param);