fs-strict

This commit is contained in:
Jason Hooks 2011-06-08 17:29:28 -04:00
parent 65cc0e8317
commit 93f41e25a4
2 changed files with 17 additions and 20 deletions

View file

@ -118,7 +118,7 @@ namespace MWClass
Ogre::Vector3 pos2 = Ogre::Vector3( 0, .5, 75); Ogre::Vector3 pos2 = Ogre::Vector3( 0, .5, 75);
if (groin){ if (groin){
cellRender.insertMesh("meshes\\2\\red_MJ_hat_ORg.nif"); //w/W_6th_Hammer.NIF cellRender.insertMesh("Meshes\\2\\red_MJ_hat_org.nif"); //w/W_6th_Hammer.NIF
//bald_MJ_hat.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";

View file

@ -49,7 +49,7 @@ class DirArchive: public Ogre::FileSystemArchive
boost::filesystem::path currentdir; boost::filesystem::path currentdir;
std::map<std::string, std::vector<std::string>, ciLessBoost> m; std::map<std::string, std::vector<std::string>, ciLessBoost> m;
int cutoff; unsigned int cutoff;
bool comparePortion(std::string file1, std::string file2, int start, int size) const bool comparePortion(std::string file1, std::string file2, int start, int size) const
{ {
@ -130,19 +130,13 @@ class DirArchive: public Ogre::FileSystemArchive
for (int i = 0; i < filename.size(); i++) for (unsigned int i = 0; i < filename.size(); i++)
{ {
if(copy.at(i) == '\\' ){ if(copy.at(i) == '\\' ){
copy.replace(i, 1, "/"); copy.replace(i, 1, "/");
} }
} }
if(fsstrict == true)
{
std::cout << "fsstrict " << copy << "\n";
return FileSystemArchive::exists(copy);
}
std::cout << "afterstrict\n";
if(copy.at(0) == '\\' || copy.at(0) == '/') if(copy.at(0) == '\\' || copy.at(0) == '/')
{ {
@ -151,7 +145,12 @@ class DirArchive: public Ogre::FileSystemArchive
//std::cout << "The copy" << copy << "\n"; //std::cout << "The copy" << copy << "\n";
//std::cout << "After:" << copy.size(); //std::cout << "After:" << copy.size();
} }
if(fsstrict == true)
{
//std::cout << "fsstrict " << copy << "\n";
return FileSystemArchive::exists(copy);
}
int last = copy.size() - 1; int last = copy.size() - 1;
@ -197,17 +196,13 @@ class DirArchive: public Ogre::FileSystemArchive
for (int i = 0; i < filename.size(); i++) for (unsigned int i = 0; i < filename.size(); i++)
{ {
if(copy.at(i) == '\\' ){ if(copy.at(i) == '\\' ){
copy.replace(i, 1, "/"); copy.replace(i, 1, "/");
} }
} }
if(fsstrict == true){
std::cout << "fsstrict " << copy << "\n";
return FileSystemArchive::open(copy, readonly);
}
std::cout << "afterstrict\n";
if(copy.at(0) == '\\' || copy.at(0) == '/') if(copy.at(0) == '\\' || copy.at(0) == '/')
{ {
@ -217,7 +212,9 @@ class DirArchive: public Ogre::FileSystemArchive
//std::cout << "After:" << copy.size(); //std::cout << "After:" << copy.size();
} }
if(fsstrict == true){
return FileSystemArchive::open(copy, readonly);
}
//boost::filesystem::path p = copy; //boost::filesystem::path p = copy;