diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 5afc26480..9ef5e6f40 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -95,8 +95,7 @@ namespace MWClass upperright[uppernumbers++] = npcName + "chest"; neckandup[neckNumbers++] = npcName + "chest"; } - //std::cout << "GETTING NPC PART"; - //Orgre::SceneNode test = cellRender.getNpcPart(); + const ESM::BodyPart *upperleg = environment.mWorld->getStore().bodyParts.search (bodyRaceID + "upper leg"); const ESM::BodyPart *groin = environment.mWorld->getStore().bodyParts.search (bodyRaceID + "groin"); @@ -113,23 +112,18 @@ namespace MWClass const ESM::BodyPart *hands = environment.mWorld->getStore().bodyParts.search (bodyRaceID + "hands.1st"); - //std::cout << "RACE" << bodyRaceID << "\n"; - Ogre::Vector3 pos2 = Ogre::Vector3( 0, .5, 75); if (groin){ - 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"; addresses[numbers++] = npcName + "groin"; } if (tail) { cellRender.insertMesh("tail\\" + tail->model, Ogre::Vector3(0 , 0, -76), axis, kOgrePi, npcName + "tail", addresses, numbers, "tail"); - //std::cout << "TAIL\n"; } - //addresses[1] = npcName + "groin"; + if(upperleg){ cellRender.insertMesh ("meshes\\" + upperleg->model, Ogre::Vector3( 6, 0, -16), axis, kOgrePi, npcName + "upper leg", addresses, numbers); //-18 cellRender.insertMesh ("meshes\\" + upperleg->model, Ogre::Vector3( -6, 0, -16), axis, Ogre::Radian(0), npcName + "upper leg2", addresses2, numbers); @@ -220,9 +214,6 @@ namespace MWClass if(hand) { - //std::cout << "WE FOUND A HAND\n"; - //-50, 0, -120 - //std::cout << "WE FOUND HANDS\n"; std::string pass; if(hand->model.compare("b\\B_N_Dark Elf_F_Hands.1st.NIF")==0 && bodyRaceID.compare("b_n_dark elf_m_") == 0) pass = "b\\B_N_Dark Elf_M_Hands.1st.NIF"; @@ -232,7 +223,6 @@ namespace MWClass cellRender.insertMesh("meshes\\" + pass, Ogre::Vector3(42, 1, -110), Ogre::Vector3(0, 0,0), kOgrePi, npcName + "hand2", upperright, uppernumbers, false); //0, 100, -100 0,0,120 upperleft[uppernumbers] = npcName + "hand"; upperright[uppernumbers++] = npcName + "hand2"; - //cellRender.rotateMesh(Ogre::Vector3(0, 0,0), kOgrePi, upperleft, uppernumbers); cellRender.scaleMesh(Ogre::Vector3(1, -1, 1), upperleft, uppernumbers); cellRender.scaleMesh(Ogre::Vector3(1, -1, 1), upperright, uppernumbers); } @@ -246,7 +236,6 @@ namespace MWClass else pass =hands->model; //-50, 0, -120 cellRender.insertMesh("meshes\\" + pass, Ogre::Vector3(42, 1,-110), Ogre::Vector3(0, 0, 0), kOgrePi, npcName + "hand", upperleft, uppernumbers, false); //0, 100, -100 42, 0, -110 - //cellRender.insertMesh("meshes\\" + hands->model, Ogre::Vector3(42, 0,110), Ogre::Vector3(1, 0, 0), kOgrePi, npcName + "hand", upperleft, uppernumbers, false); //0, 100, -100 42, 0, -110 cellRender.insertMesh("meshes\\" + pass, Ogre::Vector3(42, 1, -110), Ogre::Vector3(0, 0, 0), kOgrePi, npcName + "hand2", upperright, uppernumbers, false); //0, 100, -100 0,0,120 upperleft[uppernumbers] = npcName + "hand"; upperright[uppernumbers++] = npcName + "hand2"; diff --git a/apps/openmw/mwsound/soundmanager.hpp b/apps/openmw/mwsound/soundmanager.hpp index 70e6babf9..ec33f57a2 100644 --- a/apps/openmw/mwsound/soundmanager.hpp +++ b/apps/openmw/mwsound/soundmanager.hpp @@ -33,7 +33,7 @@ namespace MWSound bool fsStrict; void streamMusicFull (const std::string& filename); ///< Play a soundifle - /// \param filename name of a sound file in "Music/" in the data directory. + /// \param absolute filename public: @@ -43,6 +43,8 @@ namespace MWSound ~SoundManager(); void streamMusic(const std::string& filename); + ///< Play a soundifle + /// \param filename name of a sound file in "Music/" in the data directory. void startRandomTitle(); void MP3Lookup(boost::filesystem::path dir); //struct SoundImpl; diff --git a/components/bsa/bsa_archive.cpp b/components/bsa/bsa_archive.cpp index 09662474f..4b3fbf6c0 100644 --- a/components/bsa/bsa_archive.cpp +++ b/components/bsa/bsa_archive.cpp @@ -67,11 +67,11 @@ class DirArchive: public Ogre::FileSystemArchive DirArchive(const String& name) : FileSystemArchive(name, "Dir") - { mType = "Dir"; + { + mType = "Dir"; currentdir = name; std::string s = name; cutoff = s.size() + 1; - //std::cout << "Cut off:" << cutoff; if(fsstrict == false) populateMap(currentdir); @@ -98,7 +98,6 @@ class DirArchive: public Ogre::FileSystemArchive small = s.substr(cutoff - 1, s.size() - cutoff); filesind.push_back(small); - //std::cout << "File: " << small << "f\n"; } } std::string small; @@ -107,9 +106,7 @@ class DirArchive: public Ogre::FileSystemArchive small = original.substr(cutoff, original.size() - cutoff); else small = original.substr(cutoff - 1, original.size() - cutoff); - //boost::filesystem::path smallp = small; m[small] = filesind; - //std::cout << "Directory: " << small << " " << filesind.size() << "\n"; } @@ -120,12 +117,6 @@ class DirArchive: public Ogre::FileSystemArchive void unload() {} bool exists(const String& filename) { - //std::cout << "exists\n"; - //String s = filename; - //FileSystemArchive::findFiles(s, true, false, filenames.getPointer(), f.getPointer()); - // std::cout << "Filenames" << filenames.useCount() << "\n"; - - std::string copy = filename; @@ -140,10 +131,7 @@ class DirArchive: public Ogre::FileSystemArchive if(copy.at(0) == '\\' || copy.at(0) == '/') { - //std::cout << "Before:" << copy.size() << "\n"; copy.erase(0, 1); - //std::cout << "The copy" << copy << "\n"; - //std::cout << "After:" << copy.size(); } if(fsstrict == true) { @@ -162,36 +150,23 @@ class DirArchive: public Ogre::FileSystemArchive break; } - //std::string file = copy.substr(i + 1, copy.size() - i); //filename with no slash std::string folder = copy.substr(0, i); //folder with no slash - - //std::transform(file.begin(), file.end(), file.begin(), tolower); - //boost::filesystem::path folderpath = folder; std::vector current = m[folder]; for(std::vector::iterator iter = current.begin(); iter != current.end(); iter++) { - //std::string loopfile = iter->substr(i + 1, copy.size() - i); //filename with no slash - //std::transform(loopfile.begin(), loopfile.end(), loopfile.begin(), tolower); - //std::string now = *iter; if(comparePortion(*iter, copy, i + 1, copy.size() - i -1) == true){ - //std::cout << "Loopfile:" << copy << "\n"; return FileSystemArchive::exists(*iter); } } - //std::cout << "Filename:" << file << "\n"; - //std::cout << "Full:" << p.string() << "\n"; - //std::cout << "Current:" << folder << "size: " << current.size() << "\n"; - //std::cout << "\nFull:" << p.string() << "\n"<< "Part:" << folderpath.string(); - return false;//FileSystemArchive::exists(copy); + return false; } DataStreamPtr open(const String& filename, bool readonly = true) const { std::map, ciLessBoost> mlocal = m; - //std::cout << "Open\n"; std::string copy = filename; @@ -206,17 +181,13 @@ class DirArchive: public Ogre::FileSystemArchive if(copy.at(0) == '\\' || copy.at(0) == '/') { - //std::cout << "Before:" << copy.size() << "\n"; copy.erase(0, 1); - //std::cout << "The copy" << copy << "\n"; - //std::cout << "After:" << copy.size(); } if(fsstrict == true){ return FileSystemArchive::open(copy, readonly); } - //boost::filesystem::path p = copy; int last = copy.size() - 1; int i = last; @@ -227,28 +198,17 @@ class DirArchive: public Ogre::FileSystemArchive break; } - std::string folder = copy.substr(0, i); //folder with no slash //folder with no slash - - //std::transform(file.begin(), file.end(), file.begin(), tolower); - //boost::filesystem::path folderpath = folder; + std::string folder = copy.substr(0, i); //folder with no slash std::vector current = mlocal[folder]; for(std::vector::iterator iter = current.begin(); iter != current.end(); iter++) { - //std::string loopfile = iter->substr(i + 1, copy.size() - i); //filename with no slash - //std::transform(loopfile.begin(), loopfile.end(), loopfile.begin(), tolower); if(comparePortion(*iter, copy, i + 1, copy.size() - i -1) == true){ - //std::cout << "Loopfile:" << copy << "\n"; return FileSystemArchive::open(*iter, readonly); } } - - //std::cout << "Filename:" << file << "\n"; - //std::cout << "Full:" << p.string() << "\n"; - //std::cout << "Current:" << folder << "size: " << current.size() << "\n"; - //std::cout << "\nFull:" << p.string() << "\n"<< "Part:" << folderpath.string(); DataStreamPtr p; - return p;//FileSystemArchive::open(copy, readonly); + return p; } };