1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * |
5 | * |
6 | * Deliantra is free software: you can redistribute it and/or modify it under |
6 | * Deliantra is free software: you can redistribute it and/or modify it under |
7 | * the terms of the Affero GNU General Public License as published by the |
7 | * the terms of the Affero GNU General Public License as published by the |
8 | * Free Software Foundation, either version 3 of the License, or (at your |
8 | * Free Software Foundation, either version 3 of the License, or (at your |
9 | * option) any later version. |
9 | * option) any later version. |
… | |
… | |
103 | |
103 | |
104 | // a handler for a specific type of packet |
104 | // a handler for a specific type of packet |
105 | enum { |
105 | enum { |
106 | PF_PLAYER = 0x01, // must have valid player / will by synchronised |
106 | PF_PLAYER = 0x01, // must have valid player / will by synchronised |
107 | PF_PLAYING = 0x02, // must be in playing state |
107 | PF_PLAYING = 0x02, // must be in playing state |
108 | PF_COMMAND = 0x04, // is a suer command |
108 | PF_COMMAND = 0x04, // is a user command |
109 | }; |
109 | }; |
110 | |
110 | |
111 | // face types. bit 0 means "has meta info prepended" |
111 | // face types. bit 0 means "has meta info prepended" |
112 | enum { |
112 | enum { |
113 | FT_IMAGE = 0 * 2 + 0, // images |
113 | FT_IMAGE = 0 * 2 + 0, // images |
… | |
… | |
178 | bool ACC (RW, need_delinv0); /* If true, we need to delinv 0 before sending new floorbox */ |
178 | bool ACC (RW, need_delinv0); /* If true, we need to delinv 0 before sending new floorbox */ |
179 | |
179 | |
180 | bool ACC (RW, update_look); /* If true, we need to send the look window */ |
180 | bool ACC (RW, update_look); /* If true, we need to send the look window */ |
181 | bool ACC (RW, update_spells); // If true, we need to esrv_update_spells |
181 | bool ACC (RW, update_spells); // If true, we need to esrv_update_spells |
182 | bool ACC (RW, has_readable_type); /* If true client accept additional text information */ |
182 | bool ACC (RW, has_readable_type); /* If true client accept additional text information */ |
183 | bool ACC (RW, monitor_spells); /* Client wishes to be informed when their spell list changes */ |
183 | uint8 ACC (RW, monitor_spells); /* Client wishes to be informed when their spell list changes */ |
184 | |
184 | |
185 | bool ACC (RW, smoothing); // deliantra-style smoothing |
185 | bool ACC (RW, smoothing); // deliantra-style smoothing |
186 | bool ACC (RW, force_newmap); // force a newmap before next map update |
186 | bool ACC (RW, force_newmap); // force a newmap before next map update |
187 | uint16 ACC (RW, look_position); /* start of drawing of look window */ |
187 | uint16 ACC (RW, look_position); /* start of drawing of look window */ |
188 | uint16 ACC (RW, mss); // likely tcp maximum segment size |
188 | uint16 ACC (RW, mss); // likely tcp maximum segment size |
… | |
… | |
296 | void send (void *buf_, int len); |
296 | void send (void *buf_, int len); |
297 | void send_packet (const_octet_string buf); |
297 | void send_packet (const_octet_string buf); |
298 | void send_packet (const_octet_string buf, int len); |
298 | void send_packet (const_octet_string buf, int len); |
299 | void send_packet_printf (const_utf8_string format, ...) attribute ((format (printf, 2, 3))); |
299 | void send_packet_printf (const_utf8_string format, ...) attribute ((format (printf, 2, 3))); |
300 | void send_packet (packet &sl); |
300 | void send_packet (packet &sl); |
301 | |
|
|
302 | void send_drawinfo (const_utf8_string msg, int flags = NDI_BLACK); |
|
|
303 | |
301 | |
304 | MTH void send_face (faceidx facenum, int pri = 0); |
302 | MTH void send_face (faceidx facenum, int pri = 0); |
305 | MTH void send_faces (object *ob); |
303 | MTH void send_faces (object *ob); |
306 | MTH void send_animation (short anim_num); |
304 | MTH void send_animation (short anim_num); |
307 | void send_msg (int color, const_utf8_string type, const_utf8_string msg); |
305 | void send_msg (int color, const_utf8_string type, const_utf8_string msg); |