mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 12:35:46 +00:00
removes recname type, we use what is already included in ESM types
This commit is contained in:
parent
bff4096652
commit
0d7bd19119
@ -136,17 +136,10 @@ struct StoreIndexToRecordType {
|
|||||||
typedef void recordType;
|
typedef void recordType;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
struct RecordTypeToRecName
|
|
||||||
{
|
|
||||||
static const ESM::RecNameInts sRecName;
|
|
||||||
};
|
|
||||||
|
|
||||||
static int sRecordTypeCounter = 0;
|
static int sRecordTypeCounter = 0;
|
||||||
|
|
||||||
#define OPENMW_ESM_ADD_STORE_TYPE(__Type, __REC_NAME,__ID_NUM) template<> const int MWWorld::SRecordType<__Type>::sStoreIndex = sRecordTypeCounter ++; \
|
#define OPENMW_ESM_ADD_STORE_TYPE(__Type, __REC_NAME,__ID_NUM) template<> const int MWWorld::SRecordType<__Type>::sStoreIndex = sRecordTypeCounter ++; \
|
||||||
template<> struct StoreIndexToRecordType<__ID_NUM > {typedef __Type recordType;}; \
|
template<> struct StoreIndexToRecordType<__ID_NUM > {typedef __Type recordType;}; \
|
||||||
template<> const ESM::RecNameInts RecordTypeToRecName<__Type>::sRecName = __REC_NAME
|
|
||||||
|
|
||||||
OPENMW_ESM_ADD_STORE_TYPE(ESM::Activator,ESM::REC_ACTI,0);
|
OPENMW_ESM_ADD_STORE_TYPE(ESM::Activator,ESM::REC_ACTI,0);
|
||||||
OPENMW_ESM_ADD_STORE_TYPE(ESM::Potion,ESM::REC_ALCH,1);
|
OPENMW_ESM_ADD_STORE_TYPE(ESM::Potion,ESM::REC_ALCH,1);
|
||||||
@ -302,7 +295,7 @@ namespace MWWorld
|
|||||||
{
|
{
|
||||||
int storeIndex = SRecordType<T>::sStoreIndex;
|
int storeIndex = SRecordType<T>::sStoreIndex;
|
||||||
stores.mStores[storeIndex] = std::make_unique<Store<T>>();
|
stores.mStores[storeIndex] = std::make_unique<Store<T>>();
|
||||||
constexpr ESM::RecNameInts recName = RecordTypeToRecName<T>::sRecName;
|
constexpr ESM::RecNameInts recName = T::sRecordId;
|
||||||
if constexpr (recName != ESM::REC_INTERNAL_PLAYER)
|
if constexpr (recName != ESM::REC_INTERNAL_PLAYER)
|
||||||
{
|
{
|
||||||
stores.mStoreImp->mEsm3RecordToStore[recName] = stores.mStores[storeIndex].get();
|
stores.mStoreImp->mEsm3RecordToStore[recName] = stores.mStores[storeIndex].get();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user