VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
diGuyCharacterData.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <vlutil/vlString.h>
12 #include <vector>
13 #include <map>
14 #include "vrfutil/vrfutilDefines.h"
16 #include "vrfutil/diGuyAnimation.h"
17 
18 class DtDiGuyAnimation;
21 
24 typedef std::pair<DtString,DtString> AlternateNamesPair;
25 
26 typedef std::vector<AlternateNamesPair> AlternateNamesList;
27 typedef AlternateNamesList::iterator AlternateNamesListIterator;
28 typedef AlternateNamesList::const_iterator const_AlternateNamesListIterator;
29 
30 typedef DtDiGuyIntrinsicAnimationMap* (*DtDiGuyIntrinsicAnimationMapCreatorFcn)();
31 
32 typedef std::vector<DtString> HeadList;
33 typedef std::map<DtString, HeadList> HeadAppearanceMap;
34 typedef HeadAppearanceMap::iterator HeadAppearanceMapIterator;
35 
36 static const int numDiGuyTypeMapFields = 9;
37 
41 {
42 public:
46 
47  void addFieldValue(const DtString &value);
48 
49  std::vector<DtString> FieldVect;
50 };
51 
52 typedef std::map<DtString, DiGuyTypeMapFieldStruct> AppearanceToTypeFieldsMap;
53 
58 {
59 public:
60 
61  typedef std::map<DtString, DtDiGuyAnimationSharedPtr> TaskAnimationMap;
62  typedef TaskAnimationMap::iterator TaskAnimationMapIterator;
63  typedef TaskAnimationMap::const_iterator const_TaskAnimationMapIterator;
64  typedef std::list<DtDiGuyAnimationSharedPtr> UnprocessedAnimationList;
65  typedef UnprocessedAnimationList::iterator UnprocessedAnimationListIterator;
66  typedef UnprocessedAnimationList::const_iterator const_UnprocessedAnimationListIterator;
67 
69 
70  DtDiGuyCharacterData(const DtString& name);
71 
73 
74  virtual ~DtDiGuyCharacterData();
75 
76  DtDiGuyCharacterData& operator=(const DtDiGuyCharacterData& orig);
77 
78  virtual void init();
79 
81 
82  virtual void setCharacterTypeName(const DtString& name);
83  virtual const DtString & characterTypeName() const;
85 
86  virtual void setDeadAnimation(DtDiGuyAnimationSharedPtr deadAnimation);
87  virtual DtDiGuyAnimation * deadAnimation();
88 
90  virtual DtDiGuyAnimation * lookupTaskAnimationByName(const DtString & name);
91 
93  virtual std::vector<DtString> appearances() const;
94 
96  virtual void addAppearance(const DtString & app);
97  virtual bool containsAppearance(const DtString & app);
98 
100  virtual std::vector<DtString> handItems() const;
101 
103  virtual void addHandItem(const DtString & app);
104 
106  virtual std::vector<DtString> heads(const DtString &bodyAppearance) const;
107 
109  virtual void addHead(const DtString &bodyAppearance, const DtString & headAppearance);
110 
112  virtual void addTypeMapField(const DtString &appearanceName, const DtString & fieldValue);
114  virtual const DtString &getTypeMapFieldName(int index);
116  virtual int getTypeMapFieldIndex(const DtString &name);
117 
119  virtual AlternateNamesList * animationNames();
120 
123  void addAnimation(DtDiGuyAnimationSharedPtr animation);
124 
126 
127 
128  virtual TaskAnimationMap * taskableAnimations();
130  virtual AlternateNamesList taskableAnimationNames();
131  virtual void addTaskAnimation(const DtString & name, DtDiGuyAnimationSharedPtr animation);
133 
135 
136  virtual DtDiGuyIntrinsicAnimationMap * intrinsicAnimations();
137  virtual void addIntrinsicAnimation(const DtString & name, DtDiGuyAnimationSharedPtr animation);
139 
140  virtual DtDiGuyAnimation * lookupIntrinsicAnimationByName(const DtString & name);
141 
143  virtual DtDiGuyCharacterData* clone() const;
144 
145  void setAnimationTable(DtDiGuyCharacterAnimationsTable *table);
149  void readInAnimationDataFromTable(const char *actionName, bool isFirstAction);
150 
152  void setPrintInfo(bool set_print);
153  void debugPrint(const char *fmt, ...);
154 
155 public:
162  static void setCreatorFcn(const DtDiGuyIntrinsicAnimationMapCreatorFcn& fcn);
163 
164 protected:
165 
168  virtual void readInAnimationDataFromDiGuyScenario();
169 
170  void setUpTypeFieldToIntMap();
171 
172  static std::map<DtString, int> myTypeFieldNameToIntMap;
173  static std::vector<DtString> myTypeFieldNameVect;
174 
176  std::vector<DtString> myCharacterAppearances;
177  std::map<DtString, DtString> myCharacterAppearancesMap;
178  std::vector<DtString> myCharacterHandItems;
194 
199 
202 
204 
206 };

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)