1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-24 08:39:43 +00:00

Revert "Type of weather changed from string to enum."

This reverts commit 04d90b4c47.

Conflicts:
	apps/openmw/mwworld/weather.cpp
	apps/openmw/mwworld/weather.hpp
This commit is contained in:
Miroslav Puda 2013-06-20 21:44:28 +02:00
parent 26a6bdb27d
commit 8da3494d74
5 changed files with 144 additions and 123 deletions

View file

@ -191,7 +191,7 @@ namespace MWBase
virtual bool toggleSky() = 0; virtual bool toggleSky() = 0;
///< \return Resulting mode ///< \return Resulting mode
virtual void changeWeather(const std::string& region, int id) = 0; virtual void changeWeather(const std::string& region, unsigned int id) = 0;
virtual int getCurrentWeather() const = 0; virtual int getCurrentWeather() const = 0;

View file

@ -31,62 +31,35 @@ namespace
} }
} }
std::string Weather::weatherTypeToStr(Weather::Type type) void WeatherManager::setFallbackWeather(Weather& weather,const std::string& name)
{ {
switch (type) { std::string upper=name;
case Type_Clear: upper[0]=toupper(name[0]);
return "Clear"; weather.mCloudsMaximumPercent = mFallback->getFallbackFloat("Weather_"+upper+"_Clouds_Maximum_Percent");
case Type_Cloudy: weather.mTransitionDelta = mFallback->getFallbackFloat("Weather_"+upper+"_Transition_Delta");
return "Cloudy"; weather.mSkySunriseColor=mFallback->getFallbackColour("Weather_"+upper+"_Sky_Sunrise_Color");
case Type_Foggy: weather.mSkyDayColor = mFallback->getFallbackColour("Weather_"+upper+"_Sky_Day_Color");
return "Foggy"; weather.mSkySunsetColor = mFallback->getFallbackColour("Weather_"+upper+"_Sky_Sunset_Color");
case Type_Overcast: weather.mSkyNightColor = mFallback->getFallbackColour("Weather_"+upper+"_Sky_Night_Color");
return "Overcast"; weather.mFogSunriseColor = mFallback->getFallbackColour("Weather_"+upper+"_Fog_Sunrise_Color");
case Type_Rain: weather.mFogDayColor = mFallback->getFallbackColour("Weather_"+upper+"_Fog_Day_Color");
return "Rain"; weather.mFogSunsetColor = mFallback->getFallbackColour("Weather_"+upper+"_Fog_Sunset_Color");
case Type_Thunderstorm: weather.mFogNightColor = mFallback->getFallbackColour("Weather_"+upper+"_Fog_Night_Color");
return "Thunderstorm"; weather.mAmbientSunriseColor = mFallback->getFallbackColour("Weather_"+upper+"_Ambient_Sunrise_Color");
case Type_Ashstorm: weather.mAmbientDayColor = mFallback->getFallbackColour("Weather_"+upper+"_Ambient_Day_Color");
return "Ashstorm"; weather.mAmbientSunsetColor = mFallback->getFallbackColour("Weather_"+upper+"_Ambient_Sunset_Color");
case Type_Blight: weather.mAmbientNightColor = mFallback->getFallbackColour("Weather_"+upper+"_Ambient_Night_Color");
return "Blight"; weather.mSunSunriseColor = mFallback->getFallbackColour("Weather_"+upper+"_Sun_Sunrise_Color");
case Type_Snow: weather.mSunDayColor = mFallback->getFallbackColour("Weather_"+upper+"_Sun_Day_Color");
return "Snow"; weather.mSunSunsetColor = mFallback->getFallbackColour("Weather_"+upper+"_Sun_Sunset_Color");
case Type_Blizzard: weather.mSunNightColor = mFallback->getFallbackColour("Weather_"+upper+"_Sun_Night_Color");
return "Blizzard"; weather.mSunDiscSunsetColor = mFallback->getFallbackColour("Weather_"+upper+"_Sun_Disc_Sunset_Color");
default: // Type_Unknown weather.mLandFogDayDepth = mFallback->getFallbackFloat("Weather_"+upper+"_Land_Fog_Day_Depth");
return ""; weather.mLandFogNightDepth = mFallback->getFallbackFloat("Weather_"+upper+"_Land_Fog_Night_Depth");
} weather.mWindSpeed = mFallback->getFallbackFloat("Weather_"+upper+"_Wind_Speed");
} weather.mCloudSpeed = mFallback->getFallbackFloat("Weather_"+upper+"_Cloud_Speed");
weather.mGlareView = mFallback->getFallbackFloat("Weather_"+upper+"_Glare_View");
void WeatherManager::setFallbackWeather(Weather& weather, Weather::Type type) mWeatherSettings[name] = weather;
{
const std::string weatherName = Weather::weatherTypeToStr(type);
weather.mCloudsMaximumPercent = mFallback->getFallbackFloat("Weather_"+weatherName+"_Clouds_Maximum_Percent");
weather.mTransitionDelta = mFallback->getFallbackFloat("Weather_"+weatherName+"_Transition_Delta");
weather.mSkySunriseColor= mFallback->getFallbackColour("Weather_"+weatherName+"_Sky_Sunrise_Color");
weather.mSkyDayColor = mFallback->getFallbackColour("Weather_"+weatherName+"_Sky_Day_Color");
weather.mSkySunsetColor = mFallback->getFallbackColour("Weather_"+weatherName+"_Sky_Sunset_Color");
weather.mSkyNightColor = mFallback->getFallbackColour("Weather_"+weatherName+"_Sky_Night_Color");
weather.mFogSunriseColor = mFallback->getFallbackColour("Weather_"+weatherName+"_Fog_Sunrise_Color");
weather.mFogDayColor = mFallback->getFallbackColour("Weather_"+weatherName+"_Fog_Day_Color");
weather.mFogSunsetColor = mFallback->getFallbackColour("Weather_"+weatherName+"_Fog_Sunset_Color");
weather.mFogNightColor = mFallback->getFallbackColour("Weather_"+weatherName+"_Fog_Night_Color");
weather.mAmbientSunriseColor = mFallback->getFallbackColour("Weather_"+weatherName+"_Ambient_Sunrise_Color");
weather.mAmbientDayColor = mFallback->getFallbackColour("Weather_"+weatherName+"_Ambient_Day_Color");
weather.mAmbientSunsetColor = mFallback->getFallbackColour("Weather_"+weatherName+"_Ambient_Sunset_Color");
weather.mAmbientNightColor = mFallback->getFallbackColour("Weather_"+weatherName+"_Ambient_Night_Color");
weather.mSunSunriseColor = mFallback->getFallbackColour("Weather_"+weatherName+"_Sun_Sunrise_Color");
weather.mSunDayColor = mFallback->getFallbackColour("Weather_"+weatherName+"_Sun_Day_Color");
weather.mSunSunsetColor = mFallback->getFallbackColour("Weather_"+weatherName+"_Sun_Sunset_Color");
weather.mSunNightColor = mFallback->getFallbackColour("Weather_"+weatherName+"_Sun_Night_Color");
weather.mSunDiscSunsetColor = mFallback->getFallbackColour("Weather_"+weatherName+"_Sun_Disc_Sunset_Color");
weather.mLandFogDayDepth = mFallback->getFallbackFloat("Weather_"+weatherName+"_Land_Fog_Day_Depth");
weather.mLandFogNightDepth = mFallback->getFallbackFloat("Weather_"+weatherName+"_Land_Fog_Night_Depth");
weather.mWindSpeed = mFallback->getFallbackFloat("Weather_"+weatherName+"_Wind_Speed");
weather.mCloudSpeed = mFallback->getFallbackFloat("Weather_"+weatherName+"_Cloud_Speed");
weather.mGlareView = mFallback->getFallbackFloat("Weather_"+weatherName+"_Glare_View");
mWeatherSettings[type] = weather;
} }
@ -118,10 +91,11 @@ float WeatherManager::calculateAngleFade (const std::string& moonName, float ang
} }
WeatherManager::WeatherManager(MWRender::RenderingManager* rendering,MWWorld::Fallback* fallback) : WeatherManager::WeatherManager(MWRender::RenderingManager* rendering,MWWorld::Fallback* fallback) :
mHour(14), mCurrentWeather(Weather::Type_Clear), mNextWeather(Weather::Type_Unknown), mHour(14), mCurrentWeather("clear"), mNextWeather(""), mFirstUpdate(true),
mFirstUpdate(true), mWeatherUpdateTime(0), mThunderFlash(0), mThunderChance(0), mWeatherUpdateTime(0), mThunderFlash(0), mThunderChance(0),
mThunderChanceNeeded(50), mThunderSoundDelay(0), mRemainingTransitionTime(0), mMonth(0), mDay(0), mThunderChanceNeeded(50), mThunderSoundDelay(0), mRemainingTransitionTime(0),
mTimePassed(0), mFallback(fallback), mWindSpeed(0.f), mRendering(rendering) mMonth(0), mDay(0), mTimePassed(0), mFallback(fallback), mWindSpeed(0.f),
mRendering(rendering)
{ {
//Globals //Globals
mThunderSoundID0 = mFallback->getFallbackString("Weather_Thunderstorm_Thunder_Sound_ID_0"); mThunderSoundID0 = mFallback->getFallbackString("Weather_Thunderstorm_Thunder_Sound_ID_0");
@ -152,53 +126,53 @@ WeatherManager::WeatherManager(MWRender::RenderingManager* rendering,MWWorld::Fa
//Weather //Weather
Weather clear; Weather clear;
clear.mCloudTexture = "tx_sky_clear.dds"; clear.mCloudTexture = "tx_sky_clear.dds";
setFallbackWeather(clear, Weather::Type_Clear); setFallbackWeather(clear,"clear");
Weather cloudy; Weather cloudy;
cloudy.mCloudTexture = "tx_sky_cloudy.dds"; cloudy.mCloudTexture = "tx_sky_cloudy.dds";
setFallbackWeather(cloudy, Weather::Type_Cloudy); setFallbackWeather(cloudy,"cloudy");
Weather foggy; Weather foggy;
foggy.mCloudTexture = "tx_sky_foggy.dds"; foggy.mCloudTexture = "tx_sky_foggy.dds";
setFallbackWeather(foggy, Weather::Type_Foggy); setFallbackWeather(foggy,"foggy");
Weather thunderstorm; Weather thunderstorm;
thunderstorm.mCloudTexture = "tx_sky_thunder.dds"; thunderstorm.mCloudTexture = "tx_sky_thunder.dds";
thunderstorm.mRainLoopSoundID = "rain heavy"; thunderstorm.mRainLoopSoundID = "rain heavy";
setFallbackWeather(thunderstorm, Weather::Type_Thunderstorm); setFallbackWeather(thunderstorm,"thunderstorm");
Weather rain; Weather rain;
rain.mCloudTexture = "tx_sky_rainy.dds"; rain.mCloudTexture = "tx_sky_rainy.dds";
rain.mRainLoopSoundID = "rain"; rain.mRainLoopSoundID = "rain";
setFallbackWeather(rain, Weather::Type_Rain); setFallbackWeather(rain,"rain");
Weather overcast; Weather overcast;
overcast.mCloudTexture = "tx_sky_overcast.dds"; overcast.mCloudTexture = "tx_sky_overcast.dds";
setFallbackWeather(overcast, Weather::Type_Overcast); setFallbackWeather(overcast,"overcast");
Weather ashstorm; Weather ashstorm;
ashstorm.mCloudTexture = "tx_sky_ashstorm.dds"; ashstorm.mCloudTexture = "tx_sky_ashstorm.dds";
ashstorm.mAmbientLoopSoundID = "ashstorm"; ashstorm.mAmbientLoopSoundID = "ashstorm";
setFallbackWeather(ashstorm, Weather::Type_Ashstorm); setFallbackWeather(ashstorm,"ashstorm");
Weather blight; Weather blight;
blight.mCloudTexture = "tx_sky_blight.dds"; blight.mCloudTexture = "tx_sky_blight.dds";
blight.mAmbientLoopSoundID = "blight"; blight.mAmbientLoopSoundID = "blight";
setFallbackWeather(blight, Weather::Type_Blight); setFallbackWeather(blight,"blight");
Weather snow; Weather snow;
snow.mCloudTexture = "tx_bm_sky_snow.dds"; snow.mCloudTexture = "tx_bm_sky_snow.dds";
setFallbackWeather(snow, Weather::Type_Snow); setFallbackWeather(snow, "snow");
Weather blizzard; Weather blizzard;
blizzard.mCloudTexture = "tx_bm_sky_blizzard.dds"; blizzard.mCloudTexture = "tx_bm_sky_blizzard.dds";
blizzard.mAmbientLoopSoundID = "BM Blizzard"; blizzard.mAmbientLoopSoundID = "BM Blizzard";
setFallbackWeather(blizzard, Weather::Type_Blizzard); setFallbackWeather(blizzard,"blizzard");
} }
void WeatherManager::setWeather(Weather::Type weatherType, bool instant) void WeatherManager::setWeather(const String& weather, bool instant)
{ {
if (weatherType == mCurrentWeather && mNextWeather == Weather::Type_Unknown) if (weather == mCurrentWeather && mNextWeather == "")
{ {
mFirstUpdate = false; mFirstUpdate = false;
return; return;
@ -206,25 +180,25 @@ void WeatherManager::setWeather(Weather::Type weatherType, bool instant)
if (instant || mFirstUpdate) if (instant || mFirstUpdate)
{ {
mNextWeather = Weather::Type_Unknown; mNextWeather = "";
mCurrentWeather = weatherType; mCurrentWeather = weather;
} }
else else
{ {
if (mNextWeather != Weather::Type_Unknown) if (mNextWeather != "")
{ {
// transition more than 50% finished? // transition more than 50% finished?
if (mRemainingTransitionTime/(mWeatherSettings[mCurrentWeather].mTransitionDelta * 24.f * 3600) <= 0.5) if (mRemainingTransitionTime/(mWeatherSettings[mCurrentWeather].mTransitionDelta * 24.f * 3600) <= 0.5)
mCurrentWeather = mNextWeather; mCurrentWeather = mNextWeather;
} }
mNextWeather = weatherType; mNextWeather = weather;
mRemainingTransitionTime = mWeatherSettings[mCurrentWeather].mTransitionDelta * 24.f * 3600; mRemainingTransitionTime = mWeatherSettings[mCurrentWeather].mTransitionDelta * 24.f * 3600;
} }
mFirstUpdate = false; mFirstUpdate = false;
} }
void WeatherManager::setResult(Weather::Type weatherType) void WeatherManager::setResult(const String& weatherType)
{ {
const Weather& current = mWeatherSettings[weatherType]; const Weather& current = mWeatherSettings[weatherType];
@ -366,7 +340,7 @@ void WeatherManager::update(float duration)
mCurrentRegion = regionstr; mCurrentRegion = regionstr;
mWeatherUpdateTime = mHoursBetweenWeatherChanges * 3600; mWeatherUpdateTime = mHoursBetweenWeatherChanges * 3600;
Weather::Type weatherType = Weather::Type_Clear; std::string weatherType = "clear";
if (mRegionOverrides.find(regionstr) != mRegionOverrides.end()) if (mRegionOverrides.find(regionstr) != mRegionOverrides.end())
weatherType = mRegionOverrides[regionstr]; weatherType = mRegionOverrides[regionstr];
@ -385,17 +359,17 @@ void WeatherManager::update(float duration)
setWeather(weatherType, false); setWeather(weatherType, false);
} }
if (mNextWeather != Weather::Type_Unknown) if (mNextWeather != "")
{ {
mRemainingTransitionTime -= timePassed; mRemainingTransitionTime -= timePassed;
if (mRemainingTransitionTime < 0) if (mRemainingTransitionTime < 0)
{ {
mCurrentWeather = mNextWeather; mCurrentWeather = mNextWeather;
mNextWeather = Weather::Type_Unknown; mNextWeather = "";
} }
} }
if (mNextWeather != Weather::Type_Unknown) if (mNextWeather != "")
transition(1 - (mRemainingTransitionTime / (mWeatherSettings[mCurrentWeather].mTransitionDelta * 24.f * 3600))); transition(1 - (mRemainingTransitionTime / (mWeatherSettings[mCurrentWeather].mTransitionDelta * 24.f * 3600)));
else else
setResult(mCurrentWeather); setResult(mCurrentWeather);
@ -487,7 +461,7 @@ void WeatherManager::update(float duration)
mRendering->getSkyManager()->secundaDisable(); mRendering->getSkyManager()->secundaDisable();
} }
if (mCurrentWeather == Weather::Type_Thunderstorm && mNextWeather == Weather::Type_Unknown) if (mCurrentWeather == "thunderstorm" && mNextWeather == "")
{ {
if (mThunderFlash > 0) if (mThunderFlash > 0)
{ {
@ -542,7 +516,7 @@ void WeatherManager::update(float duration)
// Play sounds // Play sounds
if (mNextWeather == Weather::Type_Unknown) if (mNextWeather == "")
{ {
std::string ambientSnd = mWeatherSettings[mCurrentWeather].mAmbientLoopSoundID; std::string ambientSnd = mWeatherSettings[mCurrentWeather].mAmbientLoopSoundID;
if (!ambientSnd.empty() && std::find(mSoundsPlaying.begin(), mSoundsPlaying.end(), ambientSnd) == mSoundsPlaying.end()) if (!ambientSnd.empty() && std::find(mSoundsPlaying.begin(), mSoundsPlaying.end(), ambientSnd) == mSoundsPlaying.end())
@ -579,7 +553,7 @@ void WeatherManager::stopSounds(bool stopAll)
} }
} }
Weather::Type WeatherManager::nextWeather(const ESM::Region* region) const Ogre::String WeatherManager::nextWeather(const ESM::Region* region) const
{ {
/* /*
* All probabilities must add to 100 (responsibility of the user). * All probabilities must add to 100 (responsibility of the user).
@ -602,16 +576,36 @@ Weather::Type WeatherManager::nextWeather(const ESM::Region* region) const
int chance = (rand() % 100) + 1; // 1..100 int chance = (rand() % 100) + 1; // 1..100
int sum = 0; int sum = 0;
int i = 0; for (int i = 0; i < 10; ++i)
for (; i < 10; ++i)
{ {
sum += probability[i]; sum += probability[i];
if (chance < sum) if (chance < sum)
{ {
break; switch (i)
{
case 1:
return "cloudy";
case 2:
return "foggy";
case 3:
return "overcast";
case 4:
return "rain";
case 5:
return "thunderstorm";
case 6:
return "ashstorm";
case 7:
return "blight";
case 8:
return "snow";
case 9:
return "blizzard";
default: // case 0
return "clear";
}
} }
} }
return (Weather::Type) i;
} }
void WeatherManager::setHour(const float hour) void WeatherManager::setHour(const float hour)
@ -628,23 +622,66 @@ void WeatherManager::setDate(const int day, const int month)
unsigned int WeatherManager::getWeatherID() const unsigned int WeatherManager::getWeatherID() const
{ {
// Source: http://www.uesp.net/wiki/Tes3Mod:GetCurrentWeather // Source: http://www.uesp.net/wiki/Tes3Mod:GetCurrentWeather
return mCurrentWeather;
if (mCurrentWeather == "clear")
return 0;
else if (mCurrentWeather == "cloudy")
return 1;
else if (mCurrentWeather == "foggy")
return 2;
else if (mCurrentWeather == "overcast")
return 3;
else if (mCurrentWeather == "rain")
return 4;
else if (mCurrentWeather == "thunderstorm")
return 5;
else if (mCurrentWeather == "ashstorm")
return 6;
else if (mCurrentWeather == "blight")
return 7;
else if (mCurrentWeather == "snow")
return 8;
else if (mCurrentWeather == "blizzard")
return 9;
else
return 0;
} }
void WeatherManager::changeWeather(const std::string& region, const int id) void WeatherManager::changeWeather(const std::string& region, const unsigned int id)
{ {
// make sure this region exists // make sure this region exists
MWBase::Environment::get().getWorld()->getStore().get<ESM::Region>().find(region); MWBase::Environment::get().getWorld()->getStore().get<ESM::Region>().find(region);
Weather::Type weatherType = Weather::Type_Clear; std::string weather;
if (id >= Weather::Type_Clear && id < Weather::Type_Unknown) if (id==0)
weatherType = (Weather::Type)id; weather = "clear";
else if (id==1)
weather = "cloudy";
else if (id==2)
weather = "foggy";
else if (id==3)
weather = "overcast";
else if (id==4)
weather = "rain";
else if (id==5)
weather = "thunderstorm";
else if (id==6)
weather = "ashstorm";
else if (id==7)
weather = "blight";
else if (id==8)
weather = "snow";
else if (id==9)
weather = "blizzard";
else
weather = "clear";
mRegionOverrides[Misc::StringUtils::lowerCase(region)] = weatherType; mRegionOverrides[Misc::StringUtils::lowerCase(region)] = weather;
std::string playerRegion = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getCell()->mCell->mRegion; std::string playerRegion = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getCell()->mCell->mRegion;
if (Misc::StringUtils::ciEqual(region, playerRegion)) if (Misc::StringUtils::ciEqual(region, playerRegion))
setWeather(weatherType); setWeather(weather);
} }
float WeatherManager::getWindSpeed() const float WeatherManager::getWindSpeed() const

View file

@ -55,21 +55,6 @@ namespace MWWorld
/// Defines a single weather setting (according to INI) /// Defines a single weather setting (according to INI)
struct Weather struct Weather
{ {
enum Type
{
Type_Clear = 0,
Type_Cloudy,
Type_Foggy,
Type_Overcast,
Type_Rain,
Type_Thunderstorm,
Type_Ashstorm,
Type_Blight,
Type_Snow,
Type_Blizzard,
Type_Unknown
};
Ogre::String mCloudTexture; Ogre::String mCloudTexture;
// Sky (atmosphere) colors // Sky (atmosphere) colors
@ -126,8 +111,6 @@ namespace MWWorld
Ogre::String mRainLoopSoundID; Ogre::String mRainLoopSoundID;
/// \todo disease chance /// \todo disease chance
static std::string weatherTypeToStr(Weather::Type type);
}; };
/// ///
@ -143,7 +126,7 @@ namespace MWWorld
* @param region that should be changed * @param region that should be changed
* @param ID of the weather setting to shift to * @param ID of the weather setting to shift to
*/ */
void changeWeather(const std::string& region, const int id); void changeWeather(const std::string& region, const unsigned int id);
/** /**
* Per-frame update * Per-frame update
@ -171,17 +154,17 @@ namespace MWWorld
int mDay, mMonth; int mDay, mMonth;
float mWindSpeed; float mWindSpeed;
MWWorld::Fallback* mFallback; MWWorld::Fallback* mFallback;
void setFallbackWeather(Weather& weather, Weather::Type type); void setFallbackWeather(Weather& weather,const std::string& name);
MWRender::RenderingManager* mRendering; MWRender::RenderingManager* mRendering;
std::map<Weather::Type, Weather> mWeatherSettings; std::map<Ogre::String, Weather> mWeatherSettings;
std::map<std::string, Weather::Type> mRegionOverrides; std::map<std::string, std::string> mRegionOverrides;
std::vector<std::string> mSoundsPlaying; std::vector<std::string> mSoundsPlaying;
Weather::Type mCurrentWeather; Ogre::String mCurrentWeather;
Weather::Type mNextWeather; Ogre::String mNextWeather;
std::string mCurrentRegion; std::string mCurrentRegion;
@ -196,14 +179,15 @@ namespace MWWorld
double mTimePassed; // time passed since last update double mTimePassed; // time passed since last update
void transition(const float factor); void transition(const float factor);
void setResult(Weather::Type weatherType); void setResult(const Ogre::String& weatherType);
float calculateHourFade (const std::string& moonName) const; float calculateHourFade (const std::string& moonName) const;
float calculateAngleFade (const std::string& moonName, float angle) const; float calculateAngleFade (const std::string& moonName, float angle) const;
void setWeather(Weather::Type weatherType, bool instant=false); void setWeather(const Ogre::String& weatherType, bool instant=false);
Weather::Type nextWeather(const ESM::Region* region) const; Ogre::String nextWeather(const ESM::Region* region) const;
WeatherResult mResult; WeatherResult mResult;
float mSunriseTime; float mSunriseTime;
float mSunsetTime; float mSunsetTime;
float mSunriseDuration; float mSunriseDuration;

View file

@ -1371,7 +1371,7 @@ namespace MWWorld
return mWeatherManager->getWeatherID(); return mWeatherManager->getWeatherID();
} }
void World::changeWeather(const std::string& region, const int id) void World::changeWeather(const std::string& region, const unsigned int id)
{ {
mWeatherManager->changeWeather(region, id); mWeatherManager->changeWeather(region, id);
} }

View file

@ -225,7 +225,7 @@ namespace MWWorld
virtual bool toggleSky(); virtual bool toggleSky();
///< \return Resulting mode ///< \return Resulting mode
virtual void changeWeather (const std::string& region, int id); virtual void changeWeather (const std::string& region, unsigned int id);
virtual int getCurrentWeather() const; virtual int getCurrentWeather() const;