|
|
|
@ -6,8 +6,9 @@
|
|
|
|
|
#include <OgreCompositorChain.h>
|
|
|
|
|
#include <OgreMaterial.h>
|
|
|
|
|
|
|
|
|
|
#include <openengine/ogre/fader.hpp>
|
|
|
|
|
#include <boost/algorithm/string.hpp>
|
|
|
|
|
|
|
|
|
|
#include <openengine/ogre/fader.hpp>
|
|
|
|
|
|
|
|
|
|
#include "../mwbase/environment.hpp"
|
|
|
|
|
#include "../mwbase/inputmanager.hpp"
|
|
|
|
@ -212,20 +213,22 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
void LoadingScreen::changeWallpaper ()
|
|
|
|
|
{
|
|
|
|
|
/// \todo use a directory listing here
|
|
|
|
|
std::vector<std::string> splash;
|
|
|
|
|
splash.push_back ("Splash_Bonelord.tga");
|
|
|
|
|
splash.push_back ("Splash_ClannDaddy.tga");
|
|
|
|
|
splash.push_back ("Splash_Clannfear.tga");
|
|
|
|
|
splash.push_back ("Splash_Daedroth.tga");
|
|
|
|
|
splash.push_back ("Splash_Hunger.tga");
|
|
|
|
|
splash.push_back ("Splash_KwamaWarrior.tga");
|
|
|
|
|
splash.push_back ("Splash_Netch.tga");
|
|
|
|
|
splash.push_back ("Splash_NixHound.tga");
|
|
|
|
|
splash.push_back ("Splash_Siltstriker.tga");
|
|
|
|
|
splash.push_back ("Splash_Skeleton.tga");
|
|
|
|
|
splash.push_back ("Splash_SphereCenturion.tga");
|
|
|
|
|
|
|
|
|
|
mBackgroundImage->setImageTexture (splash[rand() % splash.size()]);
|
|
|
|
|
|
|
|
|
|
Ogre::StringVectorPtr resources = Ogre::ResourceGroupManager::getSingleton ().listResourceNames ("General", false);
|
|
|
|
|
for (Ogre::StringVector::const_iterator it = resources->begin(); it != resources->end(); ++it)
|
|
|
|
|
{
|
|
|
|
|
if (it->size() < 6)
|
|
|
|
|
continue;
|
|
|
|
|
std::string start = it->substr(0, 6);
|
|
|
|
|
boost::to_lower(start);
|
|
|
|
|
|
|
|
|
|
if (start == "splash")
|
|
|
|
|
splash.push_back (*it);
|
|
|
|
|
}
|
|
|
|
|
std::string randomSplash = splash[rand() % splash.size()];
|
|
|
|
|
|
|
|
|
|
Ogre::TexturePtr tex = Ogre::TextureManager::getSingleton ().load (randomSplash, "General");
|
|
|
|
|
mBackgroundImage->setImageTexture (randomSplash);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|