mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-19 03:39:58 +00:00
added resources manager
This commit is contained in:
parent
1ce60fa13b
commit
879ab49e9c
@ -24,7 +24,7 @@ opencs_units (model/world
|
|||||||
|
|
||||||
opencs_units_noqt (model/world
|
opencs_units_noqt (model/world
|
||||||
universalid record commands columnbase scriptcontext cell refidcollection
|
universalid record commands columnbase scriptcontext cell refidcollection
|
||||||
refidadapter refiddata refidadapterimp ref collectionbase refcollection columns infocollection tablemimedata cellcoordinates cellselection
|
refidadapter refiddata refidadapterimp ref collectionbase refcollection columns infocollection tablemimedata cellcoordinates cellselection resources resourcesmanager
|
||||||
)
|
)
|
||||||
|
|
||||||
opencs_hdrs_noqt (model/world
|
opencs_hdrs_noqt (model/world
|
||||||
|
@ -35,6 +35,8 @@ CS::Editor::Editor (OgreInit::OgreInit& ogreInit)
|
|||||||
Bsa::registerResources (Files::Collections (config.first, !mFsStrict), config.second, true,
|
Bsa::registerResources (Files::Collections (config.first, !mFsStrict), config.second, true,
|
||||||
mFsStrict);
|
mFsStrict);
|
||||||
|
|
||||||
|
mDocumentManager.listResources();
|
||||||
|
|
||||||
mNewGame.setLocalData (mLocal);
|
mNewGame.setLocalData (mLocal);
|
||||||
mFileDialog.setLocalData (mLocal);
|
mFileDialog.setLocalData (mLocal);
|
||||||
|
|
||||||
|
@ -2205,9 +2205,9 @@ void CSMDoc::Document::createBase()
|
|||||||
CSMDoc::Document::Document (const Files::ConfigurationManager& configuration,
|
CSMDoc::Document::Document (const Files::ConfigurationManager& configuration,
|
||||||
const std::vector< boost::filesystem::path >& files, bool new_,
|
const std::vector< boost::filesystem::path >& files, bool new_,
|
||||||
const boost::filesystem::path& savePath, const boost::filesystem::path& resDir,
|
const boost::filesystem::path& savePath, const boost::filesystem::path& resDir,
|
||||||
ToUTF8::FromType encoding)
|
ToUTF8::FromType encoding, const CSMWorld::ResourcesManager& resourcesManager)
|
||||||
: mSavePath (savePath), mContentFiles (files), mNew (new_), mData (encoding), mTools (mData),
|
: mSavePath (savePath), mContentFiles (files), mNew (new_), mData (encoding, resourcesManager),
|
||||||
mResDir(resDir),
|
mTools (mData), mResDir(resDir),
|
||||||
mProjectPath ((configuration.getUserDataPath() / "projects") /
|
mProjectPath ((configuration.getUserDataPath() / "projects") /
|
||||||
(savePath.filename().string() + ".project")),
|
(savePath.filename().string() + ".project")),
|
||||||
mSaving (*this, mProjectPath, encoding)
|
mSaving (*this, mProjectPath, encoding)
|
||||||
|
@ -31,6 +31,11 @@ namespace Files
|
|||||||
class ConfigurationManager;
|
class ConfigurationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace CSMWorld
|
||||||
|
{
|
||||||
|
class ResourcesManager;
|
||||||
|
}
|
||||||
|
|
||||||
namespace CSMDoc
|
namespace CSMDoc
|
||||||
{
|
{
|
||||||
class Document : public QObject
|
class Document : public QObject
|
||||||
@ -73,7 +78,7 @@ namespace CSMDoc
|
|||||||
Document (const Files::ConfigurationManager& configuration,
|
Document (const Files::ConfigurationManager& configuration,
|
||||||
const std::vector< boost::filesystem::path >& files, bool new_,
|
const std::vector< boost::filesystem::path >& files, bool new_,
|
||||||
const boost::filesystem::path& savePath, const boost::filesystem::path& resDir,
|
const boost::filesystem::path& savePath, const boost::filesystem::path& resDir,
|
||||||
ToUTF8::FromType encoding);
|
ToUTF8::FromType encoding, const CSMWorld::ResourcesManager& resourcesManager);
|
||||||
|
|
||||||
~Document();
|
~Document();
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ CSMDoc::DocumentManager::~DocumentManager()
|
|||||||
void CSMDoc::DocumentManager::addDocument (const std::vector<boost::filesystem::path>& files, const boost::filesystem::path& savePath,
|
void CSMDoc::DocumentManager::addDocument (const std::vector<boost::filesystem::path>& files, const boost::filesystem::path& savePath,
|
||||||
bool new_)
|
bool new_)
|
||||||
{
|
{
|
||||||
Document *document = new Document (mConfiguration, files, new_, savePath, mResDir, mEncoding);
|
Document *document = new Document (mConfiguration, files, new_, savePath, mResDir, mEncoding, mResourcesManager);
|
||||||
|
|
||||||
mDocuments.push_back (document);
|
mDocuments.push_back (document);
|
||||||
|
|
||||||
@ -85,6 +85,11 @@ void CSMDoc::DocumentManager::setEncoding (ToUTF8::FromType encoding)
|
|||||||
mEncoding = encoding;
|
mEncoding = encoding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CSMDoc::DocumentManager::listResources()
|
||||||
|
{
|
||||||
|
mResourcesManager.listResources();
|
||||||
|
}
|
||||||
|
|
||||||
void CSMDoc::DocumentManager::documentLoaded (Document *document)
|
void CSMDoc::DocumentManager::documentLoaded (Document *document)
|
||||||
{
|
{
|
||||||
emit documentAdded (document);
|
emit documentAdded (document);
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
#include <components/to_utf8/to_utf8.hpp>
|
#include <components/to_utf8/to_utf8.hpp>
|
||||||
|
|
||||||
|
#include "../world/resourcesmanager.hpp"
|
||||||
|
|
||||||
#include "loader.hpp"
|
#include "loader.hpp"
|
||||||
|
|
||||||
namespace Files
|
namespace Files
|
||||||
@ -31,6 +33,7 @@ namespace CSMDoc
|
|||||||
QThread mLoaderThread;
|
QThread mLoaderThread;
|
||||||
Loader mLoader;
|
Loader mLoader;
|
||||||
ToUTF8::FromType mEncoding;
|
ToUTF8::FromType mEncoding;
|
||||||
|
CSMWorld::ResourcesManager mResourcesManager;
|
||||||
|
|
||||||
DocumentManager (const DocumentManager&);
|
DocumentManager (const DocumentManager&);
|
||||||
DocumentManager& operator= (const DocumentManager&);
|
DocumentManager& operator= (const DocumentManager&);
|
||||||
@ -50,6 +53,9 @@ namespace CSMDoc
|
|||||||
|
|
||||||
void setEncoding (ToUTF8::FromType encoding);
|
void setEncoding (ToUTF8::FromType encoding);
|
||||||
|
|
||||||
|
/// Ask OGRE for a list of available resources.
|
||||||
|
void listResources();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
boost::filesystem::path mResDir;
|
boost::filesystem::path mResDir;
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "columnimp.hpp"
|
#include "columnimp.hpp"
|
||||||
#include "regionmap.hpp"
|
#include "regionmap.hpp"
|
||||||
#include "columns.hpp"
|
#include "columns.hpp"
|
||||||
|
#include "resourcesmanager.hpp"
|
||||||
|
|
||||||
void CSMWorld::Data::addModel (QAbstractItemModel *model, UniversalId::Type type, bool update)
|
void CSMWorld::Data::addModel (QAbstractItemModel *model, UniversalId::Type type, bool update)
|
||||||
{
|
{
|
||||||
@ -56,8 +57,9 @@ int CSMWorld::Data::count (RecordBase::State state, const CollectionBase& collec
|
|||||||
return number;
|
return number;
|
||||||
}
|
}
|
||||||
|
|
||||||
CSMWorld::Data::Data (ToUTF8::FromType encoding)
|
CSMWorld::Data::Data (ToUTF8::FromType encoding, const ResourcesManager& resourcesManager)
|
||||||
: mEncoder (encoding), mRefs (mCells), mReader (0), mDialogue (0)
|
: mEncoder (encoding), mRefs (mCells), mResourcesManager (resourcesManager), mReader (0),
|
||||||
|
mDialogue (0)
|
||||||
{
|
{
|
||||||
mGlobals.addColumn (new StringIdColumn<ESM::Global>);
|
mGlobals.addColumn (new StringIdColumn<ESM::Global>);
|
||||||
mGlobals.addColumn (new RecordStateColumn<ESM::Global>);
|
mGlobals.addColumn (new RecordStateColumn<ESM::Global>);
|
||||||
@ -498,6 +500,11 @@ CSMWorld::IdCollection<ESM::BodyPart>& CSMWorld::Data::getBodyParts()
|
|||||||
return mBodyParts;
|
return mBodyParts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const CSMWorld::Resources& CSMWorld::Data::getResources (const UniversalId& id) const
|
||||||
|
{
|
||||||
|
return mResourcesManager.get (UniversalId::getParentType (id.getType()));
|
||||||
|
}
|
||||||
|
|
||||||
QAbstractItemModel *CSMWorld::Data::getTableModel (const CSMWorld::UniversalId& id)
|
QAbstractItemModel *CSMWorld::Data::getTableModel (const CSMWorld::UniversalId& id)
|
||||||
{
|
{
|
||||||
std::map<UniversalId::Type, QAbstractItemModel *>::iterator iter = mModelIndex.find (id.getType());
|
std::map<UniversalId::Type, QAbstractItemModel *>::iterator iter = mModelIndex.find (id.getType());
|
||||||
|
@ -47,6 +47,9 @@ namespace ESM
|
|||||||
|
|
||||||
namespace CSMWorld
|
namespace CSMWorld
|
||||||
{
|
{
|
||||||
|
class ResourcesManager;
|
||||||
|
class Resources;
|
||||||
|
|
||||||
class Data : public QObject
|
class Data : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -73,6 +76,7 @@ namespace CSMWorld
|
|||||||
RefIdCollection mReferenceables;
|
RefIdCollection mReferenceables;
|
||||||
RefCollection mRefs;
|
RefCollection mRefs;
|
||||||
IdCollection<CSMFilter::Filter> mFilters;
|
IdCollection<CSMFilter::Filter> mFilters;
|
||||||
|
const ResourcesManager& mResourcesManager;
|
||||||
std::vector<QAbstractItemModel *> mModels;
|
std::vector<QAbstractItemModel *> mModels;
|
||||||
std::map<UniversalId::Type, QAbstractItemModel *> mModelIndex;
|
std::map<UniversalId::Type, QAbstractItemModel *> mModelIndex;
|
||||||
std::string mAuthor;
|
std::string mAuthor;
|
||||||
@ -98,7 +102,7 @@ namespace CSMWorld
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Data (ToUTF8::FromType encoding);
|
Data (ToUTF8::FromType encoding, const ResourcesManager& resourcesManager);
|
||||||
|
|
||||||
virtual ~Data();
|
virtual ~Data();
|
||||||
|
|
||||||
@ -186,6 +190,9 @@ namespace CSMWorld
|
|||||||
|
|
||||||
IdCollection<ESM::BodyPart>& getBodyParts();
|
IdCollection<ESM::BodyPart>& getBodyParts();
|
||||||
|
|
||||||
|
/// Throws an exception, if \a id does not match a resources list.
|
||||||
|
const Resources& getResources (const UniversalId& id) const;
|
||||||
|
|
||||||
QAbstractItemModel *getTableModel (const UniversalId& id);
|
QAbstractItemModel *getTableModel (const UniversalId& id);
|
||||||
///< If no table model is available for \a id, an exception is thrown.
|
///< If no table model is available for \a id, an exception is thrown.
|
||||||
///
|
///
|
||||||
|
78
apps/opencs/model/world/resources.cpp
Normal file
78
apps/opencs/model/world/resources.cpp
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
|
||||||
|
#include "resources.hpp"
|
||||||
|
|
||||||
|
#include <sstream>
|
||||||
|
#include <stdexcept>
|
||||||
|
|
||||||
|
#include <OgreResourceGroupManager.h>
|
||||||
|
|
||||||
|
#include <components/misc/stringops.hpp>
|
||||||
|
|
||||||
|
CSMWorld::Resources::Resources (const std::string& baseDirectory)
|
||||||
|
: mBaseDirectory (baseDirectory)
|
||||||
|
{
|
||||||
|
int baseSize = mBaseDirectory.size();
|
||||||
|
|
||||||
|
Ogre::StringVector resourcesGroups =
|
||||||
|
Ogre::ResourceGroupManager::getSingleton().getResourceGroups();
|
||||||
|
|
||||||
|
for (Ogre::StringVector::iterator iter (resourcesGroups.begin());
|
||||||
|
iter!=resourcesGroups.end(); ++iter)
|
||||||
|
{
|
||||||
|
if (*iter=="General" || *iter=="Internal" || *iter=="Autodetect")
|
||||||
|
continue;
|
||||||
|
|
||||||
|
Ogre::StringVectorPtr resources =
|
||||||
|
Ogre::ResourceGroupManager::getSingleton().listResourceNames (*iter);
|
||||||
|
|
||||||
|
for (Ogre::StringVector::const_iterator iter (resources->begin());
|
||||||
|
iter!=resources->end(); ++iter)
|
||||||
|
{
|
||||||
|
if (static_cast<int> (iter->size())>=baseSize+1 &&
|
||||||
|
iter->substr (0, baseSize)==mBaseDirectory &&
|
||||||
|
((*iter)[baseSize]=='/' || (*iter)[baseSize]=='\\'))
|
||||||
|
{
|
||||||
|
std::string file = iter->substr (baseSize+1);
|
||||||
|
mFiles.push_back (file);
|
||||||
|
mIndex.insert (std::make_pair (file, static_cast<int> (mFiles.size())-1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int CSMWorld::Resources::getSize() const
|
||||||
|
{
|
||||||
|
return mFiles.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string CSMWorld::Resources::getId (int index) const
|
||||||
|
{
|
||||||
|
return mFiles.at (index);
|
||||||
|
}
|
||||||
|
|
||||||
|
int CSMWorld::Resources::getIndex (const std::string& id) const
|
||||||
|
{
|
||||||
|
int index = searchId (id);
|
||||||
|
|
||||||
|
if (index==-1)
|
||||||
|
{
|
||||||
|
std::ostringstream stream;
|
||||||
|
stream << "Invalid resource: " << mBaseDirectory << '/' << id;
|
||||||
|
|
||||||
|
throw std::runtime_error (stream.str().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CSMWorld::Resources::searchId (const std::string& id) const
|
||||||
|
{
|
||||||
|
std::string id2 = Misc::StringUtils::lowerCase (id);
|
||||||
|
|
||||||
|
std::map<std::string, int>::const_iterator iter = mIndex.find (id2);
|
||||||
|
|
||||||
|
if (iter==mIndex.end())
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return iter->second;
|
||||||
|
}
|
30
apps/opencs/model/world/resources.hpp
Normal file
30
apps/opencs/model/world/resources.hpp
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#ifndef CSM_WOLRD_RESOURCES_H
|
||||||
|
#define CSM_WOLRD_RESOURCES_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <map>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
namespace CSMWorld
|
||||||
|
{
|
||||||
|
class Resources
|
||||||
|
{
|
||||||
|
std::map<std::string, int> mIndex;
|
||||||
|
std::vector<std::string> mFiles;
|
||||||
|
std::string mBaseDirectory;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Resources (const std::string& baseDirectory);
|
||||||
|
|
||||||
|
int getSize() const;
|
||||||
|
|
||||||
|
std::string getId (int index) const;
|
||||||
|
|
||||||
|
int getIndex (const std::string& id) const;
|
||||||
|
|
||||||
|
int searchId (const std::string& id) const;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
24
apps/opencs/model/world/resourcesmanager.cpp
Normal file
24
apps/opencs/model/world/resourcesmanager.cpp
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
#include "resourcesmanager.hpp"
|
||||||
|
|
||||||
|
#include <stdexcept>
|
||||||
|
|
||||||
|
void CSMWorld::ResourcesManager::listResources()
|
||||||
|
{
|
||||||
|
mResources.insert (std::make_pair (UniversalId::Type_Mesh, "meshes"));
|
||||||
|
mResources.insert (std::make_pair (UniversalId::Type_Icon, "icons"));
|
||||||
|
mResources.insert (std::make_pair (UniversalId::Type_Music, "music"));
|
||||||
|
mResources.insert (std::make_pair (UniversalId::Type_SoundRes, "sound"));
|
||||||
|
mResources.insert (std::make_pair (UniversalId::Type_Texture, "textures"));
|
||||||
|
mResources.insert (std::make_pair (UniversalId::Type_Video, "videos"));
|
||||||
|
}
|
||||||
|
|
||||||
|
const CSMWorld::Resources& CSMWorld::ResourcesManager::get (UniversalId::Type type) const
|
||||||
|
{
|
||||||
|
std::map<UniversalId::Type, Resources>::const_iterator iter = mResources.find (type);
|
||||||
|
|
||||||
|
if (iter==mResources.end())
|
||||||
|
throw std::logic_error ("Unknown resource type");
|
||||||
|
|
||||||
|
return iter->second;
|
||||||
|
}
|
24
apps/opencs/model/world/resourcesmanager.hpp
Normal file
24
apps/opencs/model/world/resourcesmanager.hpp
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#ifndef CSM_WOLRD_RESOURCESMANAGER_H
|
||||||
|
#define CSM_WOLRD_RESOURCESMANAGER_H
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
#include "universalid.hpp"
|
||||||
|
#include "resources.hpp"
|
||||||
|
|
||||||
|
namespace CSMWorld
|
||||||
|
{
|
||||||
|
class ResourcesManager
|
||||||
|
{
|
||||||
|
std::map<UniversalId::Type, Resources> mResources;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/// Ask OGRE for a list of available resources.
|
||||||
|
void listResources();
|
||||||
|
|
||||||
|
const Resources& get (UniversalId::Type type) const;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -44,6 +44,12 @@ namespace
|
|||||||
{ CSMWorld::UniversalId::Class_NonRecord, CSMWorld::UniversalId::Type_RegionMap,
|
{ CSMWorld::UniversalId::Class_NonRecord, CSMWorld::UniversalId::Type_RegionMap,
|
||||||
"Region Map", 0 },
|
"Region Map", 0 },
|
||||||
{ CSMWorld::UniversalId::Class_RecordList, CSMWorld::UniversalId::Type_Filters, "Filters", 0 },
|
{ CSMWorld::UniversalId::Class_RecordList, CSMWorld::UniversalId::Type_Filters, "Filters", 0 },
|
||||||
|
{ CSMWorld::UniversalId::Class_ResourceList, CSMWorld::UniversalId::Type_Meshes, "Meshes", 0 },
|
||||||
|
{ CSMWorld::UniversalId::Class_ResourceList, CSMWorld::UniversalId::Type_Icons, "Icons", 0 },
|
||||||
|
{ CSMWorld::UniversalId::Class_ResourceList, CSMWorld::UniversalId::Type_Musics, "Musics", 0 },
|
||||||
|
{ CSMWorld::UniversalId::Class_ResourceList, CSMWorld::UniversalId::Type_SoundsRes, "Sounds", 0 },
|
||||||
|
{ CSMWorld::UniversalId::Class_ResourceList, CSMWorld::UniversalId::Type_Textures, "Textures", 0 },
|
||||||
|
{ CSMWorld::UniversalId::Class_ResourceList, CSMWorld::UniversalId::Type_Videos, "Videos", 0 },
|
||||||
|
|
||||||
{ CSMWorld::UniversalId::Class_None, CSMWorld::UniversalId::Type_None, 0, 0 } // end marker
|
{ CSMWorld::UniversalId::Class_None, CSMWorld::UniversalId::Type_None, 0, 0 } // end marker
|
||||||
};
|
};
|
||||||
@ -97,6 +103,12 @@ namespace
|
|||||||
{ CSMWorld::UniversalId::Class_Collection, CSMWorld::UniversalId::Type_Preview, "Preview", 0 },
|
{ CSMWorld::UniversalId::Class_Collection, CSMWorld::UniversalId::Type_Preview, "Preview", 0 },
|
||||||
{ CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Enchantment, "Enchantment", 0 },
|
{ CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Enchantment, "Enchantment", 0 },
|
||||||
{ CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_BodyPart, "Body Part", 0 },
|
{ CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_BodyPart, "Body Part", 0 },
|
||||||
|
{ CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_Mesh, "Mesh", 0 },
|
||||||
|
{ CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_Icon, "Icon", 0 },
|
||||||
|
{ CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_Music, "Music", 0 },
|
||||||
|
{ CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_SoundRes, "Sound", 0 },
|
||||||
|
{ CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_Texture, "Texture", 0 },
|
||||||
|
{ CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_Video, "Video", 0 },
|
||||||
|
|
||||||
{ CSMWorld::UniversalId::Class_None, CSMWorld::UniversalId::Type_None, 0, 0 } // end marker
|
{ CSMWorld::UniversalId::Class_None, CSMWorld::UniversalId::Type_None, 0, 0 } // end marker
|
||||||
};
|
};
|
||||||
@ -331,7 +343,8 @@ CSMWorld::UniversalId::Type CSMWorld::UniversalId::getParentType (Type type)
|
|||||||
if (sIdArg[i].mClass==Class_RefRecord)
|
if (sIdArg[i].mClass==Class_RefRecord)
|
||||||
return Type_Referenceables;
|
return Type_Referenceables;
|
||||||
|
|
||||||
if (sIdArg[i].mClass==Class_SubRecord || sIdArg[i].mClass==Class_Record)
|
if (sIdArg[i].mClass==Class_SubRecord || sIdArg[i].mClass==Class_Record ||
|
||||||
|
sIdArg[i].mClass==Class_Resource)
|
||||||
{
|
{
|
||||||
if (type==Type_Cell_Missing)
|
if (type==Type_Cell_Missing)
|
||||||
return Type_Cells;
|
return Type_Cells;
|
||||||
|
@ -22,7 +22,10 @@ namespace CSMWorld
|
|||||||
Class_RecordList,
|
Class_RecordList,
|
||||||
Class_Collection, // multiple types of records combined
|
Class_Collection, // multiple types of records combined
|
||||||
Class_Transient, // not part of the world data or the project data
|
Class_Transient, // not part of the world data or the project data
|
||||||
Class_NonRecord // record like data that is not part of the world
|
Class_NonRecord, // record like data that is not part of the world
|
||||||
|
Class_Resource, ///< \attention Resource IDs are unique only within the
|
||||||
|
/// respective collection
|
||||||
|
Class_ResourceList
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ArgumentType
|
enum ArgumentType
|
||||||
@ -104,7 +107,19 @@ namespace CSMWorld
|
|||||||
Type_Enchantments,
|
Type_Enchantments,
|
||||||
Type_Enchantment,
|
Type_Enchantment,
|
||||||
Type_BodyParts,
|
Type_BodyParts,
|
||||||
Type_BodyPart
|
Type_BodyPart,
|
||||||
|
Type_Meshes,
|
||||||
|
Type_Mesh,
|
||||||
|
Type_Icons,
|
||||||
|
Type_Icon,
|
||||||
|
Type_Musics,
|
||||||
|
Type_Music,
|
||||||
|
Type_SoundsRes,
|
||||||
|
Type_SoundRes,
|
||||||
|
Type_Textures,
|
||||||
|
Type_Texture,
|
||||||
|
Type_Videos,
|
||||||
|
Type_Video
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { NumberOfTypes = Type_BodyPart+1 };
|
enum { NumberOfTypes = Type_BodyPart+1 };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user