forked from teamnwah/openmw-tes3coop
consider all files in Splash directory
This commit is contained in:
parent
6acbea822b
commit
84a4fd56c3
3 changed files with 9 additions and 6 deletions
|
@ -163,9 +163,8 @@ void OMW::Engine::loadBSA()
|
||||||
std::cout << "Data dir " << dataDirectory << std::endl;
|
std::cout << "Data dir " << dataDirectory << std::endl;
|
||||||
Bsa::addDir(dataDirectory, mFSStrict);
|
Bsa::addDir(dataDirectory, mFSStrict);
|
||||||
|
|
||||||
// Workaround: Mygui does not find textures in non-BSA subfolders, _unless_ they are explicitely added like this
|
// Workaround until resource listing capabilities are added to DirArchive, we need those to list available splash screens
|
||||||
// For splash screens, this is OK to do, but eventually we will need an investigation why this is necessary
|
addResourcesDirectory (dataDirectory);
|
||||||
Bsa::addDir(dataDirectory + "/Splash", mFSStrict);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -216,9 +216,13 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
std::string start = it->substr(0, 6);
|
std::string start = it->substr(0, 6);
|
||||||
boost::to_lower(start);
|
boost::to_lower(start);
|
||||||
|
|
||||||
if (start == "splash")
|
if (start == "splash")
|
||||||
splash.push_back (*it);
|
splash.push_back (*it);
|
||||||
}
|
}
|
||||||
mBackgroundImage->setImageTexture (splash[rand() % splash.size()]);
|
std::string randomSplash = splash[rand() % splash.size()];
|
||||||
|
|
||||||
|
Ogre::TexturePtr tex = Ogre::TextureManager::getSingleton ().load (randomSplash, "General");
|
||||||
|
mBackgroundImage->setImageTexture (randomSplash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -375,7 +375,7 @@ void addBSA(const std::string& name, const std::string& group)
|
||||||
{
|
{
|
||||||
insertBSAFactory();
|
insertBSAFactory();
|
||||||
ResourceGroupManager::getSingleton().
|
ResourceGroupManager::getSingleton().
|
||||||
addResourceLocation(name, "BSA", group);
|
addResourceLocation(name, "BSA", group, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void addDir(const std::string& name, const bool& fs, const std::string& group)
|
void addDir(const std::string& name, const bool& fs, const std::string& group)
|
||||||
|
@ -384,7 +384,7 @@ void addDir(const std::string& name, const bool& fs, const std::string& group)
|
||||||
insertDirFactory();
|
insertDirFactory();
|
||||||
|
|
||||||
ResourceGroupManager::getSingleton().
|
ResourceGroupManager::getSingleton().
|
||||||
addResourceLocation(name, "Dir", group);
|
addResourceLocation(name, "Dir", group, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue