]> git.lizzy.rs Git - minetest.git/blobdiff - src/clouds.h
Face shading: Add shade factor comments
[minetest.git] / src / clouds.h
index a6883a44a2aa6dd5d2cbb245bb495b72cf9b5689..9c6b417866cafd8546164f194f5f1a6b271e80dc 100644 (file)
@@ -22,6 +22,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "irrlichttypes_extrabloated.h"
 #include <iostream>
+#include "constants.h"
+
+// Menu clouds
+class Clouds;
+extern Clouds *g_menuclouds;
+
+// Scene manager used for menu clouds
+namespace irr{namespace scene{class ISceneManager;}}
+extern irr::scene::ISceneManager *g_menucloudsmgr;
 
 class Clouds : public scene::ISceneNode
 {
@@ -44,7 +53,7 @@ class Clouds : public scene::ISceneNode
 
        virtual void render();
        
-       virtual const core::aabbox3d<f32>& getBoundingBox() const
+       virtual const aabb3f &getBoundingBox() const
        {
                return m_box;
        }
@@ -70,12 +79,19 @@ class Clouds : public scene::ISceneNode
        void updateCameraOffset(v3s16 camera_offset)
        {
                m_camera_offset = camera_offset;
+               m_box = aabb3f(-BS * 1000000, m_cloud_y - BS - BS * camera_offset.Y, -BS * 1000000,
+                       BS * 1000000, m_cloud_y + BS - BS * camera_offset.Y, BS * 1000000);
        }
 
+       void readSettings();
+
 private:
        video::SMaterial m_material;
-       core::aabbox3d<f32> m_box;
+       aabb3f m_box;
+       s16 m_passed_cloud_y;
        float m_cloud_y;
+       u16 m_cloud_radius_i;
+       bool m_enable_3d;
        video::SColorf m_color;
        u32 m_seed;
        v2f m_camera_pos;