pull/21/head
Jason Hooks 14 years ago
parent b945ce61a5
commit 51b74c2f05

@ -296,6 +296,7 @@ void OMW::Engine::loadBSA()
std::cout << "Adding " << iter->second.string() << std::endl; std::cout << "Adding " << iter->second.string() << std::endl;
addBSA (iter->second.string()); addBSA (iter->second.string());
} }
} }
// add resources directory // add resources directory

@ -118,6 +118,8 @@ namespace MWClass
Ogre::Vector3 pos2 = Ogre::Vector3( 0, .5, 75); Ogre::Vector3 pos2 = Ogre::Vector3( 0, .5, 75);
if (groin){ 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); cellRender.insertMesh("meshes\\" + groin->model, pos2, axis, kOgrePi, npcName + "groin", addresses, numbers);
addresses2[numbers] = npcName + "groin"; addresses2[numbers] = npcName + "groin";
addresses[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) void InteriorCellRender::insertMesh(const std::string &mesh)
{ {
assert (insert); assert (insert);
//if(mesh == "\\Meshes\\bald_MJ_hat.NIF")
NIFLoader::load(mesh); // NIFLoader::load(mesh, "");
//else
NIFLoader::load(mesh);
MovableObject *ent = scene.getMgr()->createEntity(mesh); MovableObject *ent = scene.getMgr()->createEntity(mesh);
insert->attachObject(ent); insert->attachObject(ent);

@ -145,6 +145,7 @@ public:
void destroyInstance( Archive* arch) { delete arch; } void destroyInstance( Archive* arch) { delete arch; }
}; };
static bool init = false; static bool init = false;
static void insertBSAFactory() static void insertBSAFactory()
{ {
@ -163,3 +164,8 @@ void addBSA(const std::string& name, const std::string& group)
ResourceGroupManager::getSingleton(). ResourceGroupManager::getSingleton().
addResourceLocation(name, "BSA", group); addResourceLocation(name, "BSA", group);
} }
void addDir(const std::string& name, const std::string& group)
{
ResourceGroupManager::getSingleton().
addResourceLocation(name, "FileSystem", group);
}

@ -29,5 +29,6 @@
/// Add the given BSA file as an input archive in the Ogre resource /// Add the given BSA file as an input archive in the Ogre resource
/// system. /// system.
void addBSA(const std::string& file, const std::string& group="General"); void addBSA(const std::string& file, const std::string& group="General");
void addDir(const std::string& file, const std::string& group="General");
#endif #endif

@ -4,6 +4,7 @@
#include <map> #include <map>
#include <vector> #include <vector>
#include <string> #include <string>
#include <locale>
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
@ -21,11 +22,12 @@ namespace Files
return left<right; return left<right;
std::size_t min = std::min (left.length(), right.length()); std::size_t min = std::min (left.length(), right.length());
std::locale loc;
for (std::size_t i=0; i<min; ++i) for (std::size_t i=0; i<min; ++i)
{ {
char l = std::tolower (left[i]); char l = std::tolower (left[i], loc);
char r = std::tolower (right[i]); char r = std::tolower (right[i], loc);
if (l<r) if (l<r)
return true; return true;

Loading…
Cancel
Save