1 #ifndef GAME_MWWORLD_WEATHER_H
2 #define GAME_MWWORLD_WEATHER_H
12 #include "../mwbase/soundmanager.hpp"
14 #include "../mwrender/sky.hpp"
19 struct RegionWeatherState;
26 class RenderingManager;
73 return { 1.f, 1.f, 1.f, 1.f };
113 float stormWindSpeed,
117 const std::string& particleEffect);
179 float calculateThunder(
const float transitionRatio,
const float elapsedSeconds,
const bool isPaused);
196 float thunderChance(
const float transitionRatio,
const float elapsedSeconds)
const;
209 void setChances(
const std::vector<char>& chances);
266 void changeWeather(
const std::string& regionID,
const unsigned int weatherID);
267 void modRegion(
const std::string& regionID,
const std::vector<char>& chances);
275 void update(
float duration,
bool paused,
const TimeStamp& time,
bool isExterior);
343 float dlFactor,
float dlOffset,
344 const std::string& particleEffect =
"");
363 #endif // GAME_MWWORLD_WEATHER_H
float mStarsFadingDuration
Definition: weather.hpp:62
void addWeather(const std::string &name, const Fallback::Map &fallback, float dlFactor, float dlOffset, const std::string &particleEffect="")
Definition: weather.cpp:912
void calculateTransitionResult(const float factor, const float gameHour)
Definition: weather.cpp:1153
void calculateWeatherResult(const float gameHour, const float elapsedSeconds, const bool isPaused)
Definition: weather.cpp:1055
float mTransitionDelta
Definition: weather.hpp:182
TimeOfDayInterpolator< float > mNightFade
Definition: weather.hpp:310
float mMoonShadowEarlyFadeAngle
Definition: weather.hpp:240
osg::Vec4f mSunDiscSunsetColor
Definition: weather.hpp:134
void stopSounds()
Definition: weather.cpp:790
float mStarsPostSunsetStart
Definition: weather.hpp:60
float mFadeInStart
Definition: weather.hpp:231
float mPreSunriseTime
Definition: weather.hpp:45
float mWindSpeed
Definition: weather.hpp:322
float angle(const TimeStamp &gameTime) const
Definition: weather.cpp:386
TimeOfDayInterpolator< osg::Vec4f > mFogColor
Definition: weather.hpp:124
void setWeather(int weatherID)
Definition: weather.cpp:315
float mThunderThreshold
Definition: weather.hpp:189
void changeWeather(const std::string ®ionID, const unsigned int weatherID)
Definition: weather.cpp:611
float mRainSpeed
Definition: weather.hpp:164
std::vector< char > mChances
Definition: weather.hpp:217
float shadowBlend(float angle) const
Definition: weather.cpp:460
Definition: weather.hpp:43
float mRainSpeed
Definition: weather.hpp:313
Definition: renderingmanager.hpp:72
MoonModel mMasser
Definition: weather.hpp:319
T mNightValue
Definition: weather.hpp:104
Definition: esmreader.hpp:21
TimeOfDaySettings mTimeSettings
Definition: weather.hpp:307
WeatherSetting getSetting(const std::string &type) const
Definition: weather.hpp:64
void update(float duration, bool paused, const TimeStamp &time, bool isExterior)
Definition: weather.cpp:666
int mNextWeather
Definition: weather.hpp:333
unsigned int phase(const TimeStamp &gameTime) const
Definition: weather.cpp:447
osg::Vec3f getStormDirection() const
Definition: weather.cpp:808
float mGlareView
Definition: weather.hpp:144
MWWorld::ESMStore & mStore
Definition: weather.hpp:299
float mPostSunsetTime
Definition: weather.hpp:48
contains settings imported from the Morrowind INI file.
Definition: fallback.hpp:12
unsigned int getWeatherID() const
Definition: weather.cpp:821
TimeOfDayInterpolator< float > mUnderwaterFog
Definition: weather.hpp:316
float mDayStart
Definition: weather.hpp:55
Definition: weather.hpp:93
MWRender::RenderingManager & mRendering
Definition: weather.hpp:300
TimeOfDayInterpolator< osg::Vec4f > mSkyColor
Definition: weather.hpp:122
float rotation(float hours) const
Definition: weather.cpp:439
MWRender::MoonState calculateState(const TimeStamp &gameTime) const
Definition: weather.cpp:371
osg::Vec3f mStormDirection
Definition: weather.hpp:325
float getFallbackFloat(const std::string &fall) const
Definition: fallback.cpp:25
Definition: loadregn.hpp:19
bool readRecord(ESM::ESMReader &reader, uint32_t type)
Definition: weather.cpp:856
MoonModel mSecunda
Definition: weather.hpp:320
float mSunsetTime
Definition: weather.hpp:302
Definition: loadinglistener.hpp:8
void clear()
Definition: weather.cpp:900
float mSunsetDuration
Definition: weather.hpp:304
bool useTorches(float hour) const
Definition: weather.cpp:826
void lightningAndThunder(void)
Definition: weather.cpp:249
float mNightStart
Definition: weather.hpp:53
bool mIsStorm
Definition: weather.hpp:323
bool inTransition()
Definition: weather.cpp:1032
int mCurrentWeather
Definition: weather.hpp:332
std::map< std::string, RegionWeather > mRegions
Definition: weather.hpp:335
std::string mPlayingSoundID
Definition: weather.hpp:339
void playerTeleported(const std::string &playerRegion, bool isExterior)
Definition: weather.cpp:652
Definition: esmwriter.hpp:17
int mWeather
Definition: weather.hpp:216
float FogOffset
Definition: weather.hpp:149
int getWeather()
Definition: weather.cpp:320
float FogFactor
Definition: weather.hpp:148
float mFlashBrightness
Definition: weather.hpp:193
float earlyMoonShadowAlpha(float angle) const
Definition: weather.cpp:502
Definition: esmstore.hpp:17
float mWeatherUpdateTime
Definition: weather.hpp:330
void updateWeatherTransitions(const float elapsedRealSeconds)
Definition: weather.cpp:980
int mQueuedWeather
Definition: weather.hpp:334
float mPostSunriseTime
Definition: weather.hpp:46
std::vector< Weather > mWeatherSettings
Definition: weather.hpp:318
Weather(const std::string &name, const Fallback::Map &fallback, float stormWindSpeed, float rainSpeed, float dlFactor, float dlOffset, const std::string &particleEffect)
Definition: weather.cpp:118
TimeOfDayInterpolator(const T &sunrise, const T &day, const T &sunset, const T &night)
Definition: weather.hpp:96
std::string mAmbientLoopSoundID
Definition: weather.hpp:154
float mFadeOutStart
Definition: weather.hpp:233
float hourlyAlpha(float gameHour) const
Definition: weather.cpp:483
std::map< std::string, WeatherSetting > mSunriseTransitions
Definition: weather.hpp:58
float mTransitionFactor
Definition: weather.hpp:331
struct MWWorld::Weather::@5 mDL
TimeOfDayInterpolator< osg::Vec4f > mSunColor
Definition: weather.hpp:128
float mWindSpeed
Definition: weather.hpp:137
void regionalWeatherChanged(const std::string ®ionID, RegionWeather ®ion)
Definition: weather.cpp:934
bool mIsStorm
Definition: weather.hpp:160
float moonRiseHour(unsigned int daysPassed) const
Definition: weather.cpp:425
MoonModel(const std::string &name, const Fallback::Map &fallback)
Definition: weather.cpp:354
float mFadeStartAngle
Definition: weather.hpp:238
T mDayValue
Definition: weather.hpp:104
A class that acts as a model for the moons.
Definition: weather.hpp:223
float mNightEnd
Definition: weather.hpp:54
float mDayEnd
Definition: weather.hpp:56
void calculateResult(const int weatherID, const float gameHour)
Definition: weather.cpp:1083
bool updateWeatherTime()
Definition: weather.cpp:947
void addSetting(const Fallback::Map &fallback, const std::string &type)
Definition: weather.hpp:77
In-game time stamp.
Definition: timestamp.hpp:14
float getWindSpeed() const
Definition: weather.cpp:798
std::string mCurrentRegion
Definition: weather.hpp:327
bool mFastForward
Definition: weather.hpp:329
T getValue(const float gameHour, const TimeOfDaySettings &timeSettings, const std::string &prefix) const
Definition: weather.cpp:45
float calculateThunder(const float transitionRatio, const float elapsedSeconds, const bool isPaused)
Definition: weather.cpp:207
bool updateWeatherRegion(const std::string &playerRegion)
Definition: weather.cpp:968
float mTimePassed
Definition: weather.hpp:328
Defines a single weather setting (according to INI)
Definition: weather.hpp:108
float mSpeed
Definition: weather.hpp:236
float mThunderFrequency
Definition: weather.hpp:188
float mPreSunsetTime
Definition: weather.hpp:47
float mFadeInFinish
Definition: weather.hpp:232
Definition: weatherstate.hpp:13
void addWeatherTransition(const int weatherID)
Definition: weather.cpp:1037
float mFlashDecrement
Definition: weather.hpp:191
float mSunriseDuration
Definition: weather.hpp:303
bool isInStorm() const
Are we in an ash or blight storm?
Definition: weather.cpp:803
Interface for weather settings.
Definition: weather.hpp:252
MWBase::Sound * mAmbientSound
Definition: weather.hpp:338
float mFadeEndAngle
Definition: weather.hpp:239
~WeatherManager()
Definition: weather.cpp:606
std::string mThunderSoundID[4]
Definition: weather.hpp:190
float mDailyIncrement
Definition: weather.hpp:237
void write(ESM::ESMWriter &writer, Loading::Listener &progress)
Definition: weather.cpp:833
WeatherManager(MWRender::RenderingManager &rendering, const Fallback::Map &fallback, MWWorld::ESMStore &store)
Definition: weather.cpp:523
void advanceTime(double hours, bool incremental)
Definition: weather.cpp:813
T mSunsetValue
Definition: weather.hpp:104
float mCloudSpeed
Definition: weather.hpp:140
float cloudBlendFactor(const float transitionRatio) const
Definition: weather.cpp:201
float transitionDelta() const
Definition: weather.cpp:194
bool mPrecipitation
Definition: weather.hpp:324
void importRegions()
Definition: weather.cpp:924
float mStarsPreSunriseFinish
Definition: weather.hpp:61
float mSunPreSunsetTime
Definition: weather.hpp:305
Definition: weather.hpp:51
RegionWeather(const ESM::Region ®ion)
Definition: weather.cpp:261
float thunderChance(const float transitionRatio, const float elapsedSeconds) const
Definition: weather.cpp:239
float mFadeOutFinish
Definition: weather.hpp:234
std::string mCloudTexture
Definition: weather.hpp:119
TimeOfDayInterpolator< osg::Vec4f > mAmbientColor
Definition: weather.hpp:126
std::string mRainEffect
Definition: weather.hpp:171
float mHoursBetweenWeatherChanges
Definition: weather.hpp:312
float mAxisOffset
Definition: weather.hpp:235
void chooseNewWeather()
Definition: weather.cpp:332
float mSunriseTime
Definition: weather.hpp:301
void flashDecrement(const float elapsedSeconds)
Definition: weather.cpp:231
std::string mParticleEffect
Definition: weather.hpp:169
void modRegion(const std::string ®ionID, const std::vector< char > &chances)
Definition: weather.cpp:633
float mCloudsMaximumPercent
Definition: weather.hpp:183
T mSunriseValue
Definition: weather.hpp:104
MWRender::WeatherResult mResult
Definition: weather.hpp:336
float mRainFrequency
Definition: weather.hpp:167
TimeOfDayInterpolator< float > mLandFogDepth
Definition: weather.hpp:131
A class for storing a region's weather.
Definition: weather.hpp:201
const char * name
Definition: crashcatcher.cpp:67
void setChances(const std::vector< char > &chances)
Definition: weather.cpp:295
void forceWeather(const int weatherID)
Definition: weather.cpp:1024