]> git.lizzy.rs Git - minetest.git/blobdiff - src/particles.h
Adding particle blend, glow and animation (#4705)
[minetest.git] / src / particles.h
index dda84385c1bf49df9571b62823153b26506adf71..6d8c6139f2debc8ffb8707421039551a5061dc80 100644 (file)
@@ -30,6 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 struct ClientEvent;
 class ParticleManager;
+class ClientEnvironment;
 
 class Particle : public scene::ISceneNode
 {
@@ -45,10 +46,18 @@ class Particle : public scene::ISceneNode
                float expirationtime,
                float size,
                bool collisiondetection,
+               bool collision_removal,
                bool vertical,
                video::ITexture *texture,
                v2f texpos,
-               v2f texsize
+               v2f texsize,
+               u32 material_type_param,
+               u16 vertical_frame_num,
+               u16 horizontal_frame_num,
+               u16 first_frame,
+               float frame_length,
+               bool loop_animation,
+               u8 glow
        );
        ~Particle();
 
@@ -97,8 +106,15 @@ class Particle : public scene::ISceneNode
        float m_size;
        u8 m_light;
        bool m_collisiondetection;
+       bool m_collision_removal;
        bool m_vertical;
        v3s16 m_camera_offset;
+       u16 m_vertical_frame_num;
+       u16 m_horizontal_frame_num;
+       u16 m_first_frame;
+       float m_frame_length;
+       bool m_loop_animation;
+       u8 m_glow;
 };
 
 class ParticleSpawner
@@ -115,11 +131,20 @@ class ParticleSpawner
                float minexptime, float maxexptime,
                float minsize, float maxsize,
                bool collisiondetection,
+               bool collision_removal,
+               u16 attached_id,
                bool vertical,
                video::ITexture *texture,
                u32 id,
+               u32 material_type_param,
+               u16 vertical_frame_num,
+               u16 horizontal_frame_num,
+               u16 min_first_frame,
+               u16 max_first_frame,
+               float frame_length,
+               bool loop_animation,
+               u8 glow,
                ParticleManager* p_manager);
-
        ~ParticleSpawner();
 
        void step(float dtime, ClientEnvironment *env);
@@ -148,8 +173,17 @@ class ParticleSpawner
        video::ITexture *m_texture;
        std::vector<float> m_spawntimes;
        bool m_collisiondetection;
+       bool m_collision_removal;
        bool m_vertical;
-
+       u16 m_attached_id;
+       u32 m_material_type_param;
+       u16 m_vertical_frame_num;
+       u16 m_horizontal_frame_num;
+       u16 m_min_first_frame;
+       u16 m_max_first_frame;
+       float m_frame_length;
+       bool m_loop_animation;
+       u8 m_glow;
 };
 
 /**