convert line ends
[canaan.git] / prj / cam / src / script / objscrt.h
blob1d2c563c803d1ca70d8a9e633e14a1653ea671af
1 /*
2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
4 */
6 // $Header: r:/t2repos/thief2/src/script/objscrt.h,v 1.6 1999/11/02 16:30:28 Justin Exp $
7 #pragma once
8 #ifndef __OBJSCRT_H
9 #define __OBJSCRT_H
11 #include <scrptbas.h>
14 // "object type" can be either a string or an id
16 class object : public cObj
18 public:
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;};
33 #ifndef SCRIPT
35 #include <objremap.h>
37 #define PersistentObject(obj) \
38 do { \
39 Persistent(*(int*)&(obj)); \
40 if (Reading()) \
41 obj = ObjRemapOnLoad(obj); \
42 } while(0)
44 // Convert to ObjID, for use by services
45 // This is obsolete, only there for completeness.
47 #define ScriptObjID(o) ((long)o)
49 #endif // !SCRIPT
52 #endif // __OBJSCRT_H