OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
savedgame.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_ESM_SAVEDGAME_H
2 #define OPENMW_ESM_SAVEDGAME_H
3 
4 #include <vector>
5 #include <string>
6 
7 namespace ESM
8 {
9  class ESMReader;
10  class ESMWriter;
11 
12  // format 0, saved games only
13 
14  struct SavedGame
15  {
16  static unsigned int sRecordId;
17 
18  static int sCurrentFormat;
19 
20  struct TimeStamp
21  {
22  float mGameHour;
23  int mDay;
24  int mMonth;
25  int mYear;
26  };
27 
28  std::vector<std::string> mContentFiles;
29  std::string mPlayerName;
31 
32  // ID of class
33  std::string mPlayerClassId;
34  // Name of the class. When using a custom class, the ID is not really meaningful prior
35  // to loading the savegame, so the name is stored separately.
36  std::string mPlayerClassName;
37 
38  std::string mPlayerCell;
40  double mTimePlayed;
41  std::string mDescription;
42  std::vector<char> mScreenshot; // raw jpg-encoded data
43 
44  void load (ESMReader &esm);
45  void save (ESMWriter &esm) const;
46  };
47 }
48 
49 #endif
std::string mPlayerClassId
Definition: savedgame.hpp:33
static unsigned int sRecordId
Definition: savedgame.hpp:16
Definition: esmreader.hpp:21
std::string mPlayerCell
Definition: savedgame.hpp:38
void save(ESMWriter &esm) const
Definition: savedgame.cpp:32
Definition: savedgame.hpp:14
int mDay
Definition: savedgame.hpp:23
std::vector< std::string > mContentFiles
Definition: savedgame.hpp:28
Definition: esmwriter.hpp:17
void load(ESMReader &esm)
Definition: savedgame.cpp:10
double mTimePlayed
Definition: savedgame.hpp:40
TimeStamp mInGameTime
Definition: savedgame.hpp:39
int mPlayerLevel
Definition: savedgame.hpp:30
int mMonth
Definition: savedgame.hpp:24
Definition: savedgame.hpp:20
std::string mPlayerClassName
Definition: savedgame.hpp:36
std::string mDescription
Definition: savedgame.hpp:41
float mGameHour
Definition: savedgame.hpp:22
std::vector< char > mScreenshot
Definition: savedgame.hpp:42
static int sCurrentFormat
Definition: savedgame.hpp:18
std::string mPlayerName
Definition: savedgame.hpp:29
int mYear
Definition: savedgame.hpp:25