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 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * the terms of the Affero GNU General Public License as published by the |
9 | * the terms of the Affero GNU General Public License as published by the |
… | |
… | |
72 | |
72 | |
73 | /* not really the player, but tied pretty closely */ |
73 | /* not really the player, but tied pretty closely */ |
74 | INTERFACE_CLASS (partylist) |
74 | INTERFACE_CLASS (partylist) |
75 | struct partylist |
75 | struct partylist |
76 | { |
76 | { |
77 | char *ACC (RW, partyleader); |
77 | utf8_string ACC (RW, partyleader); |
78 | char ACC (RW, passwd)[9]; |
78 | char ACC (RW, passwd)[9]; |
79 | partylist *ACC (RW, next); |
79 | partylist *ACC (RW, next); |
80 | char *ACC (RW, partyname); |
80 | utf8_string ACC (RW, partyname); |
81 | |
81 | |
82 | struct party_kill |
82 | struct party_kill |
83 | { |
83 | { |
84 | char killer[MAX_NAME + 1], dead[MAX_NAME + 1]; |
84 | char killer[MAX_NAME + 1], dead[MAX_NAME + 1]; |
85 | sint64 exp; |
85 | sint64 exp; |
… | |
… | |
223 | |
223 | |
224 | MTH void link_skills (); |
224 | MTH void link_skills (); |
225 | MTH object *find_skill (shstr_cmp name) const; |
225 | MTH object *find_skill (shstr_cmp name) const; |
226 | |
226 | |
227 | bool save_pl (object_freezer &freezer); |
227 | bool save_pl (object_freezer &freezer); |
228 | MTH bool save_pl (const char *path); |
228 | MTH bool save_pl (const_utf8_string path); |
229 | |
229 | |
230 | void do_destroy (); |
230 | void do_destroy (); |
231 | void gather_callbacks (AV *&callbacks, event_type event) const; |
231 | void gather_callbacks (AV *&callbacks, event_type event) const; |
232 | |
232 | |
233 | MTH dynbuf_text *expand_cfpod (const char *cfpod) const; |
233 | MTH dynbuf_text *expand_cfpod (const_utf8_string cfpod) const; |
234 | |
234 | |
235 | MTH void touch () { dirty = true; } // need to touch when logged out and changed |
235 | MTH void touch () { dirty = true; } // need to touch when logged out and changed |
236 | |
236 | |
237 | MTH void play_sound (faceidx sound, int dx = 0, int dy = 0) const |
237 | MTH void play_sound (faceidx sound, int dx = 0, int dy = 0) const |
238 | { |
238 | { |
… | |
… | |
254 | MTH void chargen_race_next (); |
254 | MTH void chargen_race_next (); |
255 | |
255 | |
256 | MTH void set_observe (object_ornull *ob); |
256 | MTH void set_observe (object_ornull *ob); |
257 | MTH void set_viewpoint (object_ornull *ob); |
257 | MTH void set_viewpoint (object_ornull *ob); |
258 | |
258 | |
259 | void send_msg (int color, const char *type, const char *msg) |
259 | void send_msg (int color, const_utf8_string type, const_utf8_string msg) |
260 | { |
260 | { |
261 | ns->send_msg (color, type, msg); |
261 | ns->send_msg (color, type, msg); |
262 | } |
262 | } |
263 | |
263 | |
264 | // a prominent box that can easily be escaped away or so |
264 | // a prominent box that can easily be escaped away or so |
265 | // should be used for informative output such as who, maps etc. |
265 | // should be used for informative output such as who, maps etc. |
266 | // will stay on-screen |
266 | // will stay on-screen |
267 | MTH void infobox (const char *title, const char *msg, int color = NDI_BLACK); |
267 | MTH void infobox (const_utf8_string title, const_utf8_string msg, int color = NDI_BLACK); |
268 | |
268 | |
269 | // a prominent msg that signifies some important event, |
269 | // a prominent msg that signifies some important event, |
270 | // an improvement potion effect potion. should not be long. |
270 | // an improvement potion effect potion. should not be long. |
271 | // might time out after a while |
271 | // might time out after a while |
272 | MTH void statusmsg (const char *msg, int color = NDI_BLACK); |
272 | MTH void statusmsg (const_utf8_string msg, int color = NDI_BLACK); |
273 | |
273 | |
274 | // a prominent box that signifies some error such as a failed |
274 | // a prominent box that signifies some error such as a failed |
275 | // improvement potion. should not be long. |
275 | // improvement potion. should not be long. |
276 | MTH void failmsg (const char *msg, int color = NDI_RED); |
276 | MTH void failmsg (const_utf8_string msg, int color = NDI_RED); |
277 | |
277 | |
278 | MTH void update_spells () const |
278 | MTH void update_spells () const |
279 | { |
279 | { |
280 | if (ns) |
280 | if (ns) |
281 | ns->update_spells = true; |
281 | ns->update_spells = true; |
… | |
… | |
299 | #define for_all_players_on_map(var,mapp) \ |
299 | #define for_all_players_on_map(var,mapp) \ |
300 | for_all_players(var) \ |
300 | for_all_players(var) \ |
301 | if ((var)->ob->map == (mapp)) |
301 | if ((var)->ob->map == (mapp)) |
302 | |
302 | |
303 | inline void |
303 | inline void |
304 | object::statusmsg (const char *msg, int color) |
304 | object::statusmsg (const_utf8_string msg, int color) |
305 | { |
305 | { |
306 | if (expect_true (contr)) contr->statusmsg (msg, color); |
306 | if (expect_true (contr)) contr->statusmsg (msg, color); |
307 | } |
307 | } |
308 | |
308 | |
309 | inline void |
309 | inline void |
310 | object::failmsg (const char *msg, int color) |
310 | object::failmsg (const_utf8_string msg, int color) |
311 | { |
311 | { |
312 | if (expect_true (contr)) contr->failmsg (msg, color); |
312 | if (expect_true (contr)) contr->failmsg (msg, color); |
313 | } |
313 | } |
314 | |
314 | |
315 | #endif |
315 | #endif |
|
|
316 | |