aboutsummaryrefslogtreecommitdiff
path: root/src/client/sky.h
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2022-01-22 13:37:26 +0100
committerHugues Ross <hugues.ross@gmail.com>2022-01-22 11:18:34 -0500
commitf8cef52ea07de6a6ccaa6f9a853a8e5ccaaff4ce (patch)
tree18c6fd04a6e999a82fdc60c94097df6cb8df6d37 /src/client/sky.h
parent37d80784ddfc0ff07baee214570c80dc5dd92ca7 (diff)
downloadminetest-f8cef52ea07de6a6ccaa6f9a853a8e5ccaaff4ce.tar.gz
minetest-f8cef52ea07de6a6ccaa6f9a853a8e5ccaaff4ce.tar.bz2
minetest-f8cef52ea07de6a6ccaa6f9a853a8e5ccaaff4ce.zip
Fix consistency of sky sun/moon texture behaviour
Also cleans up related code somewhat.
Diffstat (limited to 'src/client/sky.h')
-rw-r--r--src/client/sky.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/sky.h b/src/client/sky.h
index 83106453b..3dc057b70 100644
--- a/src/client/sky.h
+++ b/src/client/sky.h
@@ -17,6 +17,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#pragma once
+
#include "irrlichttypes_extrabloated.h"
#include <ISceneNode.h>
#include <array>
@@ -25,8 +27,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "shader.h"
#include "skyparams.h"
-#pragma once
-
#define SKY_MATERIAL_COUNT 12
class ITextureSource;
@@ -77,7 +77,7 @@ public:
void setMoonScale(f32 moon_scale) { m_moon_params.scale = moon_scale; }
void setStarsVisible(bool stars_visible) { m_star_params.visible = stars_visible; }
- void setStarCount(u16 star_count, bool force_update);
+ void setStarCount(u16 star_count);
void setStarColor(video::SColor star_color) { m_star_params.starcolor = star_color; }
void setStarScale(f32 star_scale) { m_star_params.scale = star_scale; updateStars(); }
@@ -150,7 +150,7 @@ private:
bool m_visible = true;
// Used when m_visible=false
video::SColor m_fallback_bg_color = video::SColor(255, 255, 255, 255);
- bool m_first_update = true;
+ bool m_first_update = true; // Set before the sky is updated for the first time
float m_time_of_day;
float m_time_brightness;
bool m_sunlight_seen;
@@ -206,7 +206,6 @@ private:
void draw_stars(video::IVideoDriver *driver, float wicked_time_of_day);
void place_sky_body(std::array<video::S3DVertex, 4> &vertices,
float horizon_position, float day_position);
- void setSkyDefaults();
};
// calculates value for sky body positions for the given observed time of day