forked from teamnwah/openmw-tes3coop
Remove unused/unneeded parameters
This commit is contained in:
parent
932fffd1a7
commit
0458fd5531
19 changed files with 26 additions and 27 deletions
|
@ -26,7 +26,7 @@ namespace MWClass
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
objects.insertBegin(ptr);
|
||||||
objects.insertMesh(ptr, model);
|
objects.insertMesh(ptr, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace MWClass
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
objects.insertBegin(ptr);
|
||||||
objects.insertMesh(ptr, model);
|
objects.insertMesh(ptr, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace MWClass
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
objects.insertBegin(ptr);
|
||||||
objects.insertMesh(ptr, model);
|
objects.insertMesh(ptr, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace MWClass
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
objects.insertBegin(ptr);
|
||||||
objects.insertMesh(ptr, model);
|
objects.insertMesh(ptr, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ namespace MWClass
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
objects.insertBegin(ptr);
|
||||||
objects.insertMesh(ptr, model);
|
objects.insertMesh(ptr, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace MWClass
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
objects.insertBegin(ptr);
|
||||||
objects.insertMesh(ptr, model);
|
objects.insertMesh(ptr, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace MWClass
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
objects.insertBegin(ptr);
|
||||||
objects.insertMesh(ptr, model);
|
objects.insertMesh(ptr, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace MWClass
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
|
|
||||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
objects.insertBegin(ptr);
|
||||||
if(!model.empty())
|
if(!model.empty())
|
||||||
objects.insertMesh(ptr, "meshes\\" + model);
|
objects.insertMesh(ptr, "meshes\\" + model);
|
||||||
else
|
else
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace MWClass
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
objects.insertBegin(ptr);
|
||||||
objects.insertMesh(ptr, model);
|
objects.insertMesh(ptr, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace MWClass
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
objects.insertBegin(ptr);
|
||||||
objects.insertMesh(ptr, model);
|
objects.insertMesh(ptr, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace MWClass
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
objects.insertBegin(ptr);
|
||||||
objects.insertMesh(ptr, model);
|
objects.insertMesh(ptr, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace MWClass
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
objects.insertBegin(ptr);
|
||||||
objects.insertMesh(ptr, model);
|
objects.insertMesh(ptr, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace MWClass
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
objects.insertBegin(ptr);
|
||||||
objects.insertMesh(ptr, model);
|
objects.insertMesh(ptr, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace MWClass
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), true);
|
objects.insertBegin(ptr);
|
||||||
objects.insertMesh(ptr, model);
|
objects.insertMesh(ptr, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace MWClass
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
objects.insertBegin(ptr);
|
||||||
objects.insertMesh(ptr, model);
|
objects.insertMesh(ptr, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -979,7 +979,7 @@ void Animation::detachObjectFromBone(Ogre::MovableObject *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ObjectAnimation::ObjectAnimation(const MWWorld::Ptr& ptr, const std::string &model, bool isStatic)
|
ObjectAnimation::ObjectAnimation(const MWWorld::Ptr& ptr, const std::string &model)
|
||||||
: Animation(ptr, ptr.getRefData().getBaseNode())
|
: Animation(ptr, ptr.getRefData().getBaseNode())
|
||||||
{
|
{
|
||||||
setObjectRoot(model, false);
|
setObjectRoot(model, false);
|
||||||
|
@ -997,7 +997,8 @@ ObjectAnimation::ObjectAnimation(const MWWorld::Ptr& ptr, const std::string &mod
|
||||||
small = false;
|
small = false;
|
||||||
|
|
||||||
float dist = small ? Settings::Manager::getInt("small object distance", "Viewing distance") : 0.0f;
|
float dist = small ? Settings::Manager::getInt("small object distance", "Viewing distance") : 0.0f;
|
||||||
setRenderProperties(mObjectRoot, isStatic ? (small ? RV_StaticsSmall : RV_Statics) : RV_Misc,
|
setRenderProperties(mObjectRoot, (mPtr.getTypeName() == typeid(ESM::Static).name()) ?
|
||||||
|
(small ? RV_StaticsSmall : RV_Statics) : RV_Misc,
|
||||||
RQG_Main, RQG_Alpha, dist);
|
RQG_Main, RQG_Alpha, dist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -247,7 +247,7 @@ public:
|
||||||
|
|
||||||
class ObjectAnimation : public Animation {
|
class ObjectAnimation : public Animation {
|
||||||
public:
|
public:
|
||||||
ObjectAnimation(const MWWorld::Ptr& ptr, const std::string &model, bool isStatic);
|
ObjectAnimation(const MWWorld::Ptr& ptr, const std::string &model);
|
||||||
|
|
||||||
void addLight(const ESM::Light *light);
|
void addLight(const ESM::Light *light);
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ void Objects::setRootNode(Ogre::SceneNode* root)
|
||||||
mRootNode = root;
|
mRootNode = root;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Objects::insertBegin (const MWWorld::Ptr& ptr, bool enabled, bool static_)
|
void Objects::insertBegin (const MWWorld::Ptr& ptr)
|
||||||
{
|
{
|
||||||
Ogre::SceneNode* root = mRootNode;
|
Ogre::SceneNode* root = mRootNode;
|
||||||
Ogre::SceneNode* cellnode;
|
Ogre::SceneNode* cellnode;
|
||||||
|
@ -66,10 +66,7 @@ void Objects::insertBegin (const MWWorld::Ptr& ptr, bool enabled, bool static_)
|
||||||
// Rotates first around z, then y, then x
|
// Rotates first around z, then y, then x
|
||||||
insert->setOrientation(xr*yr*zr);
|
insert->setOrientation(xr*yr*zr);
|
||||||
|
|
||||||
if (!enabled)
|
|
||||||
insert->setVisible (false);
|
|
||||||
ptr.getRefData().setBaseNode(insert);
|
ptr.getRefData().setBaseNode(insert);
|
||||||
mIsStatic = static_;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Objects::insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh)
|
void Objects::insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh)
|
||||||
|
@ -77,7 +74,7 @@ void Objects::insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh)
|
||||||
Ogre::SceneNode* insert = ptr.getRefData().getBaseNode();
|
Ogre::SceneNode* insert = ptr.getRefData().getBaseNode();
|
||||||
assert(insert);
|
assert(insert);
|
||||||
|
|
||||||
std::auto_ptr<ObjectAnimation> anim(new ObjectAnimation(ptr, mesh, mIsStatic));
|
std::auto_ptr<ObjectAnimation> anim(new ObjectAnimation(ptr, mesh));
|
||||||
|
|
||||||
Ogre::AxisAlignedBox bounds = anim->getWorldBounds();
|
Ogre::AxisAlignedBox bounds = anim->getWorldBounds();
|
||||||
Ogre::Vector3 extents = bounds.getSize();
|
Ogre::Vector3 extents = bounds.getSize();
|
||||||
|
@ -97,7 +94,9 @@ void Objects::insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh)
|
||||||
if(ptr.getTypeName() == typeid(ESM::Light).name())
|
if(ptr.getTypeName() == typeid(ESM::Light).name())
|
||||||
anim->addLight(ptr.get<ESM::Light>()->mBase);
|
anim->addLight(ptr.get<ESM::Light>()->mBase);
|
||||||
|
|
||||||
if(mIsStatic && Settings::Manager::getBool("use static geometry", "Objects") && anim->canBatch())
|
if(ptr.getTypeName() == typeid(ESM::Static).name() &&
|
||||||
|
Settings::Manager::getBool("use static geometry", "Objects") &&
|
||||||
|
anim->canBatch())
|
||||||
{
|
{
|
||||||
Ogre::StaticGeometry* sg = 0;
|
Ogre::StaticGeometry* sg = 0;
|
||||||
|
|
||||||
|
|
|
@ -28,17 +28,16 @@ class Objects{
|
||||||
PtrAnimationMap mObjects;
|
PtrAnimationMap mObjects;
|
||||||
|
|
||||||
Ogre::SceneNode* mRootNode;
|
Ogre::SceneNode* mRootNode;
|
||||||
bool mIsStatic;
|
|
||||||
static int uniqueID;
|
static int uniqueID;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Objects(OEngine::Render::OgreRenderer &renderer)
|
Objects(OEngine::Render::OgreRenderer &renderer)
|
||||||
: mRenderer(renderer)
|
: mRenderer(renderer)
|
||||||
, mIsStatic(false)
|
|
||||||
, mRootNode(NULL)
|
, mRootNode(NULL)
|
||||||
{}
|
{}
|
||||||
~Objects(){}
|
~Objects(){}
|
||||||
void insertBegin (const MWWorld::Ptr& ptr, bool enabled, bool static_);
|
void insertBegin (const MWWorld::Ptr& ptr);
|
||||||
void insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh);
|
void insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh);
|
||||||
|
|
||||||
void enableLights();
|
void enableLights();
|
||||||
|
|
Loading…
Reference in a new issue