1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-11 15:40:39 +00:00

Another fix

This commit is contained in:
Glorf 2013-03-10 12:11:38 +01:00
parent 81338d3b23
commit d5ca00c927
2 changed files with 10 additions and 10 deletions

View File

@ -19,7 +19,7 @@ using namespace MWWorld;
using namespace MWSound;
#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;
if((it = mFallback.find(key)) == mFallback.end())
@ -28,18 +28,18 @@ const std::string WeatherManager::getFallback (const std::string& key)
}
return it->second;
}
const std::string WeatherManager::getFallbackString(const std::string fall)
std::string WeatherManager::getFallbackString(const std::string& 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);
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 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);
}
const void WeatherManager::setFallbackWeather(Weather weather,const std::string name)
void WeatherManager::setFallbackWeather(Weather& weather,const std::string& name)
{
std::string upper=name;
upper[0]=toupper(name[0]);

View File

@ -142,11 +142,11 @@ namespace MWWorld
float mHour;
int mDay, mMonth;
std::map<std::string,std::string> mFallback;
const std::string getFallback (const std::string& key);
const std::string getFallbackString(const std::string fall);
const float getFallbackFloat(const std::string fall);
const Ogre::ColourValue getFallbackColour(const std::string fall);
const void setFallbackWeather(Weather weather,const std::string name);
std::string getFallback (const std::string& key);
std::string getFallbackString(const std::string& fall);
float getFallbackFloat(const std::string& fall);
Ogre::ColourValue getFallbackColour(const std::string& fall);
void setFallbackWeather(Weather& weather,const std::string& name);
MWRender::RenderingManager* mRendering;
std::map<Ogre::String, Weather> mWeatherSettings;