mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
Remove unused/unneeded parameters
This commit is contained in:
parent
932fffd1a7
commit
0458fd5531
@ -26,7 +26,7 @@ namespace MWClass
|
||||
const std::string model = getModel(ptr);
|
||||
if (!model.empty()) {
|
||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
objects.insertBegin(ptr);
|
||||
objects.insertMesh(ptr, model);
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ namespace MWClass
|
||||
const std::string model = getModel(ptr);
|
||||
if (!model.empty()) {
|
||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
objects.insertBegin(ptr);
|
||||
objects.insertMesh(ptr, model);
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ namespace MWClass
|
||||
const std::string model = getModel(ptr);
|
||||
if (!model.empty()) {
|
||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
objects.insertBegin(ptr);
|
||||
objects.insertMesh(ptr, model);
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ namespace MWClass
|
||||
const std::string model = getModel(ptr);
|
||||
if (!model.empty()) {
|
||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
objects.insertBegin(ptr);
|
||||
objects.insertMesh(ptr, model);
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ namespace MWClass
|
||||
const std::string model = getModel(ptr);
|
||||
if (!model.empty()) {
|
||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
objects.insertBegin(ptr);
|
||||
objects.insertMesh(ptr, model);
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ namespace MWClass
|
||||
const std::string model = getModel(ptr);
|
||||
if (!model.empty()) {
|
||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
objects.insertBegin(ptr);
|
||||
objects.insertMesh(ptr, model);
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ namespace MWClass
|
||||
const std::string model = getModel(ptr);
|
||||
if (!model.empty()) {
|
||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
objects.insertBegin(ptr);
|
||||
objects.insertMesh(ptr, model);
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ namespace MWClass
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
|
||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
objects.insertBegin(ptr);
|
||||
if(!model.empty())
|
||||
objects.insertMesh(ptr, "meshes\\" + model);
|
||||
else
|
||||
|
@ -27,7 +27,7 @@ namespace MWClass
|
||||
const std::string model = getModel(ptr);
|
||||
if (!model.empty()) {
|
||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
objects.insertBegin(ptr);
|
||||
objects.insertMesh(ptr, model);
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ namespace MWClass
|
||||
const std::string model = getModel(ptr);
|
||||
if (!model.empty()) {
|
||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
objects.insertBegin(ptr);
|
||||
objects.insertMesh(ptr, model);
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ namespace MWClass
|
||||
const std::string model = getModel(ptr);
|
||||
if (!model.empty()) {
|
||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
objects.insertBegin(ptr);
|
||||
objects.insertMesh(ptr, model);
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ namespace MWClass
|
||||
const std::string model = getModel(ptr);
|
||||
if (!model.empty()) {
|
||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
objects.insertBegin(ptr);
|
||||
objects.insertMesh(ptr, model);
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ namespace MWClass
|
||||
const std::string model = getModel(ptr);
|
||||
if (!model.empty()) {
|
||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
objects.insertBegin(ptr);
|
||||
objects.insertMesh(ptr, model);
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ namespace MWClass
|
||||
const std::string model = getModel(ptr);
|
||||
if (!model.empty()) {
|
||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), true);
|
||||
objects.insertBegin(ptr);
|
||||
objects.insertMesh(ptr, model);
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ namespace MWClass
|
||||
const std::string model = getModel(ptr);
|
||||
if (!model.empty()) {
|
||||
MWRender::Objects& objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
objects.insertBegin(ptr);
|
||||
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())
|
||||
{
|
||||
setObjectRoot(model, false);
|
||||
@ -997,7 +997,8 @@ ObjectAnimation::ObjectAnimation(const MWWorld::Ptr& ptr, const std::string &mod
|
||||
small = false;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ public:
|
||||
|
||||
class ObjectAnimation : public Animation {
|
||||
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);
|
||||
|
||||
|
@ -29,7 +29,7 @@ void Objects::setRootNode(Ogre::SceneNode* 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* cellnode;
|
||||
@ -66,10 +66,7 @@ void Objects::insertBegin (const MWWorld::Ptr& ptr, bool enabled, bool static_)
|
||||
// Rotates first around z, then y, then x
|
||||
insert->setOrientation(xr*yr*zr);
|
||||
|
||||
if (!enabled)
|
||||
insert->setVisible (false);
|
||||
ptr.getRefData().setBaseNode(insert);
|
||||
mIsStatic = static_;
|
||||
}
|
||||
|
||||
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();
|
||||
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::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())
|
||||
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;
|
||||
|
||||
|
@ -28,17 +28,16 @@ class Objects{
|
||||
PtrAnimationMap mObjects;
|
||||
|
||||
Ogre::SceneNode* mRootNode;
|
||||
bool mIsStatic;
|
||||
|
||||
static int uniqueID;
|
||||
|
||||
public:
|
||||
Objects(OEngine::Render::OgreRenderer &renderer)
|
||||
: mRenderer(renderer)
|
||||
, mIsStatic(false)
|
||||
, mRootNode(NULL)
|
||||
{}
|
||||
~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 enableLights();
|
||||
|
Loading…
x
Reference in New Issue
Block a user