diff options
Diffstat (limited to 'src/client/clouds.h')
-rw-r--r-- | src/client/clouds.h | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/src/client/clouds.h b/src/client/clouds.h index ba371de7d..a4d810faa 100644 --- a/src/client/clouds.h +++ b/src/client/clouds.h @@ -29,19 +29,16 @@ class Clouds; extern Clouds *g_menuclouds; // Scene manager used for menu clouds -namespace irr -{ -namespace scene -{ -class ISceneManager; -} -} +namespace irr{namespace scene{class ISceneManager;}} extern irr::scene::ISceneManager *g_menucloudsmgr; class Clouds : public scene::ISceneNode { public: - Clouds(scene::ISceneManager *mgr, s32 id, u32 seed); + Clouds(scene::ISceneManager* mgr, + s32 id, + u32 seed + ); ~Clouds(); @@ -53,11 +50,20 @@ public: virtual void render(); - virtual const aabb3f &getBoundingBox() const { return m_box; } + virtual const aabb3f &getBoundingBox() const + { + return m_box; + } - virtual u32 getMaterialCount() const { return 1; } + virtual u32 getMaterialCount() const + { + return 1; + } - virtual video::SMaterial &getMaterial(u32 i) { return m_material; } + virtual video::SMaterial& getMaterial(u32 i) + { + return m_material; + } /* Other stuff @@ -97,7 +103,10 @@ public: updateBox(); } - void setSpeed(v2f speed) { m_params.speed = speed; } + void setSpeed(v2f speed) + { + m_params.speed = speed; + } void setThickness(float thickness) { @@ -112,12 +121,10 @@ public: private: void updateBox() { - float height_bs = m_params.height * BS; + float height_bs = m_params.height * BS; float thickness_bs = m_params.thickness * BS; - m_box = aabb3f(-BS * 1000000.0f, height_bs - BS * m_camera_offset.Y, - -BS * 1000000.0f, BS * 1000000.0f, - height_bs + thickness_bs - BS * m_camera_offset.Y, - BS * 1000000.0f); + m_box = aabb3f(-BS * 1000000.0f, height_bs - BS * m_camera_offset.Y, -BS * 1000000.0f, + BS * 1000000.0f, height_bs + thickness_bs - BS * m_camera_offset.Y, BS * 1000000.0f); } bool gridFilled(int x, int y) const; @@ -133,4 +140,5 @@ private: video::SColorf m_color = video::SColorf(1.0f, 1.0f, 1.0f, 1.0f); CloudParams m_params; bool m_camera_inside_cloud = false; + }; |