From c8b77543492c56b747394e2a460074febeaaeab5 Mon Sep 17 00:00:00 2001 From: Philip J Freeman Date: Mon, 9 Jan 2017 00:35:32 -0800 Subject: stars: add starfield simulator from ph1l/stars --- modules/stars/starslib.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 modules/stars/starslib.h (limited to 'modules/stars/starslib.h') diff --git a/modules/stars/starslib.h b/modules/stars/starslib.h new file mode 100644 index 0000000..0c125a3 --- /dev/null +++ b/modules/stars/starslib.h @@ -0,0 +1,19 @@ +struct universe +{ + int width, height, depth; + struct points* points; + struct points* iterator; +}; + +void new_universe( struct universe** u, int width, int height, int depth ); +void new_point( struct universe* universe ); + +#define OPACITY_MAX 8 +struct return_point +{ + int x, y; + int opacity; +}; + +int process_point( struct universe *u, struct return_point *rp ); + -- cgit v1.2.3