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

Comparing deliantra/server/include/object.h (file contents):
Revision 1.22 by root, Fri Sep 8 17:14:07 2006 UTC vs.
Revision 1.23 by root, Sat Sep 9 21:48:28 2006 UTC

233 MoveType ACC (RW, move_slow); /* Movement types this slows down */ 233 MoveType ACC (RW, move_slow); /* Movement types this slows down */
234 float ACC (RW, move_slow_penalty); /* How much this slows down the object */ 234 float ACC (RW, move_slow_penalty); /* How much this slows down the object */
235 key_value *key_values; /* Fields not explictly known by the loader. */ 235 key_value *key_values; /* Fields not explictly known by the loader. */
236}; 236};
237 237
238#define get_object() object::create ()
239#define free_object(op) (op)->free (0)
240#define free_object2(op, free_inv) (op)->free (free_inv)
241
238struct object : zero_initialised, object_keep, object_copy, object_pod 242struct object : zero_initialised, object_keep, object_copy, object_pod
239{ 243{
244 static object *create ();
245 void free (bool free_inventory = false);
246 void mortalise ();
247
248 static void free_mortals ();
249 static bool can_merge (object *op1, object *op2);
250
251 void clear ();
252 void clone (object *destination);
253
254protected:
255 friend struct archetype;
256
240 object (); 257 object ();
241 ~object (); 258 ~object ();
242
243 static bool can_merge (object * op1, object * op2);
244
245 void clear ();
246 void clone (object * destination);
247}; 259};
248
249#define get_object() (new object) // compatibility, but please keep for a while
250 260
251#define CAN_MERGE(op1,op2) ((op1)->value == (op2)->value && (op1)->name == (op2)->name && object::can_merge ((op1), (op2))) 261#define CAN_MERGE(op1,op2) ((op1)->value == (op2)->value && (op1)->name == (op2)->name && object::can_merge ((op1), (op2)))
252 262
253typedef struct oblnk 263typedef struct oblnk
254{ /* Used to link together several objects */ 264{ /* Used to link together several objects */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines