summaryrefslogtreecommitdiff
path: root/src/modules/sparkler/particles.h
blob: d3add36cca1c7312893b36a6e2a7fa5970101526 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef _PARTICLES_H
#define _PARTICLES_H

#include "til_fb.h"

#include "bsp.h"
#include "list.h"
#include "particle.h"

typedef struct particles_conf_t {
	unsigned	show_bsp_leafs:1;
	unsigned	show_bsp_matches:1;
	unsigned	show_bsp_matches_affected_only:1;
	unsigned	show_bsp_leafs_min_depth;
	unsigned	*seedp;
} particles_conf_t;

typedef struct particles_t particles_t;
typedef struct v3f_t v3f_t;

particles_t * particles_new(const particles_conf_t *conf);
void particles_draw(particles_t *particles, til_fb_fragment_t *fragment);
particle_status_t particles_sim(particles_t *particles, til_fb_fragment_t *fragment);
void particles_age(particles_t *particles);
void particles_free(particles_t *particles);
int particles_add_particle(particles_t *particles, particle_props_t *props, particle_ops_t *ops, unsigned n_params, ...);
void particles_spawn_particle(particles_t *particles, particle_t *parent, particle_props_t *props, particle_ops_t *ops, unsigned n_params, ...);
void particles_add_particles(particles_t *particles, particle_props_t *props, particle_ops_t *ops, unsigned num, unsigned n_params, ...);
bsp_t * particles_bsp(particles_t *particles);
void particles_draw_line(particles_t *particles, const v3f_t *a, const v3f_t *b, til_fb_fragment_t *fragment);

#endif
© All Rights Reserved