2010-08-03 13:24:44 +00:00
|
|
|
|
|
|
|
#include "static.hpp"
|
|
|
|
|
|
|
|
#include <components/esm/loadstat.hpp>
|
|
|
|
|
2010-08-14 08:02:54 +00:00
|
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
|
|
|
|
#include "../mwrender/cellimp.hpp"
|
|
|
|
|
2010-08-03 13:24:44 +00:00
|
|
|
namespace MWClass
|
|
|
|
{
|
2010-08-14 08:02:54 +00:00
|
|
|
void Static::insertObj (const MWWorld::Ptr& ptr, MWRender::CellRenderImp& cellRender,
|
|
|
|
MWWorld::Environment& environment) const
|
|
|
|
{
|
|
|
|
ESMS::LiveCellRef<ESM::Static, MWWorld::RefData> *ref =
|
|
|
|
ptr.get<ESM::Static>();
|
|
|
|
|
|
|
|
assert (ref->base != NULL);
|
|
|
|
const std::string &model = ref->base->model;
|
|
|
|
if (!model.empty())
|
|
|
|
{
|
|
|
|
cellRender.insertBegin (ref->ref);
|
|
|
|
cellRender.insertMesh ("meshes\\" + model);
|
|
|
|
ref->mData.setHandle (cellRender.insertEnd (ref->mData.isEnabled()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-08-03 15:11:41 +00:00
|
|
|
std::string Static::getName (const MWWorld::Ptr& ptr) const
|
|
|
|
{
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
2010-08-03 13:24:44 +00:00
|
|
|
void Static::registerSelf()
|
|
|
|
{
|
|
|
|
boost::shared_ptr<Class> instance (new Static);
|
|
|
|
|
|
|
|
registerClass (typeid (ESM::Static).name(), instance);
|
|
|
|
}
|
|
|
|
}
|