2023-01-27 00:13:17 +00:00
|
|
|
#ifndef OPENW_MWORLD_CELL
|
|
|
|
#define OPENW_MWORLD_CELL
|
|
|
|
|
2023-01-28 11:07:47 +00:00
|
|
|
#include <osg/Vec2i>
|
|
|
|
|
2023-01-27 17:40:15 +00:00
|
|
|
#include <components/esm/esmbridge.hpp>
|
2023-01-27 00:13:17 +00:00
|
|
|
#include <components/esm/refid.hpp>
|
2023-05-12 20:54:52 +00:00
|
|
|
#include <components/esm/util.hpp>
|
2023-01-27 00:13:17 +00:00
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
struct Cell;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace ESM4
|
|
|
|
{
|
|
|
|
struct Cell;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
{
|
2023-01-27 14:29:05 +00:00
|
|
|
class CellStore;
|
|
|
|
|
2023-01-28 18:45:27 +00:00
|
|
|
class Cell : public ESM::CellVariant
|
2023-01-27 00:13:17 +00:00
|
|
|
{
|
|
|
|
struct MoodData
|
|
|
|
{
|
|
|
|
uint32_t mAmbiantColor;
|
|
|
|
uint32_t mDirectionalColor;
|
|
|
|
uint32_t mFogColor;
|
|
|
|
float mFogDensity;
|
|
|
|
};
|
|
|
|
|
|
|
|
public:
|
2023-01-27 13:07:50 +00:00
|
|
|
explicit Cell(const ESM4::Cell& cell);
|
|
|
|
explicit Cell(const ESM::Cell& cell);
|
2023-01-27 00:13:17 +00:00
|
|
|
|
|
|
|
int getGridX() const { return mGridPos.x(); }
|
|
|
|
int getGridY() const { return mGridPos.y(); }
|
2023-01-31 18:50:48 +00:00
|
|
|
bool isExterior() const { return mIsExterior; }
|
|
|
|
bool isQuasiExterior() const { return mIsQuasiExterior; }
|
|
|
|
bool hasWater() const { return mHasWater; }
|
|
|
|
bool noSleep() const { return mNoSleep; }
|
2023-01-27 00:13:17 +00:00
|
|
|
const ESM::RefId& getRegion() const { return mRegion; }
|
2023-01-28 11:07:47 +00:00
|
|
|
std::string_view getNameId() const { return mNameID; }
|
|
|
|
std::string_view getDisplayName() const { return mDisplayname; }
|
2023-01-27 00:13:17 +00:00
|
|
|
std::string getDescription() const;
|
|
|
|
const MoodData& getMood() const { return mMood; }
|
2023-02-04 17:45:53 +00:00
|
|
|
float getWaterHeight() const { return mWaterHeight; }
|
2023-02-19 18:19:11 +00:00
|
|
|
const ESM::RefId& getId() const { return mId; }
|
2023-02-20 21:33:35 +00:00
|
|
|
ESM::RefId getWorldSpace() const;
|
2023-05-12 20:54:52 +00:00
|
|
|
ESM::ExteriorCellLocation getExteriorCellLocation() const;
|
2023-01-27 00:13:17 +00:00
|
|
|
|
|
|
|
private:
|
2023-01-31 18:50:48 +00:00
|
|
|
bool mIsExterior;
|
|
|
|
bool mIsQuasiExterior;
|
|
|
|
bool mHasWater;
|
|
|
|
bool mNoSleep;
|
2023-01-27 00:13:17 +00:00
|
|
|
|
|
|
|
osg::Vec2i mGridPos;
|
|
|
|
std::string mDisplayname; // How the game displays it
|
|
|
|
std::string mNameID; // The name that will be used by the script and console commands
|
|
|
|
ESM::RefId mRegion;
|
2023-02-18 21:32:27 +00:00
|
|
|
ESM::RefId mId;
|
2023-02-20 21:33:35 +00:00
|
|
|
ESM::RefId mParent;
|
2023-01-27 00:13:17 +00:00
|
|
|
MoodData mMood;
|
2023-02-04 17:45:53 +00:00
|
|
|
|
|
|
|
float mWaterHeight;
|
2023-01-27 00:13:17 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|