diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-06-18 12:42:17 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-06-18 12:42:17 +0300 |
commit | 7773e68c2a42659b4a34af56e1fc799ffc9362ed (patch) | |
tree | fad8c7854ec23e17e0a7d27bae35101a2a4ec5f2 /src/farmesh.h | |
parent | 0bd1b782d0134180ae1af692533f1c59e29a03de (diff) | |
download | minetest-7773e68c2a42659b4a34af56e1fc799ffc9362ed.tar.gz minetest-7773e68c2a42659b4a34af56e1fc799ffc9362ed.tar.bz2 minetest-7773e68c2a42659b4a34af56e1fc799ffc9362ed.zip |
farmesh is now usable.
Diffstat (limited to 'src/farmesh.h')
-rw-r--r-- | src/farmesh.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/farmesh.h b/src/farmesh.h index 12f587942..aea806542 100644 --- a/src/farmesh.h +++ b/src/farmesh.h @@ -27,6 +27,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "common_irrlicht.h" +#define FARMESH_MATERIAL_COUNT 2 + +class Client; + class FarMesh : public scene::ISceneNode { public: @@ -34,7 +38,8 @@ public: scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id, - u64 seed + u64 seed, + Client *client ); ~FarMesh(); @@ -52,15 +57,9 @@ public: return m_box; } - virtual u32 getMaterialCount() const - { - return 1; - } + virtual u32 getMaterialCount() const; - virtual video::SMaterial& getMaterial(u32 i) - { - return m_material; - } + virtual video::SMaterial& getMaterial(u32 i); /* Other stuff @@ -71,13 +70,14 @@ public: void update(v2f camera_p, float brightness); private: - video::SMaterial m_material; + video::SMaterial m_materials[FARMESH_MATERIAL_COUNT]; core::aabbox3d<f32> m_box; float m_cloud_y; float m_brightness; - u32 m_seed; + u64 m_seed; v2f m_camera_pos; float m_time; + Client *m_client; }; #endif |