2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
6 // $Header: r:/t2repos/thief2/src/script/objscrt.h,v 1.6 1999/11/02 16:30:28 Justin Exp $
14 // "object type" can be either a string or an id
16 class object
: public cObj
19 object(int i
= 0) { id
= i
; };
20 object(const char* name
);
21 object(cMultiParm
&parm
) { id
= cObj(parm
).Get(); };
23 operator long() const { return id
;};
24 operator int() const { return id
;};
25 operator string() const { return string(id
); };
27 operator ==(const object
& o
) { return id
== o
.id
;};
28 operator ==(long o
) { return id
== o
;};
29 operator !=(const object
& o
) { return id
!= o
.id
;};
37 #define PersistentObject(obj) \
39 Persistent(*(int*)&(obj)); \
41 obj = ObjRemapOnLoad(obj); \
44 // Convert to ObjID, for use by services
45 // This is obsolete, only there for completeness.
47 #define ScriptObjID(o) ((long)o)