From 524db0cf19648e3c7c78d3e73103b7a0bdcd6bfc Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 18 Jan 2017 17:14:52 -0800 Subject: *: move source into src/ subdir Restoring some organizational sanity since adopting autotools. --- modules/sparkler/sparkler.c | 53 --------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 modules/sparkler/sparkler.c (limited to 'modules/sparkler/sparkler.c') diff --git a/modules/sparkler/sparkler.c b/modules/sparkler/sparkler.c deleted file mode 100644 index 0bb0fcf..0000000 --- a/modules/sparkler/sparkler.c +++ /dev/null @@ -1,53 +0,0 @@ -#include -#include -#include -#include -#include - -#include "fb.h" -#include "rototiller.h" -#include "util.h" - -#include "particles.h" - -/* particle system gadget (C) Vito Caputo 2/15/2014 */ -/* 1/10/2015 added octree bsp (though not yet leveraged) */ -/* 11/25/2016 refactor and begun adapting to rototiller */ - -#define INIT_PARTS 100 - -extern particle_ops_t simple_ops; - - -/* Render a 3D particle system */ -static void sparkler(fb_fragment_t *fragment) -{ - static particles_t *particles; - static int initialized; - uint32_t *buf = fragment->buf; - - if (!initialized) { - srand(time(NULL) + getpid()); - - particles = particles_new(); - particles_add_particles(particles, NULL, &simple_ops, INIT_PARTS); - - initialized = 1; - } - - memset(buf, 0, ((fragment->width << 2) + fragment->stride) * fragment->height); - - particles_age(particles); - particles_draw(particles, fragment); - particles_sim(particles); - particles_add_particles(particles, NULL, &simple_ops, INIT_PARTS / 4); -} - - -rototiller_renderer_t sparkler_renderer = { - .render = sparkler, - .name = "sparkler", - .description = "Particle system with spatial interactions", - .author = "Vito Caputo ", - .license = "GPLv2", -}; -- cgit v1.2.3