diff --git a/apps/openmw/mwrender/exterior.cpp b/apps/openmw/mwrender/exterior.cpp index 1cdc51c98..513fdac2a 100644 --- a/apps/openmw/mwrender/exterior.cpp +++ b/apps/openmw/mwrender/exterior.cpp @@ -124,7 +124,7 @@ void ExteriorCellRender::insertMesh(const std::string &mesh, Ogre::Vector3 vec, } mNpcPart = parent->createChildSceneNode(sceneNodeName); - MeshPtr good2 = NIFLoader::load(mesh); + MeshPtr good2 = NifOgre::NIFLoader::load(mesh); MovableObject *ent = mScene.getMgr()->createEntity(mesh); @@ -213,7 +213,7 @@ void ExteriorCellRender::insertMesh(const std::string &mesh) { assert (mInsert); - NIFLoader::load(mesh); + NifOgre::NIFLoader::load(mesh); Entity *ent = mScene.getMgr()->createEntity(mesh); if(!isStatic) diff --git a/apps/openmw/mwrender/interior.cpp b/apps/openmw/mwrender/interior.cpp index ad0ecf69d..4fa5191b8 100644 --- a/apps/openmw/mwrender/interior.cpp +++ b/apps/openmw/mwrender/interior.cpp @@ -106,7 +106,7 @@ void InteriorCellRender::insertMesh(const std::string &mesh, Ogre::Vector3 vec, npcPart = parent->createChildSceneNode(sceneNodeName); //npcPart->showBoundingBox(true); - MeshPtr good2 = NIFLoader::load(mesh); + MeshPtr good2 = NifOgre::NIFLoader::load(mesh); MovableObject *ent = scene.getMgr()->createEntity(mesh); //ent->extr @@ -184,7 +184,7 @@ void InteriorCellRender::insertMesh(const std::string &mesh) { assert (insert); - NIFLoader::load(mesh); + NifOgre::NIFLoader::load(mesh); MovableObject *ent = scene.getMgr()->createEntity(mesh); insert->attachObject(ent); diff --git a/components/nifogre/ogre_nif_loader.cpp b/components/nifogre/ogre_nif_loader.cpp index e4d09d941..b2b102daf 100644 --- a/components/nifogre/ogre_nif_loader.cpp +++ b/components/nifogre/ogre_nif_loader.cpp @@ -51,6 +51,7 @@ using namespace Ogre; using namespace Nif; using namespace Mangle::VFS; using namespace Misc; +using namespace NifOgre; NIFLoader& NIFLoader::getSingleton() { diff --git a/components/nifogre/ogre_nif_loader.hpp b/components/nifogre/ogre_nif_loader.hpp index cec9d95d7..fd05ee866 100644 --- a/components/nifogre/ogre_nif_loader.hpp +++ b/components/nifogre/ogre_nif_loader.hpp @@ -49,6 +49,9 @@ namespace Mangle } } +namespace NifOgre +{ + /** Manual resource loader for NIF meshes. This is the main class responsible for translating the internal NIF mesh structure into something Ogre can use. Later it will also handle the insertion of @@ -139,4 +142,6 @@ class NIFLoader : Ogre::ManualResourceLoader Ogre::SkeletonPtr mSkel; }; +} + #endif diff --git a/components/nifogre/tests/ogre_nif_test.cpp b/components/nifogre/tests/ogre_nif_test.cpp index 89f99e8ff..decd43df5 100644 --- a/components/nifogre/tests/ogre_nif_test.cpp +++ b/components/nifogre/tests/ogre_nif_test.cpp @@ -13,11 +13,11 @@ const char* mesh = "meshes\\f\\ex_ashl_a_banner_r.nif"; void C::doTest() { // Add Morrowind.bsa resource location - addBSA("../../data/Morrowind.bsa"); + Bsa::addBSA("../../data/Morrowind.bsa"); // Insert the mesh - NIFLoader::load(mesh); - NIFLoader::load(mesh); + NifOgre::NIFLoader::load(mesh); + NifOgre::NIFLoader::load(mesh); /* SceneNode *node = mgr->getRootSceneNode()->createChildSceneNode("node");