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/stars/stars.c | 63 --------------------------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 modules/stars/stars.c (limited to 'modules/stars/stars.c') diff --git a/modules/stars/stars.c b/modules/stars/stars.c deleted file mode 100644 index e009714..0000000 --- a/modules/stars/stars.c +++ /dev/null @@ -1,63 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#include "draw.h" -#include "fb.h" -#include "rototiller.h" -#include "starslib.h" - -/* Copyright (C) 2017 Philip J. Freeman */ - -static void stars(fb_fragment_t *fragment) -{ - static int initialized, z; - static struct universe* u; - - struct return_point rp; - int x, y, width = fragment->width, height = fragment->height; - - if (!initialized) { - z = 128; - srand(time(NULL) + getpid()); - - // Initialize the stars lib (and pre-add a bunch of stars) - new_universe(&u, width, height, z); - for(y=0; ybuf, 0, ((fragment->width << 2) + fragment->stride) * fragment->height); - - // draw stars - for (;;) { - int ret = process_point( u, &rp ); - if (ret==0) break; - if (ret==1) draw_pixel(fragment, rp.x+(width/2), rp.y+(height/2), - makergb(0xFF, 0xFF, 0xFF, (float)rp.opacity/OPACITY_MAX) - ); - } - - // add stars at horizon - for (x=0; x