mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-19 12:40:49 +00:00
Make the sRedcordId constexpr
This commit is contained in:
parent
33c66e3d5e
commit
6c71071083
@ -2,13 +2,10 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
unsigned int DebugProfile::sRecordId = REC_DBGP;
|
||||
|
||||
void DebugProfile::load (ESMReader& esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
class ESMReader;
|
||||
@ -10,7 +12,8 @@ namespace ESM
|
||||
|
||||
struct DebugProfile
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_DBGP;
|
||||
|
||||
|
||||
enum Flags
|
||||
{
|
||||
|
@ -2,13 +2,10 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
unsigned int Filter::sRecordId = REC_FILT;
|
||||
|
||||
void Filter::load (ESMReader& esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define COMPONENTS_ESM_FILTER_H
|
||||
|
||||
#include <string>
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
@ -10,7 +11,8 @@ namespace ESM
|
||||
|
||||
struct Filter
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_FILT;
|
||||
|
||||
|
||||
unsigned int mRecordFlags;
|
||||
std::string mId;
|
||||
|
@ -2,13 +2,10 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
unsigned int GlobalMap::sRecordId = REC_GMAP;
|
||||
|
||||
void GlobalMap::load (ESMReader &esm)
|
||||
{
|
||||
esm.getHNT(mBounds, "BNDS");
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
class ESMReader;
|
||||
@ -14,7 +16,8 @@ namespace ESM
|
||||
///< \brief An image containing the explored areas on the global map.
|
||||
struct GlobalMap
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_GMAP;
|
||||
|
||||
|
||||
// The minimum and maximum cell coordinates
|
||||
struct Bounds
|
||||
|
@ -6,8 +6,6 @@
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Activator::sRecordId = REC_ACTI;
|
||||
|
||||
void Activator::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define OPENMW_ESM_ACTI_H
|
||||
|
||||
#include <string>
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
@ -11,7 +12,8 @@ class ESMWriter;
|
||||
|
||||
struct Activator
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_ACTI;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Activator"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Potion::sRecordId = REC_ALCH;
|
||||
|
||||
void Potion::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "effectlist.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
@ -17,7 +18,8 @@ class ESMWriter;
|
||||
|
||||
struct Potion
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_ALCH;
|
||||
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Potion"; }
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Apparatus::sRecordId = REC_APPA;
|
||||
|
||||
void Apparatus::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -15,7 +17,8 @@ class ESMWriter;
|
||||
|
||||
struct Apparatus
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_APPA;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Apparatus"; }
|
||||
|
||||
|
@ -36,8 +36,6 @@ namespace ESM
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int Armor::sRecordId = REC_ARMO;
|
||||
|
||||
void Armor::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -65,7 +67,8 @@ struct PartReferenceList
|
||||
|
||||
struct Armor
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_ARMO;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Armor"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int BodyPart::sRecordId = REC_BODY;
|
||||
|
||||
void BodyPart::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define OPENMW_ESM_BODY_H
|
||||
|
||||
#include <string>
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
@ -11,7 +12,8 @@ class ESMWriter;
|
||||
|
||||
struct BodyPart
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_BODY;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "BodyPart"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Book::sRecordId = REC_BOOK;
|
||||
|
||||
void Book::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define OPENMW_ESM_BOOK_H
|
||||
|
||||
#include <string>
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
@ -14,7 +15,8 @@ class ESMWriter;
|
||||
|
||||
struct Book
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_BOOK;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Book"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int BirthSign::sRecordId = REC_BSGN;
|
||||
|
||||
void BirthSign::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "spelllist.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
@ -13,7 +14,8 @@ class ESMWriter;
|
||||
|
||||
struct BirthSign
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_BSGN;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "BirthSign"; }
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
#include "cellid.hpp"
|
||||
|
||||
namespace ESM
|
||||
@ -41,8 +40,6 @@ namespace
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Cell::sRecordId = REC_CELL;
|
||||
|
||||
// Some overloaded compare operators.
|
||||
bool operator== (const MovedCellRef& ref, const RefNum& refNum)
|
||||
{
|
||||
|
@ -63,7 +63,8 @@ struct CellRefTrackerPredicate
|
||||
*/
|
||||
struct Cell
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_CELL;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Cell"; }
|
||||
|
||||
|
@ -8,8 +8,6 @@
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Class::sRecordId = REC_CLAS;
|
||||
|
||||
const Class::Specialization Class::sSpecializationIds[3] = {
|
||||
Class::Combat,
|
||||
Class::Magic,
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -17,7 +19,8 @@ class ESMWriter;
|
||||
// class
|
||||
struct Class
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_CLAS;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Class"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Clothing::sRecordId = REC_CLOT;
|
||||
|
||||
void Clothing::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "loadarmo.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
@ -17,7 +18,8 @@ class ESMWriter;
|
||||
|
||||
struct Clothing
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_CLOT;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Clothing"; }
|
||||
|
||||
|
@ -27,8 +27,6 @@ namespace ESM
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int Container::sRecordId = REC_CONT;
|
||||
|
||||
void Container::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "components/esm/esmcommon.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
@ -35,7 +36,8 @@ struct InventoryList
|
||||
|
||||
struct Container
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_CONT;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Container"; }
|
||||
|
||||
|
@ -4,13 +4,10 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
unsigned int Creature::sRecordId = REC_CREA;
|
||||
|
||||
void Creature::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -8,6 +8,8 @@
|
||||
#include "aipackage.hpp"
|
||||
#include "transport.hpp"
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -21,7 +23,8 @@ class ESMWriter;
|
||||
|
||||
struct Creature
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_CREA;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Creature"; }
|
||||
|
||||
|
@ -4,11 +4,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Dialogue::sRecordId = REC_DIAL;
|
||||
|
||||
void Dialogue::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
#include "loadinfo.hpp"
|
||||
|
||||
namespace ESM
|
||||
@ -20,7 +21,7 @@ class ESMWriter;
|
||||
|
||||
struct Dialogue
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_DIAL;
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Dialogue"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Door::sRecordId = REC_DOOR;
|
||||
|
||||
void Door::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -11,7 +13,8 @@ class ESMWriter;
|
||||
|
||||
struct Door
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_DOOR;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Door"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Enchantment::sRecordId = REC_ENCH;
|
||||
|
||||
void Enchantment::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
#include "effectlist.hpp"
|
||||
|
||||
namespace ESM
|
||||
@ -17,7 +18,8 @@ class ESMWriter;
|
||||
|
||||
struct Enchantment
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_ENCH;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Enchantment"; }
|
||||
|
||||
|
@ -4,12 +4,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Faction::sRecordId = REC_FACT;
|
||||
|
||||
int& Faction::FADTstruct::getSkill (int index, bool ignored)
|
||||
{
|
||||
if (index<0 || index>=7)
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -30,7 +32,8 @@ struct RankData
|
||||
|
||||
struct Faction
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_FACT;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Faction"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Global::sRecordId = REC_GLOB;
|
||||
|
||||
void Global::load (ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
#include "variant.hpp"
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -17,7 +19,8 @@ class ESMWriter;
|
||||
|
||||
struct Global
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_GLOB;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Global"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int GameSetting::sRecordId = REC_GMST;
|
||||
|
||||
void GameSetting::load (ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false; // GameSetting record can't be deleted now (may be changed in the future)
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
#include "variant.hpp"
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -18,7 +20,8 @@ class ESMWriter;
|
||||
|
||||
struct GameSetting
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_GMST;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "GameSetting"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int DialInfo::sRecordId = REC_INFO;
|
||||
|
||||
void DialInfo::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
mId = esm.getHNString("INAM");
|
||||
|
@ -20,7 +20,8 @@ class ESMWriter;
|
||||
|
||||
struct DialInfo
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_INFO;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "DialInfo"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Ingredient::sRecordId = REC_INGR;
|
||||
|
||||
void Ingredient::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -15,7 +17,8 @@ class ESMWriter;
|
||||
|
||||
struct Ingredient
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_INGR;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Ingredient"; }
|
||||
|
||||
|
@ -9,8 +9,6 @@
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Land::sRecordId = REC_LAND;
|
||||
|
||||
Land::Land()
|
||||
: mFlags(0)
|
||||
, mX(0)
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include <components/misc/constants.hpp>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
#include "components/esm/esmcommon.hpp"
|
||||
|
||||
namespace ESM
|
||||
@ -19,7 +20,8 @@ class ESMWriter;
|
||||
|
||||
struct Land
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_LAND;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Land"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Light::sRecordId = REC_LIGH;
|
||||
|
||||
void Light::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -16,7 +18,8 @@ class ESMWriter;
|
||||
|
||||
struct Light
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_LIGH;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Light"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Lockpick::sRecordId = REC_LOCK;
|
||||
|
||||
void Lockpick::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -11,7 +13,8 @@ class ESMWriter;
|
||||
|
||||
struct Lockpick
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_LOCK;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Lockpick"; }
|
||||
|
||||
|
@ -6,8 +6,6 @@
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int LandTexture::sRecordId = REC_LTEX;
|
||||
|
||||
void LandTexture::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -18,7 +20,8 @@ class ESMWriter;
|
||||
|
||||
struct LandTexture
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_LTEX;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "LandTexture"; }
|
||||
|
||||
|
@ -187,8 +187,6 @@ namespace
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int MagicEffect::sRecordId = REC_MGEF;
|
||||
|
||||
void MagicEffect::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false; // MagicEffect record can't be deleted now (may be changed in the future)
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include <string_view>
|
||||
#include <map>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -13,7 +15,8 @@ class ESMWriter;
|
||||
|
||||
struct MagicEffect
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_MGEF;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "MagicEffect"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Miscellaneous::sRecordId = REC_MISC;
|
||||
|
||||
void Miscellaneous::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -16,7 +18,8 @@ class ESMWriter;
|
||||
|
||||
struct Miscellaneous
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_MISC;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Miscellaneous"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int NPC::sRecordId = REC_NPC_;
|
||||
|
||||
void NPC::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -23,7 +23,8 @@ class ESMWriter;
|
||||
|
||||
struct NPC
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_NPC_;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "NPC"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Pathgrid::sRecordId = REC_PGRD;
|
||||
|
||||
Pathgrid::Point& Pathgrid::Point::operator=(const float rhs[3])
|
||||
{
|
||||
mX = static_cast<int>(rhs[0]);
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -15,7 +17,8 @@ class ESMWriter;
|
||||
*/
|
||||
struct Pathgrid
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_PGRD;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Pathgrid"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Probe::sRecordId = REC_PROB;
|
||||
|
||||
void Probe::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -11,7 +13,8 @@ class ESMWriter;
|
||||
|
||||
struct Probe
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_PROB;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Probe"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Race::sRecordId = REC_RACE;
|
||||
|
||||
int Race::MaleFemale::getValue (bool male) const
|
||||
{
|
||||
return male ? mMale : mFemale;
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "spelllist.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
@ -17,7 +18,8 @@ class ESMWriter;
|
||||
|
||||
struct Race
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_RACE;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Race"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Region::sRecordId = REC_REGN;
|
||||
|
||||
void Region::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
#include "components/esm/esmcommon.hpp"
|
||||
|
||||
namespace ESM
|
||||
@ -18,7 +19,8 @@ class ESMWriter;
|
||||
|
||||
struct Region
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_REGN;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Region"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Repair::sRecordId = REC_REPA;
|
||||
|
||||
void Repair::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -11,7 +13,8 @@ class ESMWriter;
|
||||
|
||||
struct Repair
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_REPA;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Repair"; }
|
||||
|
||||
|
@ -6,12 +6,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Script::sRecordId = REC_SCPT;
|
||||
|
||||
void Script::loadSCVR(ESMReader &esm)
|
||||
{
|
||||
int s = mData.mStringTableSize;
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
#include "components/esm/esmcommon.hpp"
|
||||
|
||||
namespace ESM
|
||||
@ -19,7 +20,8 @@ class ESMWriter;
|
||||
class Script
|
||||
{
|
||||
public:
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_SCPT;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Script"; }
|
||||
|
||||
|
@ -125,8 +125,6 @@ namespace ESM
|
||||
HandToHand
|
||||
}};
|
||||
|
||||
unsigned int Skill::sRecordId = REC_SKIL;
|
||||
|
||||
void Skill::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false; // Skill record can't be deleted now (may be changed in the future)
|
||||
|
@ -19,7 +19,8 @@ class ESMWriter;
|
||||
|
||||
struct Skill
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
|
||||
constexpr static unsigned int sRecordId = REC_SKIL;
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Skill"; }
|
||||
|
||||
|
@ -6,8 +6,6 @@
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int SoundGenerator::sRecordId = REC_SNDG;
|
||||
|
||||
void SoundGenerator::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -15,7 +17,8 @@ class ESMWriter;
|
||||
|
||||
struct SoundGenerator
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_SNDG;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "SoundGenerator"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Sound::sRecordId = REC_SOUN;
|
||||
|
||||
void Sound::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -16,7 +18,8 @@ struct SOUNstruct
|
||||
|
||||
struct Sound
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_SOUN;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Sound"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Spell::sRecordId = REC_SPEL;
|
||||
|
||||
void Spell::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "effectlist.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
@ -13,7 +14,8 @@ class ESMWriter;
|
||||
|
||||
struct Spell
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_SPEL;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Spell"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int StartScript::sRecordId = REC_SSCR;
|
||||
|
||||
void StartScript::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -19,7 +21,8 @@ class ESMWriter;
|
||||
|
||||
struct StartScript
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_SSCR;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "StartScript"; }
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Static::sRecordId = REC_STAT;
|
||||
|
||||
void Static::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "components/esm/defs.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
@ -23,7 +25,8 @@ class ESMWriter;
|
||||
|
||||
struct Static
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_STAT;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Static"; }
|
||||
|
||||
|
@ -6,8 +6,6 @@
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
unsigned int Weapon::sRecordId = REC_WEAP;
|
||||
|
||||
void Weapon::load(ESMReader &esm, bool &isDeleted)
|
||||
{
|
||||
isDeleted = false;
|
||||
|
@ -17,7 +17,8 @@ class ESMWriter;
|
||||
|
||||
struct Weapon
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_WEAP;
|
||||
|
||||
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
||||
static std::string_view getRecordType() { return "Weapon"; }
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
unsigned int SavedGame::sRecordId = REC_SAVE;
|
||||
int SavedGame::sCurrentFormat = 21;
|
||||
|
||||
void SavedGame::load (ESMReader &esm)
|
||||
|
@ -15,7 +15,7 @@ namespace ESM
|
||||
|
||||
struct SavedGame
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
constexpr static unsigned int sRecordId = REC_SAVE;
|
||||
|
||||
static int sCurrentFormat;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user