--- deliantra/server/include/cfperl.h 2010/04/15 04:02:38 1.122 +++ deliantra/server/include/cfperl.h 2018/12/05 19:13:21 1.133 @@ -1,22 +1,23 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. - * - * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team - * + * + * Copyright (©) 2017,2018 Marc Alexander Lehmann / the Deliantra team + * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team + * * Deliantra is free software: you can redistribute it and/or modify it under * the terms of the Affero 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 Affero GNU General Public License * and the GNU General Public License along with this program. If not, see * . - * + * * The authors can be reached via e-mail to */ @@ -103,6 +104,7 @@ void cfperl_send_msg (client *ns, int color, const_utf8_string type, const_utf8_string msg); int cfperl_can_merge (object *ob1, object *ob2); void cfperl_mapscript_activate (object *ob, int state, object *activator, object *originator = 0); +void cfperl_ix (client *ns, int set, faceidx idx, int pri); bool is_match_expr (const_utf8_string expr); // applies the match expression and returns true if it matches @@ -131,6 +133,8 @@ extern tstamp runtime; // virtual server time, excluding time jumps and lag extern tstamp NOW; // real time of current server tick +ecb_noinline utf8_string cfSvPVutf8_nolen (SV *sv); + enum event_klass { KLASS_NONE, @@ -170,7 +174,7 @@ #define ARG_REGION(o) DT_REGION, (void *)(static_cast (o)) // the ", ## __VA_ARGS" is, unfortunately, a gnu-cpp extension -#define INVOKE(obj,event, ...) (expect_false ((obj)->should_invoke (event)) ? (obj)->invoke (event, ## __VA_ARGS__, DT_END) : 0) +#define INVOKE(obj,event, ...) (ecb_expect_false ((obj)->should_invoke (event)) ? (obj)->invoke (event, ## __VA_ARGS__, DT_END) : 0) #define INVOKE_GLOBAL(event, ...) INVOKE (&gbl_ev, EVENT_ ## GLOBAL ## _ ## event, ## __VA_ARGS__) #define INVOKE_ATTACHABLE(event, obj, ...) INVOKE (obj , EVENT_ ## ATTACHABLE ## _ ## event, ## __VA_ARGS__) #define INVOKE_OBJECT(event, obj, ...) INVOKE (obj , EVENT_ ## OBJECT ## _ ## event, ## __VA_ARGS__) @@ -205,7 +209,7 @@ // object is delete'd after the refcount reaches 0 MTH int refcnt_cnt () const; // check wether the object has died and destroy - MTH void refcnt_chk () { if (expect_false (refcnt <= 0)) do_check (); } + MTH void refcnt_chk () { if (ecb_expect_false (refcnt <= 0)) do_check (); } // destroy the object unless it was already destroyed // this politely asks everybody interested the reduce @@ -264,7 +268,7 @@ return ev_want_event [event] || cb; } - bool invoke (event_type event, ...); + bool invoke (/*event_type*/int event, ...); MTH void instantiate (); void reattach (); @@ -307,7 +311,7 @@ // actually cede's far more often static bool cede_to_tick () { - if (expect_true (!cede_pending)) + if (ecb_expect_true (!cede_pending)) return false; do_cede_to_tick ();