2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
6 // $Header: r:/t2repos/thief2/src/shock/shkganpr.cpp,v 1.3 1998/07/19 16:12:53 JON Exp $
17 // Must be last header
20 // Base gun description
21 // the all new improved property system...
23 class cGunAnimDataOps
: public cClassDataOps
<sGunAnim
>
28 class cGunAnimStore
: public cHashPropertyStore
<cGunAnimDataOps
>
32 // property implementation class
33 class cGunAnimProperty
: public cSpecificProperty
<IGunAnimProperty
, &IID_IGunAnimProperty
, sGunAnim
*, cGunAnimStore
>
35 typedef cSpecificProperty
<IGunAnimProperty
, &IID_IGunAnimProperty
, sGunAnim
*, cGunAnimStore
> cParent
;
38 cGunAnimProperty(const sPropertyDesc
* desc
)
43 STANDARD_DESCRIBE_TYPE(sGunAnim
);
47 static char *flagBits
[] =
52 static sFieldDesc GunAnimFields
[] =
54 {"Flags", kFieldTypeBits
, FieldLocation(sGunAnim
, m_jointAnim
.m_params
.m_flags
), kFieldFlagNone
, 0, 1, 1, flagBits
,},
55 {"Joint Num", kFieldTypeInt
, FieldLocation(sGunAnim
, m_jointAnim
.m_num
),},
56 {"Rate 1", kFieldTypeFloat
, FieldLocation(sGunAnim
, m_jointAnim
.m_params
.m_rate1
),},
57 {"Rate 2", kFieldTypeFloat
, FieldLocation(sGunAnim
, m_jointAnim
.m_params
.m_rate2
),},
58 {"Target 1", kFieldTypeFloat
, FieldLocation(sGunAnim
, m_jointAnim
.m_params
.m_target1
),},
59 {"Target 2", kFieldTypeFloat
, FieldLocation(sGunAnim
, m_jointAnim
.m_params
.m_target2
),},
62 static sStructDesc GunAnimStructDesc
=
63 StructDescBuild(sGunAnim
, kStructFlagNone
, GunAnimFields
);
65 IGunAnimProperty
*CreateGunAnimProperty(sPropertyDesc
*desc
, ePropertyImpl impl
)
67 StructDescRegister(&GunAnimStructDesc
);
68 return new cGunAnimProperty(desc
);
71 static sPropertyDesc gunAnimPostDesc
=
73 PROP_GUN_ANIM_POST_NAME
,
78 {"Gun", "Gun Anim Post"},
81 static sPropertyDesc gunAnimPreDesc
=
83 PROP_GUN_ANIM_PRE_NAME
,
88 {"Gun", "Gun Anim Pre"},
91 IGunAnimProperty
*g_gunAnimPreProperty
;
92 IGunAnimProperty
*g_gunAnimPostProperty
;
94 void GunAnimPropertyInit()
96 g_gunAnimPreProperty
= CreateGunAnimProperty(&gunAnimPreDesc
, kPropertyImplSparse
);
97 g_gunAnimPostProperty
= CreateGunAnimProperty(&gunAnimPostDesc
, kPropertyImplSparse
);
100 void GunAnimPropertyTerm(void)
102 SafeRelease(g_gunAnimPreProperty
);
103 SafeRelease(g_gunAnimPostProperty
);