mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-17 10:10:23 +00:00
Backslash working in linux
This commit is contained in:
parent
b92955763a
commit
2aaa0f4578
@ -300,6 +300,8 @@ void OMW::Engine::loadBSA()
|
|||||||
std::string m = mDataDir.string();
|
std::string m = mDataDir.string();
|
||||||
std::cout << "Data dir" << m << "\n";
|
std::cout << "Data dir" << m << "\n";
|
||||||
addDir(m);
|
addDir(m);
|
||||||
|
//std::string s = "f\n";
|
||||||
|
//std::cout <<"S: " << s.size() << "\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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/bald_MJ_hat.NIF"); //w/W_6th_Hammer.NIF
|
cellRender.insertMesh("Meshes\\bald_MJ_hat.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";
|
||||||
|
@ -49,9 +49,33 @@ class DirArchive: public Ogre::FileSystemArchive
|
|||||||
void load() {}
|
void load() {}
|
||||||
void unload() {}
|
void unload() {}
|
||||||
|
|
||||||
|
bool exists(const String& filename) {
|
||||||
|
std::string copy = filename;
|
||||||
|
if(OGRE_PLATFORM != OGRE_PLATFORM_WIN32)
|
||||||
|
{
|
||||||
|
|
||||||
|
for (int i = 0; i < filename.size(); i++)
|
||||||
|
{
|
||||||
|
if(copy.at(i) == '\\' ){
|
||||||
|
copy.replace(i, 1, "/");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return FileSystemArchive::exists(copy);
|
||||||
|
}
|
||||||
|
|
||||||
DataStreamPtr open(const String& filename, bool readonly = true) const
|
DataStreamPtr open(const String& filename, bool readonly = true) const
|
||||||
{
|
{
|
||||||
std::string copy = filename;
|
std::string copy = filename;
|
||||||
|
if(OGRE_PLATFORM != OGRE_PLATFORM_WIN32){
|
||||||
|
//std::cout << "In Open\n";
|
||||||
|
for (int i = 0; i < filename.size(); i++)
|
||||||
|
{
|
||||||
|
if(copy.at(i) == '\\' ){
|
||||||
|
copy.replace(i, 1, "/");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return FileSystemArchive::open(copy, readonly);
|
return FileSystemArchive::open(copy, readonly);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user