OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
importercontext.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_ESSIMPORT_CONTEXT_H
2 #define OPENMW_ESSIMPORT_CONTEXT_H
3 
4 #include <map>
5 
13 
14 #include "importnpcc.hpp"
15 #include "importcrec.hpp"
16 #include "importcntc.hpp"
17 #include "importplayer.hpp"
18 
19 
20 
21 
22 namespace ESSImport
23 {
24 
25  struct Context
26  {
27  // set from the TES3 header
28  std::string mPlayerCellName;
29 
33 
35 
37 
38  // cells which should show an explored overlay on the global map
39  std::set<std::pair<int, int> > mExploredCells;
40 
42 
43  int mDay, mMonth, mYear;
44  float mHour;
45 
46  // key <refIndex, refId>
47  std::map<std::pair<int, std::string>, CREC> mCreatureChanges;
48  std::map<std::pair<int, std::string>, NPCC> mNpcChanges;
49  std::map<std::pair<int, std::string>, CNTC> mContainerChanges;
50 
51  std::map<std::string, ESM::Creature> mCreatures;
52  std::map<std::string, ESM::NPC> mNpcs;
53 
55  : mDay(0)
56  , mMonth(0)
57  , mYear(0)
58  , mHour(0.f)
59  {
60  mPlayer.mAutoMove = 0;
61  ESM::CellId playerCellId;
62  playerCellId.mPaged = true;
63  playerCellId.mIndex.mX = playerCellId.mIndex.mY = 0;
64  mPlayer.mCellId = playerCellId;
68  = 0.0f;
69  mPlayer.mHasMark = 0;
70  mPlayer.mCurrentCrimeId = 0; // TODO
72  mPlayer.mObject.mEnabled = true;
73  mPlayer.mObject.mRef.mRefID = "player"; // REFR.mRefID would be PlayerSaveGame
74 
79  }
80  };
81 
82 }
83 
84 #endif
int mMaxY
Definition: globalmap.hpp:22
bool mPaged
Definition: cellid.hpp:21
int mMonth
Definition: importercontext.hpp:43
ESM::GlobalMap mGlobalMapState
Definition: importercontext.hpp:41
Definition: dialoguestate.hpp:15
CellId mCellId
Definition: player.hpp:23
Definition: importercontext.hpp:25
int mMinX
Definition: globalmap.hpp:22
std::map< std::pair< int, std::string >, CREC > mCreatureChanges
Definition: importercontext.hpp:47
int mDay
Definition: importercontext.hpp:43
ESM::NPC mPlayerBase
Definition: importercontext.hpp:31
unsigned char mEnabled
Definition: objectstate.hpp:25
NpcState mObject
Definition: player.hpp:22
int mX
Definition: cellid.hpp:15
Definition: importnpcc.hpp:18
int mMinY
Definition: globalmap.hpp:22
std::map< std::string, ESM::NPC > mNpcs
Definition: importercontext.hpp:52
int mY
Definition: cellid.hpp:16
Definition: loadnpc.hpp:23
float mLastKnownExteriorPosition[3]
Definition: player.hpp:24
Creature changes.
Definition: importcrec.hpp:16
unsigned char mHasMark
Definition: player.hpp:25
int mYear
Definition: importercontext.hpp:43
Context()
Definition: importercontext.hpp:54
ESM::ControlsState mControlsState
Definition: importercontext.hpp:36
int mCurrentCrimeId
Definition: player.hpp:31
<
Definition: globalmap.hpp:15
unsigned char mAutoMove
Definition: player.hpp:28
ESM::Player mPlayer
Definition: importercontext.hpp:30
CellRef mRef
Definition: objectstate.hpp:21
ESM::DialogueState mDialogueState
Definition: importercontext.hpp:34
std::map< std::pair< int, std::string >, CNTC > mContainerChanges
Definition: importercontext.hpp:49
CellIndex mIndex
Definition: cellid.hpp:20
Definition: player.hpp:20
Bounds mBounds
Definition: globalmap.hpp:25
void blank()
Initialize to default state.
Definition: npcstate.cpp:31
int mMaxX
Definition: globalmap.hpp:22
std::set< std::pair< int, int > > mExploredCells
Definition: importercontext.hpp:39
std::string mPlayerCellName
Definition: importercontext.hpp:28
std::map< std::string, ESM::Creature > mCreatures
Definition: importercontext.hpp:51
Definition: cellid.hpp:11
std::string mRefID
Definition: cellref.hpp:41
std::string mCustomPlayerClassName
Definition: importercontext.hpp:32
Definition: controlsstate.hpp:11
std::map< std::pair< int, std::string >, NPCC > mNpcChanges
Definition: importercontext.hpp:48
Changed container contents.
Definition: importcntc.hpp:15
float mHour
Definition: importercontext.hpp:44