1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 05:23:51 +00:00

adding ini values for 'cloudy' and 'clear'

This commit is contained in:
scrawl 2012-02-22 20:39:14 +01:00
parent 1badb5d04f
commit ce98397565
2 changed files with 145 additions and 21 deletions

View file

@ -12,21 +12,73 @@ WeatherManager::WeatherManager(MWRender::RenderingManager* rendering) :
{ {
mRendering = rendering; mRendering = rendering;
#define clr(r,g,b) ColourValue(r/255.f, g/255.f, b/255.f)
/// \todo read these from Morrowind.ini /// \todo read these from Morrowind.ini
Weather clear; Weather clear;
clear.mCloudTexture = "tx_sky_clear.dds"; clear.mCloudTexture = "tx_sky_clear.dds";
clear.mCloudsMaximumPercent = 0.75; clear.mCloudsMaximumPercent = 1.0;
clear.mTransitionDelta = 0.15;
clear.mSkySunriseColor = clr(118, 141, 164);
clear.mSkyDayColor = clr(95, 135, 203);
clear.mSkySunsetColor = clr(56, 89, 129);
clear.mSkyNightColor = clr(9, 10, 11);
clear.mFogSunriseColor = clr(255, 189, 157);
clear.mFogDayColor = clr(206, 227, 255);
clear.mFogSunsetColor = clr(255, 189, 157);
clear.mFogNightColor = clr(9, 10, 11);
clear.mAmbientSunriseColor = clr(47, 66, 96);
clear.mAmbientDayColor = clr(137, 140, 160);
clear.mAmbientSunsetColor = clr(68, 75, 96);
clear.mAmbientNightColor = clr(32, 35, 42);
clear.mSunSunriseColor = clr(242, 159, 99);
clear.mSunDayColor = clr(255, 252, 238);
clear.mSunSunsetColor = clr(255, 115, 79);
clear.mSunNightColor = clr(59, 97, 176);
clear.mSunDiscSunsetColour = clr(255, 189, 157);
clear.mLandFogDayDepth = 0.69;
clear.mLandFogNightDepth = 0.69;
clear.mWindSpeed = 0.1;
clear.mCloudSpeed = 1.25;
clear.mGlareView = 1.0;
mWeatherSettings["clear"] = clear; mWeatherSettings["clear"] = clear;
Weather cloudy; Weather cloudy;
cloudy.mCloudTexture = "tx_sky_cloudy.dds"; cloudy.mCloudTexture = "tx_sky_cloudy.dds";
cloudy.mCloudsMaximumPercent = 0.9; cloudy.mCloudsMaximumPercent = 1.0;
cloudy.mTransitionDelta = 0.15;
cloudy.mSkySunriseColor = clr(126, 158, 173);
cloudy.mSkyDayColor = clr(117, 160, 215);
cloudy.mSkySunsetColor = clr(111, 114, 159);
cloudy.mSkyNightColor = clr(9, 10, 11);
cloudy.mFogSunriseColor = clr(255, 207, 149);
cloudy.mFogDayColor = clr(245, 235, 224);
cloudy.mFogSunsetColor = clr(255, 155, 106);
cloudy.mFogNightColor = clr(9, 10, 11);
cloudy.mAmbientSunriseColor = clr(66, 74, 87);
cloudy.mAmbientDayColor = clr(137, 145, 160);
cloudy.mAmbientSunsetColor = clr(71, 80, 92);
cloudy.mAmbientNightColor = clr(32, 39, 54);
cloudy.mSunSunriseColor = clr(241, 177, 99);
cloudy.mSunDayColor = clr(255, 236, 221);
cloudy.mSunSunsetColor = clr(255, 89, 00);
cloudy.mSunNightColor = clr(77, 91, 124);
cloudy.mSunDiscSunsetColour = clr(255, 202, 179);
cloudy.mLandFogDayDepth = 0.72;
cloudy.mLandFogNightDepth = 0.72;
cloudy.mWindSpeed = 0.2;
cloudy.mCloudSpeed = 2;
cloudy.mGlareView = 1.0;
mWeatherSettings["cloudy"] = cloudy; mWeatherSettings["cloudy"] = cloudy;
/*
Weather overcast; Weather overcast;
overcast.mCloudTexture = "tx_sky_overcast.dds"; overcast.mCloudTexture = "tx_sky_overcast.dds";
overcast.mCloudsMaximumPercent = 1.0; overcast.mCloudsMaximumPercent = 1.0;
mWeatherSettings["overcast"] = overcast; mWeatherSettings["overcast"] = overcast;
*/
setWeather("clear", true); setWeather("clear", true);
setWeather("cloudy", false); setWeather("cloudy", false);

View file

@ -11,6 +11,74 @@ namespace MWRender
namespace MWWorld namespace MWWorld
{ {
/// Global weather manager properties (according to INI)
struct WeatherGlobals
{
/*
EnvReduceColor=255,255,255,255
LerpCloseColor=037,046,048,255
BumpFadeColor=230,239,255,255
AlphaReduce=0.35
Minimum Time Between Environmental Sounds=1.0
Maximum Time Between Environmental Sounds=5.0
Sun Glare Fader Max=0.5
Sun Glare Fader Angle Max=30.0
Sun Glare Fader Color=222,095,039
Timescale Clouds=0
Precip Gravity=575
Hours Between Weather Changes=20
Rain Ripples=1
Rain Ripple Radius=1024
Rain Ripples Per Drop=1
Rain Ripple Scale=0.3
Rain Ripple Speed=1.0
Fog Depth Change Speed=3
Sunrise Time=6
Sunset Time=18
Sunrise Duration=2
Sunset Duration=2
Sky Pre-Sunrise Time=.5
Sky Post-Sunrise Time=1
Sky Pre-Sunset Time=1.5
Sky Post-Sunset Time=.5
Ambient Pre-Sunrise Time=.5
Ambient Post-Sunrise Time=2
Ambient Pre-Sunset Time=1
Ambient Post-Sunset Time=1.25
Fog Pre-Sunrise Time=.5
Fog Post-Sunrise Time=1
Fog Pre-Sunset Time=2
Fog Post-Sunset Time=1
Sun Pre-Sunrise Time=0
Sun Post-Sunrise Time=0
Sun Pre-Sunset Time=1
Sun Post-Sunset Time=1.25
Stars Post-Sunset Start=1
Stars Pre-Sunrise Finish=2
Stars Fading Duration=2
Snow Ripples=0
Snow Ripple Radius=1024
Snow Ripples Per Flake=1
Snow Ripple Scale=0.3
Snow Ripple Speed=1.0
Snow Gravity Scale=0.1
Snow High Kill=700
Snow Low Kill=150
*/
float mSunriseTime,
mSunsetTime,
mSunriseDuration,
mSunsetDuration;
WeatherGlobals() :
mSunriseTime(8),
mSunsetTime(18),
mSunriseDuration(2),
mSunsetDuration(2)
{};
};
/// Defines the actual weather that results from weather setting (see below), time of day and weather transition /// Defines the actual weather that results from weather setting (see below), time of day and weather transition
struct WeatherResult struct WeatherResult
{ {
@ -40,38 +108,38 @@ namespace MWWorld
}; };
/// Defines a single weather setting /// Defines a single weather setting (according to INI)
struct Weather struct Weather
{ {
Ogre::String mCloudTexture; Ogre::String mCloudTexture;
// Sky (atmosphere) colors // Sky (atmosphere) colors
Ogre::ColourValue mSkySunriseColor; Ogre::ColourValue mSkySunriseColor,
Ogre::ColourValue mSkyDayColor; mSkyDayColor,
Ogre::ColourValue mSkySunsetColor; mSkySunsetColor,
Ogre::ColourValue mSkyNightColor; mSkyNightColor;
// Fog colors // Fog colors
Ogre::ColourValue mFogSunriseColor; Ogre::ColourValue mFogSunriseColor,
Ogre::ColourValue mFogDayColor; mFogDayColor,
Ogre::ColourValue mFogSunsetColor; mFogSunsetColor,
Ogre::ColourValue mFogNightColor; mFogNightColor;
// Ambient lighting colors // Ambient lighting colors
Ogre::ColourValue mAmbientSunriseColor; Ogre::ColourValue mAmbientSunriseColor,
Ogre::ColourValue mAmbientDayColor; mAmbientDayColor,
Ogre::ColourValue mAmbientSunsetColor; mAmbientSunsetColor,
Ogre::ColourValue mAmbientNightColor; mAmbientNightColor;
// Sun (directional) lighting colors // Sun (directional) lighting colors
Ogre::ColourValue mSunSunriseColor; Ogre::ColourValue mSunSunriseColor,
Ogre::ColourValue mSunDayColor; mSunDayColor,
Ogre::ColourValue mSunSunsetColor; mSunSunsetColor,
Ogre::ColourValue mSunNightColor; mSunNightColor;
// Fog depth/density // Fog depth/density
float mLandFogDayDepth; float mLandFogDayDepth,
float mLandFogNightDepth; mLandFogNightDepth;
// Color modulation for the sun itself during sunset (not completely sure) // Color modulation for the sun itself during sunset (not completely sure)
Ogre::ColourValue mSunDiscSunsetColour; Ogre::ColourValue mSunDiscSunsetColour;
@ -95,6 +163,10 @@ namespace MWWorld
// Sound effect // Sound effect
// This is used for Blight, Ashstorm and Blizzard (Bloodmoon) // This is used for Blight, Ashstorm and Blizzard (Bloodmoon)
Ogre::String mAmbientLoopSoundID; Ogre::String mAmbientLoopSoundID;
/// \todo rain, thunder, ashstorm...
/// \todo disease chance
}; };
/// ///