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.21 by root, Fri Sep 8 16:53:57 2006 UTC vs.
Revision 1.22 by root, Fri Sep 8 17:14:07 2006 UTC

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
238struct object : zero_initialised, object_keep, object_copy, object_pod 238struct object : zero_initialised, object_keep, object_copy, object_pod
239{ 239{
240 object ();
241 ~object ();
242
240 static bool can_merge (object * op1, object * op2); 243 static bool can_merge (object * op1, object * op2);
241 244
242 void clear (); 245 void clear ();
243 void clone (object * destination); 246 void clone (object * destination);
244}; 247};
248
249#define get_object() (new object) // compatibility, but please keep for a while
245 250
246#define CAN_MERGE(op1,op2) ((op1)->value == (op2)->value && (op1)->name == (op2)->name && object::can_merge ((op1), (op2))) 251#define CAN_MERGE(op1,op2) ((op1)->value == (op2)->value && (op1)->name == (op2)->name && object::can_merge ((op1), (op2)))
247 252
248typedef struct oblnk 253typedef struct oblnk
249{ /* Used to link together several objects */ 254{ /* Used to link together several objects */
269 */ 274 */
270 275
271ACC_CLASS(archetype) 276ACC_CLASS(archetype)
272struct archetype : zero_initialised 277struct archetype : zero_initialised
273{ 278{
279 archetype ();
280 ~archetype ();
281
274 shstr ACC (RW, name); /* More definite name, like "generate_kobold" */ 282 shstr ACC (RW, name); /* More definite name, like "generate_kobold" */
275 struct archetype *ACC (RW, next); /* Next archetype in a linked list */ 283 struct archetype *ACC (RW, next); /* Next archetype in a linked list */
276 struct archetype *ACC (RW, head); /* The main part of a linked object */ 284 struct archetype *ACC (RW, head); /* The main part of a linked object */
277 struct archetype *ACC (RW, more); /* Next part of a linked object */ 285 struct archetype *ACC (RW, more); /* Next part of a linked object */
278 object ACC (RO, clone); /* An object from which to do copy_object() */ 286 object ACC (RO, clone); /* An object from which to do copy_object() */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines