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