@ -296,6 +296,7 @@ void OMW::Engine::loadBSA()
std::cout << "Adding " << iter->second.string() << std::endl;
addBSA (iter->second.string());
}
// add resources directory
@ -118,6 +118,8 @@ namespace MWClass
Ogre::Vector3 pos2 = Ogre::Vector3( 0, .5, 75);
if (groin){
cellRender.insertMesh("bald_MJ_hat.NIF"); //w/W_6th_Hammer.NIF
//bald_MJ_hat.NIF
cellRender.insertMesh("meshes\\" + groin->model, pos2, axis, kOgrePi, npcName + "groin", addresses, numbers);
addresses2[numbers] = npcName + "groin";
addresses[numbers++] = npcName + "groin";
@ -200,8 +200,10 @@ Ogre::Entity* InteriorCellRender::insertAndDeliverMesh(const std::string &mesh)
void InteriorCellRender::insertMesh(const std::string &mesh)
{
assert (insert);
NIFLoader::load(mesh);
//if(mesh == "\\Meshes\\bald_MJ_hat.NIF")
// NIFLoader::load(mesh, "");
//else
MovableObject *ent = scene.getMgr()->createEntity(mesh);
insert->attachObject(ent);
@ -145,6 +145,7 @@ public:
void destroyInstance( Archive* arch) { delete arch; }
};
static bool init = false;
static void insertBSAFactory()
@ -163,3 +164,8 @@ void addBSA(const std::string& name, const std::string& group)
ResourceGroupManager::getSingleton().
addResourceLocation(name, "BSA", group);
void addDir(const std::string& name, const std::string& group)
addResourceLocation(name, "FileSystem", group);
@ -29,5 +29,6 @@
/// Add the given BSA file as an input archive in the Ogre resource
/// system.
void addBSA(const std::string& file, const std::string& group="General");
void addDir(const std::string& file, const std::string& group="General");
#endif
@ -4,6 +4,7 @@
#include <map>
#include <vector>
#include <string>
#include <locale>
#include <boost/filesystem/path.hpp>
@ -21,11 +22,12 @@ namespace Files
return left<right;
std::size_t min = std::min (left.length(), right.length());
std::locale loc;
for (std::size_t i=0; i<min; ++i)
char l = std::tolower (left[i]);
char r = std::tolower (right[i]);
char l = std::tolower (left[i], loc);
char r = std::tolower (right[i], loc);
if (l<r)
return true;