From 3a9007849d033610343ba3e3d05636e43a2169ba Mon Sep 17 00:00:00 2001 From: Jason Hooks Date: Wed, 8 Jun 2011 00:35:30 -0400 Subject: [PATCH] Windows fix --- apps/openmw/mwclass/npc.cpp | 2 +- components/bsa/bsa_archive.cpp | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 285da5c5a..5afc26480 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -118,7 +118,7 @@ namespace MWClass Ogre::Vector3 pos2 = Ogre::Vector3( 0, .5, 75); if (groin){ - cellRender.insertMesh("MeSHes\\1\\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 cellRender.insertMesh("meshes\\" + groin->model, pos2, axis, kOgrePi, npcName + "groin", addresses, numbers); addresses2[numbers] = npcName + "groin"; diff --git a/components/bsa/bsa_archive.cpp b/components/bsa/bsa_archive.cpp index ba7be5bfd..99848649a 100644 --- a/components/bsa/bsa_archive.cpp +++ b/components/bsa/bsa_archive.cpp @@ -107,7 +107,7 @@ class DirArchive: public Ogre::FileSystemArchive small = original.substr(cutoff - 1, original.size() - cutoff); //boost::filesystem::path smallp = small; m[small] = filesind; - //std::cout << "Directory: " << smallp.string() << " " << filesind.size() << "\n"; + //std::cout << "Directory: " << small << " " << filesind.size() << "\n"; } @@ -126,8 +126,7 @@ class DirArchive: public Ogre::FileSystemArchive std::string copy = filename; - if(OGRE_PLATFORM != OGRE_PLATFORM_WIN32) - { + for (int i = 0; i < filename.size(); i++) { @@ -135,7 +134,7 @@ class DirArchive: public Ogre::FileSystemArchive copy.replace(i, 1, "/"); } } - } + if(copy.at(0) == '\\' || copy.at(0) == '/') { @@ -189,8 +188,7 @@ class DirArchive: public Ogre::FileSystemArchive //std::cout << "Open\n"; std::string copy = filename; - if(OGRE_PLATFORM != OGRE_PLATFORM_WIN32) - { + for (int i = 0; i < filename.size(); i++) { @@ -198,7 +196,7 @@ class DirArchive: public Ogre::FileSystemArchive copy.replace(i, 1, "/"); } } - } + if(copy.at(0) == '\\' || copy.at(0) == '/') {