1 #ifndef _SDL2_PARTICLES_H
2 #define _SDL2_PARTICLES_H
6 #define PARTICLES_PER_SYSTEM 255
8 typedef struct particle_t
{
17 typedef struct particle_system
{
20 particle_t particle
[PARTICLES_PER_SYSTEM
];
23 void (*init
)(particle_t
*part
);
24 void (*move
)(particle_t
*part
);
25 void (*reset
)(particle_t
*part
);
28 extern void PS_Update(particle_system
*ps
);
29 extern void PS_Render(SDL_Renderer
*target
, particle_system
*ps
, SDL_Color
*colors
, int num_colors
, Uint32 bx
, Uint32 by
);
31 /* default handlers */
32 extern void basic_particle_init(particle_t
*p
);
33 extern void basic_particle_move(particle_t
*p
);
34 extern void basic_particle_reset(particle_t
*p
);
36 #endif /* _SDL2_PARTICLES_H */