ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/cfperl.h
(Generate patch)

Comparing deliantra/server/include/cfperl.h (file contents):
Revision 1.108 by root, Mon Oct 12 14:00:58 2009 UTC vs.
Revision 1.111 by root, Wed Nov 11 17:41:14 2009 UTC

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 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992,2007 Frank Tore Johansen
7 * 5 *
8 * 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
9 * 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
10 * 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
11 * option) any later version. 9 * option) any later version.
106void cfperl_send_msg (client *ns, int color, const char *type, const char *msg); 104void cfperl_send_msg (client *ns, int color, const char *type, const char *msg);
107int cfperl_can_merge (object *ob1, object *ob2); 105int cfperl_can_merge (object *ob1, object *ob2);
108void cfperl_mapscript_activate (object *ob, int state, object *activator, object *originator = 0); 106void cfperl_mapscript_activate (object *ob, int state, object *activator, object *originator = 0);
109 107
110bool is_match_expr (const char *expr); 108bool is_match_expr (const char *expr);
111/* applies the match expression and returns true if it matches */ 109// applies the match expression and returns true if it matches
112bool match (const char *expr, object *ob, object *self = 0, object *source = 0, object *originator = 0); 110bool match (const char *expr, object *ob, object *self = 0, object *source = 0, object *originator = 0);
111// same as above, but returns the first object found, or 0
112object *match_one (const char *expr, object *ob, object *self = 0, object *source = 0, object *originator = 0);
113 113
114////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 114//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
115 115
116#if IVSIZE >= 8 116#if IVSIZE >= 8
117 typedef IV val64; 117 typedef IV val64;
196 196
197 enum { 197 enum {
198 F_DESTROYED = 0x01, 198 F_DESTROYED = 0x01,
199 F_DEBUG_TRACE = 0x02, 199 F_DEBUG_TRACE = 0x02,
200 }; 200 };
201 uint8 ACC (RW, flags); 201 uint8 ACC (RW, attachable_flags);
202 202
203 static unordered_vector<attachable *> mortals; 203 static unordered_vector<attachable *> mortals;
204 MTH static void check_mortals (); 204 MTH static void check_mortals ();
205 205
206 // object is delete'd after the refcount reaches 0 206 // object is delete'd after the refcount reaches 0
212 // this politely asks everybody interested the reduce 212 // this politely asks everybody interested the reduce
213 // the refcount to 0 as soon as possible. 213 // the refcount to 0 as soon as possible.
214 MTH void destroy (); 214 MTH void destroy ();
215 215
216 // return wether an object was destroyed already 216 // return wether an object was destroyed already
217 MTH bool destroyed () const { return flags & F_DESTROYED; } 217 MTH bool destroyed () const { return attachable_flags & F_DESTROYED; }
218 218
219 virtual void gather_callbacks (AV *&callbacks, event_type event) const; 219 virtual void gather_callbacks (AV *&callbacks, event_type event) const;
220 220
221#if 0 221#if 0
222private: 222private:
230 230
231 void sever_self (); // sever this object from its self, if it has one. 231 void sever_self (); // sever this object from its self, if it has one.
232 void optimise (); // possibly save some memory by destroying unneeded data 232 void optimise (); // possibly save some memory by destroying unneeded data
233 233
234 attachable () 234 attachable ()
235 : flags (0), self (0), cb (0), attach (0) 235 : attachable_flags (0), self (0), cb (0), attach (0)
236 { 236 {
237 } 237 }
238 238
239 attachable (const attachable &src) 239 attachable (const attachable &src)
240 : flags (0), self (0), cb (0), attach (src.attach) 240 : attachable_flags (0), self (0), cb (0), attach (src.attach)
241 { 241 {
242 } 242 }
243 243
244 // set a custom key to the given value, or delete it if value = 0 244 // set a custom key to the given value, or delete it if value = 0
245 void set_key (const char *key, const char *value = 0, bool is_utf8 = 0); 245 void set_key (const char *key, const char *value = 0, bool is_utf8 = 0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines