adjust walkout anim length & masked anim blending
[carveJwlIkooP6JGAAIwe30JlM.git] / particle.h
index e4080be6c702e7ceeb45f7cded2f6087a1f7c981..14b2e66e94314199948a92a27d5013e6dc5797ca 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef PARTICLE_H
 #define PARTICLE_H
 
+#include "skaterift.h"
+
 typedef struct particle_system particle_system;
 typedef struct particle particle;
 typedef struct particle_vert particle_vert;
@@ -23,12 +25,27 @@ struct particle_system {
 
    u32 alive, max;
    GLuint vao, vbo, ebo;
+
+   /* render settings */
+   f32 scale, velocity_scale, width;
 }
-static particles_grind;
+static particles_grind = {
+   .scale = 0.02f,
+   .velocity_scale = 0.001f,
+   .width = 0.0125f
+};
+
+static void particle_alloc( particle_system *sys, u32 max );
+static void particle_system_update( particle_system *sys, f32 dt );
+static void particle_system_debug( particle_system *sys );
+static void particle_system_prerender( particle_system *sys );
+static void particle_system_render( particle_system *sys, camera *cam );
 
 static void particle_spawn( particle_system *sys, 
                             v3f co, v3f v, f32 lifetime, u32 colour );
-static void particle_init( particle_system *sys, u32 max );
+static void particle_spawn_cone( particle_system *sys, 
+                                 v3f co, v3f dir, f32 angle, f32 speed, 
+                                 f32 lifetime, u32 colour );
 
 #include "shaders/particle.h"