OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
objectstate.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_ESM_OBJECTSTATE_H
2 #define OPENMW_ESM_OBJECTSTATE_H
3 
4 #include <string>
5 #include <vector>
6 
7 #include "cellref.hpp"
8 #include "locals.hpp"
9 #include "animationstate.hpp"
10 
11 namespace ESM
12 {
13  class ESMReader;
14  class ESMWriter;
15 
16  // format 0, saved games only
17 
19  struct ObjectState
20  {
22 
23  unsigned char mHasLocals;
25  unsigned char mEnabled;
26  int mCount;
28  unsigned int mFlags;
29 
30  // Is there any class-specific state following the ObjectState
32 
33  unsigned int mVersion;
34 
36 
38  {}
39 
41  virtual void load (ESMReader &esm);
42 
43  virtual void save (ESMWriter &esm, bool inInventory = false) const;
44 
46  void blank();
47 
48  virtual ~ObjectState();
49  };
50 }
51 
52 #endif
bool mHasCustomState
Definition: objectstate.hpp:31
virtual void load(ESMReader &esm)
Definition: objectstate.cpp:6
unsigned char mHasLocals
Definition: objectstate.hpp:23
Definition: esmreader.hpp:21
unsigned char mEnabled
Definition: objectstate.hpp:25
Definition: animationstate.hpp:14
ObjectState()
Definition: objectstate.hpp:37
Definition: esmwriter.hpp:17
unsigned int mVersion
Definition: objectstate.hpp:33
<
Definition: objectstate.hpp:19
ESM::Position mPosition
Definition: objectstate.hpp:27
Definition: cellref.hpp:34
virtual void save(ESMWriter &esm, bool inInventory=false) const
Definition: objectstate.cpp:44
unsigned int mFlags
Definition: objectstate.hpp:28
virtual ~ObjectState()
Definition: objectstate.cpp:87
Definition: defs.hpp:38
Storage structure for local variables (only used in saved games)
Definition: locals.hpp:18
CellRef mRef
Definition: objectstate.hpp:21
ESM::AnimationState mAnimationState
Definition: objectstate.hpp:35
int mCount
Definition: objectstate.hpp:26
Locals mLocals
Definition: objectstate.hpp:24
void blank()
Initialize to default state.
Definition: objectstate.cpp:72