2013-06-08 10:45:13 +00:00
|
|
|
|
|
|
|
#include "ref.hpp"
|
2014-05-27 10:39:26 +00:00
|
|
|
|
2015-01-09 11:05:16 +00:00
|
|
|
#include <cmath>
|
|
|
|
|
2014-05-27 10:39:26 +00:00
|
|
|
CSMWorld::CellRef::CellRef()
|
|
|
|
{
|
|
|
|
mRefNum.mIndex = 0;
|
2014-09-18 10:25:17 +00:00
|
|
|
mRefNum.mContentFile = 0;
|
2015-01-09 11:05:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
std::pair<int, int> CSMWorld::CellRef::getCellIndex() const
|
|
|
|
{
|
|
|
|
const int cellSize = 8192;
|
|
|
|
|
|
|
|
return std::make_pair (
|
|
|
|
std::floor (mPos.pos[0]/cellSize), std::floor (mPos.pos[1]/cellSize));
|
2015-04-24 20:52:53 +00:00
|
|
|
}
|