mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 14:09:39 +00:00
Another fix
This commit is contained in:
parent
81338d3b23
commit
d5ca00c927
2 changed files with 10 additions and 10 deletions
|
@ -19,7 +19,7 @@ using namespace MWWorld;
|
||||||
using namespace MWSound;
|
using namespace MWSound;
|
||||||
|
|
||||||
#define lerp(x, y) (x * (1-factor) + y * factor)
|
#define lerp(x, y) (x * (1-factor) + y * factor)
|
||||||
const std::string WeatherManager::getFallback (const std::string& key)
|
std::string WeatherManager::getFallback (const std::string& key)
|
||||||
{
|
{
|
||||||
std::map<std::string,std::string>::const_iterator it;
|
std::map<std::string,std::string>::const_iterator it;
|
||||||
if((it = mFallback.find(key)) == mFallback.end())
|
if((it = mFallback.find(key)) == mFallback.end())
|
||||||
|
@ -28,18 +28,18 @@ const std::string WeatherManager::getFallback (const std::string& key)
|
||||||
}
|
}
|
||||||
return it->second;
|
return it->second;
|
||||||
}
|
}
|
||||||
const std::string WeatherManager::getFallbackString(const std::string fall)
|
std::string WeatherManager::getFallbackString(const std::string& fall)
|
||||||
{
|
{
|
||||||
return WeatherManager::getFallback(fall);
|
return WeatherManager::getFallback(fall);
|
||||||
}
|
}
|
||||||
|
|
||||||
const float WeatherManager::getFallbackFloat(const std::string fall)
|
float WeatherManager::getFallbackFloat(const std::string& fall)
|
||||||
{
|
{
|
||||||
std::string fallback=getFallbackString(fall);
|
std::string fallback=getFallbackString(fall);
|
||||||
return boost::lexical_cast<float>(fallback);
|
return boost::lexical_cast<float>(fallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ColourValue WeatherManager::getFallbackColour(const std::string fall)
|
ColourValue WeatherManager::getFallbackColour(const std::string& fall)
|
||||||
{
|
{
|
||||||
std::string sum;
|
std::string sum;
|
||||||
std::string ret[3];
|
std::string ret[3];
|
||||||
|
@ -51,7 +51,7 @@ const ColourValue WeatherManager::getFallbackColour(const std::string fall)
|
||||||
}
|
}
|
||||||
return ColourValue(boost::lexical_cast<int>(ret[0])/255.f,boost::lexical_cast<int>(ret[1])/255.f,boost::lexical_cast<int>(ret[2])/255.f);
|
return ColourValue(boost::lexical_cast<int>(ret[0])/255.f,boost::lexical_cast<int>(ret[1])/255.f,boost::lexical_cast<int>(ret[2])/255.f);
|
||||||
}
|
}
|
||||||
const void WeatherManager::setFallbackWeather(Weather weather,const std::string name)
|
void WeatherManager::setFallbackWeather(Weather& weather,const std::string& name)
|
||||||
{
|
{
|
||||||
std::string upper=name;
|
std::string upper=name;
|
||||||
upper[0]=toupper(name[0]);
|
upper[0]=toupper(name[0]);
|
||||||
|
|
|
@ -142,11 +142,11 @@ namespace MWWorld
|
||||||
float mHour;
|
float mHour;
|
||||||
int mDay, mMonth;
|
int mDay, mMonth;
|
||||||
std::map<std::string,std::string> mFallback;
|
std::map<std::string,std::string> mFallback;
|
||||||
const std::string getFallback (const std::string& key);
|
std::string getFallback (const std::string& key);
|
||||||
const std::string getFallbackString(const std::string fall);
|
std::string getFallbackString(const std::string& fall);
|
||||||
const float getFallbackFloat(const std::string fall);
|
float getFallbackFloat(const std::string& fall);
|
||||||
const Ogre::ColourValue getFallbackColour(const std::string fall);
|
Ogre::ColourValue getFallbackColour(const std::string& fall);
|
||||||
const void setFallbackWeather(Weather weather,const std::string name);
|
void setFallbackWeather(Weather& weather,const std::string& name);
|
||||||
MWRender::RenderingManager* mRendering;
|
MWRender::RenderingManager* mRendering;
|
||||||
|
|
||||||
std::map<Ogre::String, Weather> mWeatherSettings;
|
std::map<Ogre::String, Weather> mWeatherSettings;
|
||||||
|
|
Loading…
Reference in a new issue