X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=particle.h;h=6858890522fa7f5d183a632759e8f09498f4e699;hb=5f6a4f9df6c8accc89f1920bfe9ace3cbac4c4b6;hp=fb4d27f1bbdff659cdfe76bb12d1e5d170f9dfe2;hpb=a109f126d8adab622e38fbcc2d4281e75255246a;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/particle.h b/particle.h index fb4d27f..6858890 100644 --- a/particle.h +++ b/particle.h @@ -1,6 +1,4 @@ -#ifndef PARTICLE_H -#define PARTICLE_H - +#pragma once #include "skaterift.h" typedef struct particle_system particle_system; @@ -29,29 +27,16 @@ struct particle_system { /* render settings */ f32 scale, velocity_scale, width; } -static particles_grind = { - .scale = 0.02f, - .velocity_scale = 0.001f, - .width = 0.0125f -}, -particles_env = { - .scale = 0.04f, - .velocity_scale = 0.001f, - .width = 0.25f -}; - -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_spawn_cone( particle_system *sys, - v3f co, v3f dir, f32 angle, f32 speed, - f32 lifetime, u32 colour ); - -#include "shaders/particle.h" - -#endif /* PARTICLE_H */ +extern particles_grind, particles_env; + +void particle_alloc( particle_system *sys, u32 max ); +void particle_system_update( particle_system *sys, f32 dt ); +void particle_system_debug( particle_system *sys ); +void particle_system_prerender( particle_system *sys ); +void particle_system_render( particle_system *sys, vg_camera *cam ); + +void particle_spawn( particle_system *sys, + v3f co, v3f v, f32 lifetime, u32 colour ); +void particle_spawn_cone( particle_system *sys, + v3f co, v3f dir, f32 angle, f32 speed, + f32 lifetime, u32 colour );