mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 16:15:33 +00:00
add mId field to every record indexed by id
This commit is contained in:
parent
2057f5619e
commit
d5628c678f
25 changed files with 37 additions and 20 deletions
|
@ -11,7 +11,7 @@ class ESMWriter;
|
||||||
|
|
||||||
struct Activator
|
struct Activator
|
||||||
{
|
{
|
||||||
std::string mName, mScript, mModel;
|
std::string mId, mName, mScript, mModel;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
void save(ESMWriter &esm);
|
void save(ESMWriter &esm);
|
||||||
|
|
|
@ -32,7 +32,7 @@ struct Apparatus
|
||||||
};
|
};
|
||||||
|
|
||||||
AADTstruct mData;
|
AADTstruct mData;
|
||||||
std::string mModel, mIcon, mScript, mName;
|
std::string mId, mModel, mIcon, mScript, mName;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
void save(ESMWriter &esm);
|
void save(ESMWriter &esm);
|
||||||
|
|
|
@ -84,7 +84,7 @@ struct Armor
|
||||||
AODTstruct mData;
|
AODTstruct mData;
|
||||||
PartReferenceList mParts;
|
PartReferenceList mParts;
|
||||||
|
|
||||||
std::string mName, mModel, mIcon, mScript, mEnchant;
|
std::string mId, mName, mModel, mIcon, mScript, mEnchant;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
void save(ESMWriter &esm);
|
void save(ESMWriter &esm);
|
||||||
|
|
|
@ -52,7 +52,7 @@ struct BodyPart
|
||||||
};
|
};
|
||||||
|
|
||||||
BYDTstruct mData;
|
BYDTstruct mData;
|
||||||
std::string mModel, mName;
|
std::string mId, mModel, mName;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
void save(ESMWriter &esm);
|
void save(ESMWriter &esm);
|
||||||
|
|
|
@ -13,7 +13,7 @@ class ESMWriter;
|
||||||
|
|
||||||
struct BirthSign
|
struct BirthSign
|
||||||
{
|
{
|
||||||
std::string mName, mDescription, mTexture;
|
std::string mId, mName, mDescription, mTexture;
|
||||||
|
|
||||||
// List of powers and abilities that come with this birth sign.
|
// List of powers and abilities that come with this birth sign.
|
||||||
SpellList mPowers;
|
SpellList mPowers;
|
||||||
|
|
|
@ -60,7 +60,7 @@ struct Class
|
||||||
int mCalc;
|
int mCalc;
|
||||||
}; // 60 bytes
|
}; // 60 bytes
|
||||||
|
|
||||||
std::string mName, mDescription;
|
std::string mId, mName, mDescription;
|
||||||
CLDTstruct mData;
|
CLDTstruct mData;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
|
|
|
@ -42,7 +42,7 @@ struct Clothing
|
||||||
|
|
||||||
PartReferenceList mParts;
|
PartReferenceList mParts;
|
||||||
|
|
||||||
std::string mName, mModel, mIcon, mEnchant, mScript;
|
std::string mId, mName, mModel, mIcon, mEnchant, mScript;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
void save(ESMWriter &esm);
|
void save(ESMWriter &esm);
|
||||||
|
|
|
@ -39,7 +39,7 @@ struct Container
|
||||||
Unknown = 8
|
Unknown = 8
|
||||||
};
|
};
|
||||||
|
|
||||||
std::string mName, mModel, mScript;
|
std::string mId, mName, mModel, mScript;
|
||||||
|
|
||||||
float mWeight; // Not sure, might be max total weight allowed?
|
float mWeight; // Not sure, might be max total weight allowed?
|
||||||
int mFlags;
|
int mFlags;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef OPENMW_ESM_CREC_H
|
#ifndef OPENMW_ESM_CREC_H
|
||||||
#define OPENMW_ESM_CREC_H
|
#define OPENMW_ESM_CREC_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
// TODO create implementation files and remove this one
|
// TODO create implementation files and remove this one
|
||||||
#include "esmreader.hpp"
|
#include "esmreader.hpp"
|
||||||
|
|
||||||
|
@ -15,6 +17,8 @@ class ESMWriter;
|
||||||
/// Changes a creature
|
/// Changes a creature
|
||||||
struct LoadCREC
|
struct LoadCREC
|
||||||
{
|
{
|
||||||
|
std::string mId;
|
||||||
|
|
||||||
void load(ESMReader &esm)
|
void load(ESMReader &esm)
|
||||||
{
|
{
|
||||||
esm.skipRecord();
|
esm.skipRecord();
|
||||||
|
@ -28,6 +32,8 @@ struct LoadCREC
|
||||||
/// Changes an item list / container
|
/// Changes an item list / container
|
||||||
struct LoadCNTC
|
struct LoadCNTC
|
||||||
{
|
{
|
||||||
|
std::string mId;
|
||||||
|
|
||||||
void load(ESMReader &esm)
|
void load(ESMReader &esm)
|
||||||
{
|
{
|
||||||
esm.skipRecord();
|
esm.skipRecord();
|
||||||
|
|
|
@ -11,7 +11,7 @@ class ESMWriter;
|
||||||
|
|
||||||
struct Door
|
struct Door
|
||||||
{
|
{
|
||||||
std::string mName, mModel, mScript, mOpenSound, mCloseSound;
|
std::string mId, mName, mModel, mScript, mOpenSound, mCloseSound;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
void save(ESMWriter &esm);
|
void save(ESMWriter &esm);
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef OPENMW_ESM_ENCH_H
|
#ifndef OPENMW_ESM_ENCH_H
|
||||||
#define OPENMW_ESM_ENCH_H
|
#define OPENMW_ESM_ENCH_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "effectlist.hpp"
|
#include "effectlist.hpp"
|
||||||
|
|
||||||
namespace ESM
|
namespace ESM
|
||||||
|
@ -32,6 +34,7 @@ struct Enchantment
|
||||||
// calculate
|
// calculate
|
||||||
};
|
};
|
||||||
|
|
||||||
|
std::string mId;
|
||||||
ENDTstruct mData;
|
ENDTstruct mData;
|
||||||
EffectList mEffects;
|
EffectList mEffects;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef OPENMW_ESM_GLOB_H
|
#ifndef OPENMW_ESM_GLOB_H
|
||||||
#define OPENMW_ESM_GLOB_H
|
#define OPENMW_ESM_GLOB_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "defs.hpp"
|
#include "defs.hpp"
|
||||||
|
|
||||||
namespace ESM
|
namespace ESM
|
||||||
|
@ -15,6 +17,7 @@ class ESMWriter;
|
||||||
|
|
||||||
struct Global
|
struct Global
|
||||||
{
|
{
|
||||||
|
std::string mId;
|
||||||
unsigned mValue;
|
unsigned mValue;
|
||||||
VarType mType;
|
VarType mType;
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ struct LeveledListBase
|
||||||
// list.)
|
// list.)
|
||||||
int mFlags;
|
int mFlags;
|
||||||
unsigned char mChanceNone; // Chance that none are selected (0-255?)
|
unsigned char mChanceNone; // Chance that none are selected (0-255?)
|
||||||
|
std::string mId;
|
||||||
|
|
||||||
// Record name used to read references. Must be set before load() is
|
// Record name used to read references. Must be set before load() is
|
||||||
// called.
|
// called.
|
||||||
|
|
|
@ -41,7 +41,7 @@ struct Light
|
||||||
|
|
||||||
LHDTstruct mData;
|
LHDTstruct mData;
|
||||||
|
|
||||||
std::string mSound, mScript, mModel, mIcon, mName;
|
std::string mSound, mScript, mModel, mIcon, mName, mId;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
void save(ESMWriter &esm);
|
void save(ESMWriter &esm);
|
||||||
|
|
|
@ -36,7 +36,7 @@ struct Tool
|
||||||
|
|
||||||
Data mData;
|
Data mData;
|
||||||
Type mType;
|
Type mType;
|
||||||
std::string mName, mModel, mIcon, mScript;
|
std::string mId, mName, mModel, mIcon, mScript;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
void save(ESMWriter &esm);
|
void save(ESMWriter &esm);
|
||||||
|
|
|
@ -26,7 +26,7 @@ struct Miscellaneous
|
||||||
};
|
};
|
||||||
MCDTstruct mData;
|
MCDTstruct mData;
|
||||||
|
|
||||||
std::string mName, mModel, mIcon, mScript;
|
std::string mId, mName, mModel, mIcon, mScript;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
void save(ESMWriter &esm);
|
void save(ESMWriter &esm);
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef OPENMW_ESM_NPCC_H
|
#ifndef OPENMW_ESM_NPCC_H
|
||||||
#define OPENMW_ESM_NPCC_H
|
#define OPENMW_ESM_NPCC_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
// TODO: create implementation files to remove this
|
// TODO: create implementation files to remove this
|
||||||
#include "esmreader.hpp"
|
#include "esmreader.hpp"
|
||||||
|
|
||||||
|
@ -76,6 +78,8 @@ class ESMWriter;
|
||||||
|
|
||||||
struct LoadNPCC
|
struct LoadNPCC
|
||||||
{
|
{
|
||||||
|
std::string mId;
|
||||||
|
|
||||||
void load(ESMReader &esm)
|
void load(ESMReader &esm)
|
||||||
{
|
{
|
||||||
esm.skipRecord();
|
esm.skipRecord();
|
||||||
|
|
|
@ -64,7 +64,7 @@ struct Race
|
||||||
|
|
||||||
RADTstruct mData;
|
RADTstruct mData;
|
||||||
|
|
||||||
std::string mName, mDescription;
|
std::string mId, mName, mDescription;
|
||||||
SpellList mPowers;
|
SpellList mPowers;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
|
|
|
@ -42,7 +42,7 @@ struct Region
|
||||||
|
|
||||||
// sleepList refers to a eveled list of creatures you can meet if
|
// sleepList refers to a eveled list of creatures you can meet if
|
||||||
// you sleep outside in this region.
|
// you sleep outside in this region.
|
||||||
std::string mName, mSleepList;
|
std::string mId, mName, mSleepList;
|
||||||
|
|
||||||
std::vector<SoundRef> mSoundList;
|
std::vector<SoundRef> mSoundList;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ struct SoundGenerator
|
||||||
// Type
|
// Type
|
||||||
int mType;
|
int mType;
|
||||||
|
|
||||||
std::string mCreature, mSound;
|
std::string mId, mCreature, mSound;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
void save(ESMWriter &esm);
|
void save(ESMWriter &esm);
|
||||||
|
|
|
@ -17,7 +17,7 @@ struct SOUNstruct
|
||||||
struct Sound
|
struct Sound
|
||||||
{
|
{
|
||||||
SOUNstruct mData;
|
SOUNstruct mData;
|
||||||
std::string mSound;
|
std::string mId, mSound;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
void save(ESMWriter &esm);
|
void save(ESMWriter &esm);
|
||||||
|
|
|
@ -38,7 +38,7 @@ struct Spell
|
||||||
};
|
};
|
||||||
|
|
||||||
SPDTstruct mData;
|
SPDTstruct mData;
|
||||||
std::string mName;
|
std::string mId, mName;
|
||||||
EffectList mEffects;
|
EffectList mEffects;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
|
|
|
@ -20,7 +20,7 @@ class ESMWriter;
|
||||||
struct StartScript
|
struct StartScript
|
||||||
{
|
{
|
||||||
std::string mData;
|
std::string mData;
|
||||||
std::string mScript;
|
std::string mId, mScript;
|
||||||
|
|
||||||
// Load a record and add it to the list
|
// Load a record and add it to the list
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
|
|
|
@ -22,7 +22,7 @@ class ESMWriter;
|
||||||
|
|
||||||
struct Static
|
struct Static
|
||||||
{
|
{
|
||||||
std::string mModel;
|
std::string mId, mModel;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
void save(ESMWriter &esm);
|
void save(ESMWriter &esm);
|
||||||
|
|
|
@ -56,7 +56,7 @@ struct Weapon
|
||||||
|
|
||||||
WPDTstruct mData;
|
WPDTstruct mData;
|
||||||
|
|
||||||
std::string mName, mModel, mIcon, mEnchant, mScript;
|
std::string mId, mName, mModel, mIcon, mEnchant, mScript;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
void save(ESMWriter &esm);
|
void save(ESMWriter &esm);
|
||||||
|
|
Loading…
Reference in a new issue