libpsys

view src/pattr.h @ 6:d774738f50f6

almost finished with the reorg (2)
author John Tsiombikas <nuclear@mutantstargoat.com>
date Tue, 27 Sep 2011 07:42:54 +0300
parents
children 9c24273f211b
line source
1 #ifndef PATTR_H_
2 #define PATTR_H_
4 #include "pstrack.h"
5 #include "rndval.h"
7 struct psys_attributes {
8 unsigned int tex; /* OpenGL texture to use for the billboard */
10 struct psys_track3 spawn_range; /* radius of emmiter */
11 struct psys_track rate; /* spawn rate particles per sec */
12 struct psys_anm_rnd life; /* particle life in seconds */
13 struct psys_anm_rnd size; /* base particle size */
14 struct psys_anm_rnd3 dir; /* particle shoot direction */
16 struct psys_track3 grav; /* external force (usually gravity) */
18 float drag; /* I don't think this needs to animate */
20 /* limits */
21 int max_particles;
22 };
24 void psys_texture_loader(unsigned int (*load)(const char*, void*), void (*unload)(unsigned int, void*), void *cls);
26 int psys_init_attr(struct psys_attributes *attr);
27 void psys_destroy_attr(struct psys_attributes *attr);
29 void psys_eval_attr(struct psys_attributes *attr, anm_time_t tm);
31 int psys_load_attr(struct psys_attributes *attr, const char *fname);
32 int psys_load_attr_stream(struct psys_attributes *attr, FILE *fp);
34 int psys_save_attr(struct psys_attributes *attr, const char *fname);
35 int psys_save_attr_stream(struct psys_attributes *attr, FILE *fp);
37 #endif