convert line ends
[canaan.git] / prj / cam / src / sim / doorprop.h
blobfdab3e17a3ce69ade67420968074f8b5e2d4247e
1 /*
2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
4 */
6 ///////////////////////////////////////////////////////////////////////////////
7 // $Header: r:/t2repos/thief2/src/sim/doorprop.h,v 1.9 2000/01/29 13:41:01 adurant Exp $
8 //
9 //
11 #pragma once
13 #ifndef __DOORPROP_H
14 #define __DOORPROP_H
16 #include <matrixs.h>
18 #include <property.h>
20 #define ROTATING_DOOR (0)
21 #define TRANSLATING_DOOR (1)
24 EXTERN rot_door_lock;
26 #define ROT_DOOR_LOCK rot_door_lock = TRUE
27 #define ROT_DOOR_UNLOCK rot_door_lock = FALSE
30 #ifdef __cplusplus
32 struct sDoorProp
34 int type;
36 mxs_real closed;
37 mxs_real open;
39 mxs_real base_speed;
41 int axis;
42 int status;
44 BOOL hard_limits;
46 mxs_real sound_blocking;
47 BOOL vision_blocking;
49 mxs_real push_mass;
51 // These are hidden
52 mxs_vector base_closed_location;
53 mxs_vector base_open_location;
55 mxs_vector base_location;
56 mxs_angvec base_angle;
58 mxs_real base;
60 int room1;
61 int room2;
64 struct sRotDoorProp : public sDoorProp
66 BOOL clockwise;
68 mxs_angvec base_closed_facing;
69 mxs_angvec base_open_facing;
72 struct sTransDoorProp : public sDoorProp
76 ////////////////////////////////////////////////////////////////////////////////
79 #undef INTERFACE
80 #define INTERFACE IRotDoorProperty
81 DECLARE_PROPERTY_INTERFACE(IRotDoorProperty)
83 DECLARE_UNKNOWN_PURE();
84 DECLARE_PROPERTY_PURE();
85 DECLARE_PROPERTY_ACCESSORS(sRotDoorProp*);
88 #define PROP_ROTDOOR_NAME "RotDoor"
90 ////////////////////////////////////////////////////////////////////////////////
92 #undef INTERFACE
93 #define INTERFACE ITransDoorProperty
94 DECLARE_PROPERTY_INTERFACE(ITransDoorProperty)
96 DECLARE_UNKNOWN_PURE();
97 DECLARE_PROPERTY_PURE();
98 DECLARE_PROPERTY_ACCESSORS(sTransDoorProp*);
102 #define PROP_TRANSDOOR_NAME "TransDoor"
104 ////////////////////////////////////////////////////////////////////////////////
106 #else
108 typedef struct ITransDoorProperty ITransDoorProperty;
109 typedef struct IRotDoorProperty IRotDoorProperty;
110 typedef struct sDoorProp sDoorProp;
112 #endif
114 EXTERN ITransDoorProperty *TransDoorPropertyInit();
115 EXTERN void TransDoorPropertyTerm();
117 EXTERN IRotDoorProperty *RotDoorPropertyInit();
118 EXTERN void RotDoorPropertyTerm();
120 EXTERN sDoorProp *GetDoorProperty(int o_id);
122 EXTERN IRotDoorProperty *g_pRotDoorProperty;
123 EXTERN ITransDoorProperty *g_pTransDoorProperty;
125 ////////////////////////////////////////////////////////////////////////////////
127 #endif // __DOORPROP_H