diff options
Diffstat (limited to 'src/skyparams.h')
-rw-r--r-- | src/skyparams.h | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/src/skyparams.h b/src/skyparams.h index 1de494d69..cabbf531c 100644 --- a/src/skyparams.h +++ b/src/skyparams.h @@ -68,11 +68,34 @@ struct StarParams f32 scale; }; +struct CloudParams +{ + float density; + video::SColor color_bright; + video::SColor color_ambient; + float thickness; + float height; + v2f speed; +}; + // Utility class for setting default sky, sun, moon, stars values: class SkyboxDefaults { public: - const SkyColor getSkyColorDefaults() + static const SkyboxParams getSkyDefaults() + { + SkyboxParams sky; + sky.bgcolor = video::SColor(255, 255, 255, 255); + sky.type = "regular"; + sky.clouds = true; + sky.sky_color = getSkyColorDefaults(); + sky.fog_sun_tint = video::SColor(255, 244, 125, 29); + sky.fog_moon_tint = video::SColorf(0.5, 0.6, 0.8, 1).toSColor(); + sky.fog_tint_type = "default"; + return sky; + } + + static const SkyColor getSkyColorDefaults() { SkyColor sky; // Horizon colors @@ -87,7 +110,7 @@ public: return sky; } - const SunParams getSunDefaults() + static const SunParams getSunDefaults() { SunParams sun; sun.visible = true; @@ -99,7 +122,7 @@ public: return sun; } - const MoonParams getMoonDefaults() + static const MoonParams getMoonDefaults() { MoonParams moon; moon.visible = true; @@ -109,7 +132,7 @@ public: return moon; } - const StarParams getStarDefaults() + static const StarParams getStarDefaults() { StarParams stars; stars.visible = true; @@ -118,4 +141,16 @@ public: stars.scale = 1; return stars; } + + static const CloudParams getCloudDefaults() + { + CloudParams clouds; + clouds.density = 0.4f; + clouds.color_bright = video::SColor(229, 240, 240, 255); + clouds.color_ambient = video::SColor(255, 0, 0, 0); + clouds.thickness = 16.0f; + clouds.height = 120; + clouds.speed = v2f(0.0f, -2.0f); + return clouds; + } }; |