libpsys
annotate src/pattr.h @ 19:fbccc3c0d43e
removed the debug printf showing currently active particles
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 17 Sep 2012 08:21:39 +0300 |
parents | 23d4c50616ff |
children |
rev | line source |
---|---|
nuclear@6 | 1 #ifndef PATTR_H_ |
nuclear@6 | 2 #define PATTR_H_ |
nuclear@6 | 3 |
nuclear@6 | 4 #include "pstrack.h" |
nuclear@6 | 5 #include "rndval.h" |
nuclear@6 | 6 |
nuclear@9 | 7 /* the particle attributes vary from 0 to 1 during its lifetime */ |
nuclear@9 | 8 struct psys_particle_attributes { |
nuclear@9 | 9 struct psys_track3 color; |
nuclear@9 | 10 struct psys_track alpha; |
nuclear@9 | 11 struct psys_track size; |
nuclear@9 | 12 }; |
nuclear@9 | 13 |
nuclear@6 | 14 struct psys_attributes { |
nuclear@6 | 15 unsigned int tex; /* OpenGL texture to use for the billboard */ |
nuclear@6 | 16 |
nuclear@6 | 17 struct psys_track3 spawn_range; /* radius of emmiter */ |
nuclear@6 | 18 struct psys_track rate; /* spawn rate particles per sec */ |
nuclear@6 | 19 struct psys_anm_rnd life; /* particle life in seconds */ |
nuclear@6 | 20 struct psys_anm_rnd size; /* base particle size */ |
nuclear@6 | 21 struct psys_anm_rnd3 dir; /* particle shoot direction */ |
nuclear@6 | 22 |
nuclear@6 | 23 struct psys_track3 grav; /* external force (usually gravity) */ |
nuclear@9 | 24 float drag; /* I don't think this needs to animate */ |
nuclear@6 | 25 |
nuclear@9 | 26 /* particle attributes */ |
nuclear@9 | 27 struct psys_particle_attributes part_attr; |
nuclear@6 | 28 |
nuclear@6 | 29 /* limits */ |
nuclear@6 | 30 int max_particles; |
nuclear@6 | 31 }; |
nuclear@6 | 32 |
nuclear@11 | 33 #ifdef __cplusplus |
nuclear@11 | 34 extern "C" { |
nuclear@11 | 35 #endif |
nuclear@11 | 36 |
nuclear@6 | 37 void psys_texture_loader(unsigned int (*load)(const char*, void*), void (*unload)(unsigned int, void*), void *cls); |
nuclear@6 | 38 |
nuclear@18 | 39 struct psys_attributes *psys_create_attr(void); |
nuclear@18 | 40 void psys_free_attr(struct psys_attributes *attr); |
nuclear@18 | 41 |
nuclear@6 | 42 int psys_init_attr(struct psys_attributes *attr); |
nuclear@6 | 43 void psys_destroy_attr(struct psys_attributes *attr); |
nuclear@6 | 44 |
nuclear@6 | 45 void psys_eval_attr(struct psys_attributes *attr, anm_time_t tm); |
nuclear@6 | 46 |
nuclear@6 | 47 int psys_load_attr(struct psys_attributes *attr, const char *fname); |
nuclear@6 | 48 int psys_load_attr_stream(struct psys_attributes *attr, FILE *fp); |
nuclear@6 | 49 |
nuclear@6 | 50 int psys_save_attr(struct psys_attributes *attr, const char *fname); |
nuclear@6 | 51 int psys_save_attr_stream(struct psys_attributes *attr, FILE *fp); |
nuclear@6 | 52 |
nuclear@11 | 53 #ifdef __cplusplus |
nuclear@11 | 54 } |
nuclear@6 | 55 #endif |
nuclear@11 | 56 |
nuclear@11 | 57 #endif /* PATTR_H_ */ |