 |
Crossfire Client, Trunk
|
Go to the documentation of this file.
8 void AnimCmd(
unsigned char *data,
int len);
9 void SmoothCmd(
unsigned char *data,
int len);
14 void StatsCmd(
unsigned char *data,
int len);
17 void PlayerCmd(
unsigned char *data,
int len);
19 void Item2Cmd(
unsigned char *data,
int len);
26 void NewmapCmd(
unsigned char *data,
int len);
27 void Map2Cmd(
unsigned char *data,
int len);
29 int ExtSmooth(
unsigned char *data,
int len,
int x,
int y,
int layer);
32 void SinkCmd(
unsigned char *data,
int len);
33 void TickCmd(guint8 *data,
int len);
41 void finish_face_cmd(
int pnum, guint32 checksum,
int has_sum,
char *face,
int faceset);
43 void Face2Cmd(guint8 *data,
int len);
45 void display_newpng(
int face, guint8 *buf,
int buflen,
int setnum);
63 void set_item_values(
item *op,
char *name, gint32 weight, guint16 face, guint16 flags, guint16 anim, guint16 animspeed, guint32 nrof, guint16 type);
68 void update_item(
int tag,
int loc,
char *name,
int weight,
int face,
int flags,
int anim,
int animspeed, guint32 nrof,
int type);
75 void LOG(
LogLevel level,
const char *origin,
const char *format, ...);
88 size_t len, GError** error);
92 void new_player(
long tag,
char *name,
long weight,
long face);
104 int send_command(
const char *command,
int repeat,
int must_send);
106 void command_take(
const char *command,
const char *cpnext);
void DeleteSpell(unsigned char *data, int len)
void SockList_AddChar(SockList *sl, char c)
void reset_image_cache_data(void)
We can now connect to different servers, so we need to clear out any old images.
void SinkCmd(unsigned char *data, int len)
void AnimCmd(unsigned char *data, int len)
void AddMeFail(char *data, int len)
Handles when the server says we can't be added.
void SockList_AddShort(SockList *sl, guint16 data)
void PickupCmd(guint8 *data, int len)
Server gives us current player's pickup.
void(* ExtTextManager)(int flag, int type, int subtype, char *message)
void Item2Cmd(unsigned char *data, int len)
Parses the data sent to us from the server.
const char * get_number(guint32 i)
guint8 get_type_from_name(const char *name)
void DeleteInventory(unsigned char *data, int len)
void Face2Cmd(guint8 *data, int len)
We only get here if the server believes we are caching images.
void TickCmd(guint8 *data, int len)
Got a tick from the server.
item * locate_item(gint32 tag)
void finish_face_cmd(int pnum, guint32 checksum, int has_sum, char *face, int faceset)
This is common for all the face commands (face2, face1, face).
void script_lua_kill(const char *param)
void SockList_AddInt(SockList *sl, guint32 data)
void new_player(long tag, char *name, long weight, long face)
Initialize player object using information from the server.
int make_path_to_file(char *filename)
If any directories in the given path doesn't exist, they are created.
char GetChar_String(const unsigned char *data)
void script_lua_stats(void)
void client_send_move(int loc, int tag, int nrof)
Request to move 'nrof' objects with 'tag' to 'loc'.
void SmoothCmd(unsigned char *data, int len)
Receives the smooth mapping from the server.
void send_mark_obj(item *op)
void remove_item_inventory(item *op)
void free_all_items(item *op)
void PlayerCmd(unsigned char *data, int len)
Gets the player information.
void DrawInfoCmd(char *data, int len)
Draws a string in the info window.
bool SockList_ReadPacket(GSocketConnection c[static 1], SockList sl[static 1], size_t len, GError **error)
Reads from the socket and puts data into a socklist.
void StatsCmd(unsigned char *data, int len)
Updates the local copy of the stats and displays it.
int ExtSmooth(unsigned char *data, int len, int x, int y, int layer)
Extract smoothing infos from an extendedmapinfo packet part data is located at the beginning of the s...
void MapExtendedCmd(unsigned char *data, int len)
Handle MapExtended command Warning! if you add commands to extended, take care that the 'layer' argum...
void NewmapCmd(unsigned char *data, int len)
void ReplyInfoCmd(guint8 *buf, int len)
void set_item_values(item *op, char *name, gint32 weight, guint16 face, guint16 flags, guint16 anim, guint16 animspeed, guint32 nrof, guint16 type)
void VersionCmd(char *data, int len)
int can_write_spell_on(item *it)
void SetupCmd(char *buf, int len)
Received a response to a setup from the server.
int send_command(const char *command, int repeat, int must_send)
gint64 GetInt64_String(const unsigned char *data)
The reverse of SockList_AddInt, but on strings instead.
void command_take(const char *command, const char *cpnext)
void Image2Cmd(guint8 *data, int len)
void SockList_Init(SockList *sl, guint8 *buf)
void Map2Cmd(unsigned char *data, int len)
void AddMeSuccess(char *data, int len)
This is really a throwaway command - there really isn't any reason to send addme_success commands.
int GetInt_String(const unsigned char *data)
The reverse of SockList_AddInt, but on strings instead.
void script_lua_load(const char *name)
void client_send_examine(int tag)
void reset_player_data(void)
Reset player experience data.
void map_scrollCmd(char *data, int len)
Scrolls the map on the client by some amount.
void send_reply(const char *text)
Sends a reply to the server.
void SendAddMe(ClientSocket csock)
void DeleteItem(unsigned char *data, int len)
void get_image_info(guint8 *data, int len)
Takes the data from a replyinfo image_info and breaks it down.
void get_image_sums(char *data, int len)
This gets a block of checksums from the server.
void ExtendedInfoSetCmd(char *data, int len)
void UpdspellCmd(unsigned char *data, int len)
void CompleteCmd(unsigned char *data, int len)
int SockList_Send(SockList *sl, GSocketConnection *c)
Send data from a socklist to the socket.
int cs_print_string(GSocketConnection *c, const char *str,...)
Send a printf-formatted packet to the socket.
void look_at(int x, int y)
void script_lua_list(const char *param)
short GetShort_String(const unsigned char *data)
void client_init(void)
Called ONCE during client startup to initialize configuration and other variables to reasonable defau...
void init_common_cache_data(void)
void print_inventory(item *op)
void item_actions(item *op)
Basic support for socket communications, including the file descriptor, input buffer,...
void setTextManager(int type, ExtTextManager callback)
void toggle_locked(item *op)
void AccountPlayersCmd(char *buf, int len)
This handles the accountplayers command.
void GoodbyeCmd(char *data, int len)
void free_all_race_class_info(Race_Class_Info *data, int num_entries)
This function clears the data from the Race_Class_Info array.
void DrawExtInfoCmd(char *data, int len)
We must extract color, type, subtype and dispatch to callback.
void remove_item(item *op)
void SendVersion(ClientSocket csock)
void MagicMapCmd(unsigned char *data, int len)
void error_dialog(char *error, char *message)
Display an error message dialog.
int script_lua_command(const char *command, const char *param)
void AddspellCmd(unsigned char *data, int len)
void use_skill(int skill_id)
Maintain the last_used_skills LRU list for displaying the recently used skills first.
void client_send_apply(int tag)
void UpdateItemCmd(unsigned char *data, int len)
Updates some attributes of an item.
void FailureCmd(char *buf, int len)
Handles a failure return from the server.
void requestface(int pnum, char *facename)
void LOG(LogLevel level, const char *origin, const char *format,...)
Log messages of a certain importance to stderr.
void animate_objects(void)
void update_item_sort(item *it)
void update_item(int tag, int loc, char *name, int weight, int face, int flags, int anim, int animspeed, guint32 nrof, int type)
void client_reset(void)
Clear client variables between connections to different servers.
void display_newpng(int face, guint8 *buf, int buflen, int setnum)
This function is called when the server has sent us the actual png data for an image.
void SockList_AddString(SockList *sl, const char *str)
void handle_query(char *data, int len)
Prompts the user for input.
Contains the base information we use to make up a packet we want to send.
void inscribe_magical_scroll(item *scroll, Spell *spell)