1 #ifndef GAME_MWWORLD_WEATHER_H
2 #define GAME_MWWORLD_WEATHER_H
10 #include "../mwbase/soundmanager.hpp"
12 #include "../mwrender/sky.hpp"
17 struct RegionWeatherState;
24 class RenderingManager;
76 const std::string& particleEffect);
132 float calculateThunder(
const float transitionRatio,
const float elapsedSeconds,
const bool isPaused);
149 float thunderChance(
const float transitionRatio,
const float elapsedSeconds)
const;
162 void setChances(
const std::vector<char>& chances);
219 void changeWeather(
const std::string& regionID,
const unsigned int weatherID);
220 void modRegion(
const std::string& regionID,
const std::vector<char>& chances);
228 void update(
float duration,
bool paused =
false);
296 const std::string& particleEffect =
"");
315 #endif // GAME_MWWORLD_WEATHER_H
void addWeather(const std::string &name, const Fallback::Map &fallback, const std::string &particleEffect="")
Definition: weather.cpp:865
void calculateTransitionResult(const float factor, const float gameHour)
Definition: weather.cpp:1096
void calculateWeatherResult(const float gameHour, const float elapsedSeconds, const bool isPaused)
Definition: weather.cpp:1007
float mTransitionDelta
Definition: weather.hpp:135
TimeOfDayInterpolator< float > mNightFade
Definition: weather.hpp:264
float mMoonShadowEarlyFadeAngle
Definition: weather.hpp:193
osg::Vec4f mSunDiscSunsetColor
Definition: weather.hpp:93
void stopSounds()
Definition: weather.cpp:742
float mFadeInStart
Definition: weather.hpp:184
bool isDark() const
Definition: weather.cpp:778
float mWindSpeed
Definition: weather.hpp:276
float angle(const TimeStamp &gameTime) const
Definition: weather.cpp:366
TimeOfDayInterpolator< osg::Vec4f > mFogColor
Definition: weather.hpp:83
void setWeather(int weatherID)
Definition: weather.cpp:295
float mThunderThreshold
Definition: weather.hpp:142
void changeWeather(const std::string ®ionID, const unsigned int weatherID)
Definition: weather.cpp:570
T getValue(const float gameHour, const TimeOfDaySettings &timeSettings) const
Definition: weather.cpp:47
float mRainSpeed
Definition: weather.hpp:117
std::vector< char > mChances
Definition: weather.hpp:170
float shadowBlend(float angle) const
Definition: weather.cpp:440
float mRainSpeed
Definition: weather.hpp:267
Definition: renderingmanager.hpp:63
MoonModel mMasser
Definition: weather.hpp:273
T mNightValue
Definition: weather.hpp:65
Definition: esmreader.hpp:21
TimeOfDaySettings mTimeSettings
Definition: weather.hpp:261
int mNextWeather
Definition: weather.hpp:286
unsigned int phase(const TimeStamp &gameTime) const
Definition: weather.cpp:427
osg::Vec3f getStormDirection() const
Definition: weather.cpp:760
float mGlareView
Definition: weather.hpp:103
MWWorld::ESMStore & mStore
Definition: weather.hpp:253
MWBase::SoundPtr mAmbientSound
Definition: weather.hpp:291
contains settings imported from the Morrowind INI file.
Definition: fallback.hpp:12
unsigned int getWeatherID() const
Definition: weather.cpp:773
TimeOfDayInterpolator< float > mUnderwaterFog
Definition: weather.hpp:270
float mDayStart
Definition: weather.hpp:46
Definition: weather.hpp:54
MWRender::RenderingManager & mRendering
Definition: weather.hpp:254
TimeOfDayInterpolator< osg::Vec4f > mSkyColor
Definition: weather.hpp:81
float rotation(float hours) const
Definition: weather.cpp:419
MWRender::MoonState calculateState(const TimeStamp &gameTime) const
Definition: weather.cpp:351
osg::Vec3f mStormDirection
Definition: weather.hpp:278
Definition: loadregn.hpp:19
bool readRecord(ESM::ESMReader &reader, uint32_t type)
Definition: weather.cpp:809
MoonModel mSecunda
Definition: weather.hpp:274
float mSunsetTime
Definition: weather.hpp:256
Definition: loadinglistener.hpp:8
void clear()
Definition: weather.cpp:853
void playerTeleported()
Definition: weather.cpp:611
float mSunsetDuration
Definition: weather.hpp:258
void lightningAndThunder(void)
Definition: weather.cpp:229
float mNightStart
Definition: weather.hpp:44
bool mIsStorm
Definition: weather.hpp:277
bool inTransition()
Definition: weather.cpp:984
int mCurrentWeather
Definition: weather.hpp:285
std::map< std::string, RegionWeather > mRegions
Definition: weather.hpp:288
std::string mPlayingSoundID
Definition: weather.hpp:292
Definition: esmwriter.hpp:17
int mWeather
Definition: weather.hpp:169
int getWeather()
Definition: weather.cpp:300
float mFlashBrightness
Definition: weather.hpp:146
float earlyMoonShadowAlpha(float angle) const
Definition: weather.cpp:482
Definition: esmstore.hpp:17
float mWeatherUpdateTime
Definition: weather.hpp:283
void updateWeatherTransitions(const float elapsedRealSeconds)
Definition: weather.cpp:932
int mQueuedWeather
Definition: weather.hpp:287
std::vector< Weather > mWeatherSettings
Definition: weather.hpp:272
TimeOfDayInterpolator(const T &sunrise, const T &day, const T &sunset, const T &night)
Definition: weather.hpp:57
std::string mAmbientLoopSoundID
Definition: weather.hpp:107
float mFadeOutStart
Definition: weather.hpp:186
float hourlyAlpha(float gameHour) const
Definition: weather.cpp:463
float mTransitionFactor
Definition: weather.hpp:284
TimeOfDayInterpolator< osg::Vec4f > mSunColor
Definition: weather.hpp:87
float mWindSpeed
Definition: weather.hpp:96
void regionalWeatherChanged(const std::string ®ionID, RegionWeather ®ion)
Definition: weather.cpp:886
bool mIsStorm
Definition: weather.hpp:113
float moonRiseHour(unsigned int daysPassed) const
Definition: weather.cpp:405
MoonModel(const std::string &name, const Fallback::Map &fallback)
Definition: weather.cpp:334
float mFadeStartAngle
Definition: weather.hpp:191
T mDayValue
Definition: weather.hpp:65
A class that acts as a model for the moons.
Definition: weather.hpp:176
float mNightEnd
Definition: weather.hpp:45
float mDayEnd
Definition: weather.hpp:47
void calculateResult(const int weatherID, const float gameHour)
Definition: weather.cpp:1035
bool updateWeatherTime()
Definition: weather.cpp:899
In-game time stamp.
Definition: timestamp.hpp:14
float getWindSpeed() const
Definition: weather.cpp:750
std::string mCurrentRegion
Definition: weather.hpp:280
bool mFastForward
Definition: weather.hpp:282
float calculateThunder(const float transitionRatio, const float elapsedSeconds, const bool isPaused)
Definition: weather.cpp:187
bool updateWeatherRegion(const std::string &playerRegion)
Definition: weather.cpp:920
float mTimePassed
Definition: weather.hpp:281
Defines a single weather setting (according to INI)
Definition: weather.hpp:69
float mSpeed
Definition: weather.hpp:189
float mSunriseTime
Definition: weather.hpp:48
float mThunderFrequency
Definition: weather.hpp:141
float mFadeInFinish
Definition: weather.hpp:185
Definition: weatherstate.hpp:13
void addWeatherTransition(const int weatherID)
Definition: weather.cpp:989
float mFlashDecrement
Definition: weather.hpp:144
float mSunriseDuration
Definition: weather.hpp:257
bool isInStorm() const
Are we in an ash or blight storm?
Definition: weather.cpp:755
Interface for weather settings.
Definition: weather.hpp:205
void update(float duration, bool paused=false)
Definition: weather.cpp:628
float mFadeEndAngle
Definition: weather.hpp:192
~WeatherManager()
Definition: weather.cpp:565
std::string mThunderSoundID[4]
Definition: weather.hpp:143
float mDailyIncrement
Definition: weather.hpp:190
void write(ESM::ESMWriter &writer, Loading::Listener &progress)
Definition: weather.cpp:786
WeatherManager(MWRender::RenderingManager &rendering, const Fallback::Map &fallback, MWWorld::ESMStore &store)
Definition: weather.cpp:503
void advanceTime(double hours, bool incremental)
Definition: weather.cpp:765
T mSunsetValue
Definition: weather.hpp:65
float mCloudSpeed
Definition: weather.hpp:99
float cloudBlendFactor(const float transitionRatio) const
Definition: weather.cpp:181
float transitionDelta() const
Definition: weather.cpp:174
void importRegions()
Definition: weather.cpp:876
float mSunPreSunsetTime
Definition: weather.hpp:259
boost::shared_ptr< MWSound::Sound > SoundPtr
Definition: soundmanager.hpp:25
Definition: weather.hpp:42
RegionWeather(const ESM::Region ®ion)
Definition: weather.cpp:241
float thunderChance(const float transitionRatio, const float elapsedSeconds) const
Definition: weather.cpp:219
float mFadeOutFinish
Definition: weather.hpp:187
std::string mCloudTexture
Definition: weather.hpp:78
TimeOfDayInterpolator< osg::Vec4f > mAmbientColor
Definition: weather.hpp:85
std::string mRainEffect
Definition: weather.hpp:124
float mHoursBetweenWeatherChanges
Definition: weather.hpp:266
float mAxisOffset
Definition: weather.hpp:188
void chooseNewWeather()
Definition: weather.cpp:312
float mSunriseTime
Definition: weather.hpp:255
void flashDecrement(const float elapsedSeconds)
Definition: weather.cpp:211
std::string mParticleEffect
Definition: weather.hpp:122
void modRegion(const std::string ®ionID, const std::vector< char > &chances)
Definition: weather.cpp:592
float mCloudsMaximumPercent
Definition: weather.hpp:136
T mSunriseValue
Definition: weather.hpp:65
MWRender::WeatherResult mResult
Definition: weather.hpp:289
float mRainFrequency
Definition: weather.hpp:120
TimeOfDayInterpolator< float > mLandFogDepth
Definition: weather.hpp:90
A class for storing a region's weather.
Definition: weather.hpp:154
const char * name
Definition: crashcatcher.cpp:59
Weather(const std::string &name, const Fallback::Map &fallback, float stormWindSpeed, float rainSpeed, const std::string &particleEffect)
Definition: weather.cpp:102
void setChances(const std::vector< char > &chances)
Definition: weather.cpp:275
void forceWeather(const int weatherID)
Definition: weather.cpp:976