mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 21:45:32 +00:00
consolidated the debug profile flags into a single and added a global flag
This commit is contained in:
parent
775e24d2c0
commit
3486da0fb0
2 changed files with 11 additions and 27 deletions
|
@ -11,40 +11,19 @@ void ESM::DebugProfile::load (ESMReader& esm)
|
|||
{
|
||||
mDescription = esm.getHNString ("DESC");
|
||||
mScript = esm.getHNString ("SCRP");
|
||||
|
||||
int default_ = 0;
|
||||
esm.getHNOT (default_, "DEFA");
|
||||
|
||||
mDefault = default_!=0;
|
||||
|
||||
int bypass = 0;
|
||||
esm.getHNOT (bypass, "BYNG");
|
||||
|
||||
mBypassNewGame = bypass!=0;
|
||||
esm.getHNT (mFlags, "FLAG");
|
||||
}
|
||||
|
||||
void ESM::DebugProfile::save (ESMWriter& esm) const
|
||||
{
|
||||
esm.writeHNCString ("DESC", mDescription);
|
||||
esm.writeHNCString ("SCRP", mScript);
|
||||
|
||||
if (mDefault)
|
||||
{
|
||||
int default_ = 1;
|
||||
esm.writeHNT ("DEFA", default_);
|
||||
}
|
||||
|
||||
if (mBypassNewGame)
|
||||
{
|
||||
int bypass = 1;
|
||||
esm.writeHNT ("BYNG", bypass);
|
||||
}
|
||||
esm.writeHNT ("FLAG", mFlags);
|
||||
}
|
||||
|
||||
void ESM::DebugProfile::blank()
|
||||
{
|
||||
mDescription.clear();
|
||||
mScript.clear();
|
||||
mDefault = false;
|
||||
mBypassNewGame = false;
|
||||
mFlags = 0;
|
||||
}
|
||||
|
|
|
@ -12,15 +12,20 @@ namespace ESM
|
|||
{
|
||||
static unsigned int sRecordId;
|
||||
|
||||
enum Flags
|
||||
{
|
||||
Flag_Default = 1, // add to newly opened scene subviews
|
||||
Flag_BypassNewGame = 2, // bypass regular game startup
|
||||
Flag_Global = 4 // make available from main menu (i.e. not location specific)
|
||||
};
|
||||
|
||||
std::string mId;
|
||||
|
||||
std::string mDescription;
|
||||
|
||||
std::string mScript;
|
||||
|
||||
bool mDefault;
|
||||
|
||||
bool mBypassNewGame;
|
||||
unsigned int mFlags;
|
||||
|
||||
void load (ESMReader& esm);
|
||||
void save (ESMWriter& esm) const;
|
||||
|
|
Loading…
Reference in a new issue