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.4 by elmex, Sun Aug 13 17:16:02 2006 UTC vs.
Revision 1.6 by root, Sat Aug 26 08:44:06 2006 UTC

1/* 1/*
2 * static char *rcsid_object_h = 2 * static char *rcsid_object_h =
3 * "$Id: object.h,v 1.4 2006/08/13 17:16:02 elmex Exp $"; 3 * "$Id: object.h,v 1.6 2006/08/26 08:44:06 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
26 The authors can be reached via e-mail at crossfire-devel@real-time.com 26 The authors can be reached via e-mail at crossfire-devel@real-time.com
27*/ 27*/
28 28
29#ifndef OBJECT_H 29#ifndef OBJECT_H
30#define OBJECT_H 30#define OBJECT_H
31
32#include "cfperl.h"
31 33
32typedef uint32 tag_t; 34typedef uint32 tag_t;
33#define NUM_BODY_LOCATIONS 12 35#define NUM_BODY_LOCATIONS 12
34#define BODY_ARMS 1 36#define BODY_ARMS 1
35 37
123 125
124 tag_t count; /* Unique object number for this object */ 126 tag_t count; /* Unique object number for this object */
125 uint16 refcount; /* How many objects points to this object */ 127 uint16 refcount; /* How many objects points to this object */
126}; 128};
127 129
128struct object_special { 130struct object_special : extendable<object> {
131 data_type get_dt () const { return DT_OBJECT; }
132
129 /* These get an extra add_refcount(), after having been copied by memcpy(). 133 /* These get an extra add_refcount(), after having been copied by memcpy().
130 * All fields beow this point are automatically copied by memcpy. If 134 * All fields beow this point are automatically copied by memcpy. If
131 * adding something that needs a refcount updated, make sure you modify 135 * adding something that needs a refcount updated, make sure you modify
132 * copy_object to do so. Everything below here also gets cleared 136 * copy_object to do so. Everything below here also gets cleared
133 * by clear_object() 137 * by clear_object()
349#define ARCH_SINGULARITY_LEN 11 353#define ARCH_SINGULARITY_LEN 11
350#define ARCH_DETECT_MAGIC "detect_magic" 354#define ARCH_DETECT_MAGIC "detect_magic"
351#define ARCH_DEPLETION "depletion" 355#define ARCH_DEPLETION "depletion"
352#define ARCH_SYMPTOM "symptom" 356#define ARCH_SYMPTOM "symptom"
353 357
354extern void (*object_free_callback)(object *ob); // called for every object_free
355
356#endif 358#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines