--- deliantra/server/include/sockproto.h 2006/05/21 23:46:38 1.3
+++ deliantra/server/include/sockproto.h 2007/07/01 05:00:18 1.32
@@ -1,103 +1,97 @@
+/*
+ * This file is part of Crossfire TRT, the Roguelike Realtime MORPG.
+ *
+ * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team
+ *
+ * Crossfire TRT is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * The authors can be reached via e-mail to
+ */
+
/* image.c */
int is_valid_faceset(int fsn);
void free_socket_images(void);
void read_client_images(void);
-void SetFaceMode(char *buf, int len, NewSocket *ns);
-void SendFaceCmd(char *buff, int len, NewSocket *ns);
-void esrv_send_face(NewSocket *ns, short face_num, int nocache);
-void send_image_info(NewSocket *ns, char *params);
-void send_image_sums(NewSocket *ns, char *params);
+void SetFaceMode(char *buf, int len, client *ns);
+void AskFaceCmd(char *buf, int len, client *ns);
+void send_image_info(client *ns, char *params);
+void send_image_sums(client *ns, char *params);
/* info.c */
-void flush_output_element(const object *pl, Output_Buf *outputs);
void new_draw_info(int flags, int pri, const object *pl, const char *buf);
void new_draw_info_format(int flags, int pri, const object *pl, const char *format, ...);
void draw_ext_info(int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char* message,const char* oldmessage);
void draw_ext_info_format(int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char* old_format, char* new_format, ...);
-void new_info_map_except(int color, mapstruct *map, object *op, const char *str);
-void new_info_map_except2(int color, mapstruct *map, object *op1, object *op2, const char *str);
-void new_info_map(int color, mapstruct *map, const char *str);
-void clear_win_info(object *op);
-void rangetostring(object *pl, char *obuf);
+void new_info_map_except(int color, maptile *map, object *op, const char *str);
+void new_info_map_except2(int color, maptile *map, object *op1, object *op2, const char *str);
+void new_info_map(int color, maptile *map, const char *str);
void set_title(object *pl, char *buf);
void magic_mapping_mark(object *pl, char *map_mark, int strength);
void draw_magic_map(object *pl);
void Log_Kill(const char *Who, const char *What, int WhatType, const char *With, int WithType);
/* init.c */
-void InitConnection(NewSocket *ns, const char *from_ip);
void init_ericserver(void);
void free_all_newserver(void);
-void free_newsocket(NewSocket *ns);
void final_free_player(player *pl);
/* item.c */
unsigned int query_flags(object *op);
-void esrv_draw_look(object *pl);
+void esrv_draw_look(player *pl);
void esrv_send_inventory(object *pl, object *op);
void esrv_update_item(int flags, object *pl, object *op);
void esrv_send_item(object *pl, object *op);
void esrv_del_item(player *pl, int tag);
object *esrv_get_ob_from_count(object *pl, tag_t count);
void ExamineCmd(char *buf, int len, player *pl);
+void ExCmd(char *buf, int len, player *pl);
void ApplyCmd(char *buf, int len, player *pl);
-void LockItem(uint8 *data, int len, player *pl);
-void MarkItem(uint8 *data, int len, player *pl);
-void look_at(object *op, int dx, int dy);
+void LockItem(char *data, int len, player *pl);
+void MarkItem(char *data, int len, player *pl);
void LookAt(char *buf, int len, player *pl);
void esrv_move_object(object *pl, tag_t to, tag_t tag, long nrof);
/* loop.c */
-void RequestInfo(char *buf, int len, NewSocket *ns);
-void Handle_Oldsocket(NewSocket *ns);
-void HandleClient(NewSocket *ns, player *pl);
+void RequestInfo(char *buf, int len, client *ns);
void watchdog(void);
void flush_sockets(void);
void doeric_server(void);
/* lowlevel.c */
-void Socket_Flush (NewSocket *ns);
-void SockList_Init(SockList *sl);
-void SockList_AddChar(SockList *sl, char c);
-void SockList_AddShort(SockList *sl, uint16 data);
-void SockList_AddInt(SockList *sl, uint32 data);
-void SockList_AddInt64(SockList *sl, uint64 data);
-int GetInt_String(unsigned char *data);
-short GetShort_String(unsigned char *data);
-int SockList_ReadPacket(int fd, SockList *sl, int len);
-void write_socket_buffer(NewSocket *ns);
-void Write_To_Socket(NewSocket *ns, unsigned char *buf, int len);
-void cs_write_string(NewSocket *ns, const char *buf, int len);
-void Send_With_Handling(NewSocket *ns, SockList *msg);
-void Write_String_To_Socket(NewSocket *ns, char *buf, int len);
void write_cs_stats(void);
-/* metaserver.c */
-void metaserver_init(void);
-void metaserver_update(void);
/* request.c */
-void SetUp(char *buf, int len, NewSocket *ns);
-void AddMeCmd(char *buf, int len, NewSocket *ns);
-void ToggleExtendedInfos(char *buf, int len, NewSocket *ns);
-void ToggleExtendedText (char *buf, int len, NewSocket *ns);
-void AskSmooth(char *buf, int len, NewSocket *ns);
+void SetUp(char *buf, int len, client *ns);
+void AddMeCmd(char *buf, int len, client *ns);
+void ToggleExtendedInfos(char *buf, int len, client *ns);
+void ToggleExtendedText (char *buf, int len, client *ns);
+void AskSmooth(char *buf, int len, client *ns);
void PlayerCmd(char *buf, int len, player *pl);
-void NewPlayerCmd(uint8 *buf, int len, player *pl);
-void ReplyCmd(char *buf, int len, player *pl);
-void VersionCmd(char *buf, int len, NewSocket *ns);
-void SetSound(char *buf, int len, NewSocket *ns);
+void NewPlayerCmd(char *buf, int len, player *pl);
+void ReplyCmd(char *buf, int len, client *ns);
+void VersionCmd(char *buf, int len, client *ns);
+void SetSound(char *buf, int len, client *ns);
void MapRedrawCmd(char *buff, int len, player *pl);
+void ExtCmd(char *buff, int len, player *pl);
+void ExtiCmd(char *buff, int len, client *ns);
void MapInfoCmd(char *buff, int len, player *pl);
-void MapNewmapCmd(player *pl);
void MoveCmd(char *buf, int len, player *pl);
-void send_query(NewSocket *ns, uint8 flags, char *text);
+void send_query(client *ns, uint8 flags, const char *text);
void esrv_update_stats(player *pl);
void esrv_new_player(player *pl, uint32 weight);
-void esrv_send_animation(NewSocket *ns, short anim_num);
-int getExtendedMapInfoSize(NewSocket *ns);
-void draw_client_map1(object *pl);
-void draw_client_map(object *pl);
-void esrv_map_scroll(NewSocket *ns, int dx, int dy);
+int getExtendedMapInfoSize(client *ns);
+void draw_client_map(player *pl);
void send_plugin_custom_message(object *pl, char *buf);
-void send_skill_info(NewSocket *ns, char *params);
-void send_spell_paths (NewSocket *ns, char *params);
+void send_skill_info(client *ns, char *params);
+void send_spell_paths (client *ns, char *params);
void esrv_update_spells(player *pl);
void esrv_remove_spell(player *pl, object *spell);
void esrv_add_spells(player *pl, object *spell);
/* sounds.c */
void play_sound_player_only(player *pl, short soundnum, sint8 x, sint8 y);
-void play_sound_map(mapstruct *map, int x, int y, short sound_num);
+void play_sound_map(maptile *map, int x, int y, short sound_num);