mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-26 05:39:42 +00:00
- Morrowind load over 300,000 references, so even small inefficiencies add up to longer loading times. - std::map is used, but should try others, std::unordered_map or even std::vector
31 lines
671 B
C++
31 lines
671 B
C++
#ifndef CSM_WOLRD_REF_H
|
|
#define CSM_WOLRD_REF_H
|
|
|
|
#include <utility>
|
|
|
|
#include <components/esm/cellref.hpp>
|
|
|
|
namespace CSMWorld
|
|
{
|
|
/// \brief Wrapper for CellRef sub record
|
|
struct CellRef : public ESM::CellRef
|
|
{
|
|
unsigned int mIdNum;
|
|
|
|
std::string mId;
|
|
std::string mCell;
|
|
std::string mOriginalCell;
|
|
|
|
CellRef();
|
|
CellRef(const CellRef&) = default;
|
|
CellRef& operator= (const CellRef&) = default;
|
|
|
|
CellRef (CellRef&& other);
|
|
CellRef& operator= (CellRef&& other);
|
|
|
|
/// Calculate cell index based on coordinates (x and y)
|
|
std::pair<int, int> getCellIndex() const;
|
|
};
|
|
}
|
|
|
|
#endif
|