aboutsummaryrefslogtreecommitdiff
path: root/src/skyparams.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/skyparams.h')
-rw-r--r--src/skyparams.h45
1 files changed, 41 insertions, 4 deletions
diff --git a/src/skyparams.h b/src/skyparams.h
index 1de494d69..f7f694427 100644
--- a/src/skyparams.h
+++ b/src/skyparams.h
@@ -68,11 +68,36 @@ 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()
+ SkyboxDefaults() = delete;
+
+ 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 +112,7 @@ public:
return sky;
}
- const SunParams getSunDefaults()
+ static const SunParams getSunDefaults()
{
SunParams sun;
sun.visible = true;
@@ -99,7 +124,7 @@ public:
return sun;
}
- const MoonParams getMoonDefaults()
+ static const MoonParams getMoonDefaults()
{
MoonParams moon;
moon.visible = true;
@@ -109,7 +134,7 @@ public:
return moon;
}
- const StarParams getStarDefaults()
+ static const StarParams getStarDefaults()
{
StarParams stars;
stars.visible = true;
@@ -118,4 +143,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;
+ }
};