afxAnimClip.h

Engine/source/afx/ce/afxAnimClip.h

More...

Classes:

Detailed Description

 1
 2
 3//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
 4// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames
 5// Copyright (C) 2015 Faust Logic, Inc.
 6//
 7// Permission is hereby granted, free of charge, to any person obtaining a copy
 8// of this software and associated documentation files (the "Software"), to
 9// deal in the Software without restriction, including without limitation the
10// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
11// sell copies of the Software, and to permit persons to whom the Software is
12// furnished to do so, subject to the following conditions:
13//
14// The above copyright notice and this permission notice shall be included in
15// all copies or substantial portions of the Software.
16//
17// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
23// IN THE SOFTWARE.
24//
25//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
26
27#ifndef _AFX_ANIM_CLIP_H_
28#define _AFX_ANIM_CLIP_H_
29
30class afxAnimClipData : public GameBaseData
31{
32  typedef GameBaseData  Parent;
33
34  enum 
35  {
36    IGNORE_DISABLED     = BIT(0),
37    IGNORE_ENABLED      = BIT(1),
38    IS_DEATH_ANIM       = BIT(2),
39    BLOCK_USER_CONTROL  = BIT(3),
40    IGNORE_FIRST_PERSON = BIT(4),
41    IGNORE_THIRD_PERSON = BIT(5)
42  };
43
44public:
45  StringTableEntry      clip_name;
46  F32                   rate;
47  F32                   pos_offset;
48  F32                   trans;
49  U8                    flags;
50
51  bool                  ignore_disabled;
52  bool                  ignore_enabled;
53  bool                  is_death_anim;
54  bool                  lock_anim;
55  bool                  ignore_first_person;
56  bool                  ignore_third_person;
57
58  void                  expand_flags();
59  void                  merge_flags();
60
61public:
62  /*C*/                 afxAnimClipData();
63  /*C*/                 afxAnimClipData(const afxAnimClipData&, bool = false);
64
65  virtual bool          onAdd();
66  virtual void          packData(BitStream*);
67  virtual void          unpackData(BitStream*);
68  virtual bool          writeField(StringTableEntry fieldname, const char* value);
69
70  virtual void          onStaticModified(const char* slotName, const char* newValue = NULL);
71
72  virtual bool          allowSubstitutions() const { return true; }
73
74  static void           initPersistFields();
75
76  DECLARE_CONOBJECT(afxAnimClipData);
77  DECLARE_CATEGORY("AFX");
78};
79
80//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
81
82#endif // _AFX_ANIM_CLIP_H_
83