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/draw.h | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 modules/stars/draw.h (limited to 'modules/stars/draw.h') diff --git a/modules/stars/draw.h b/modules/stars/draw.h deleted file mode 100644 index 5010374..0000000 --- a/modules/stars/draw.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _DRAW_H -#define _DRAW_H - -#include - -#include "fb.h" - -/* helper for scaling rgb colors and packing them into an pixel */ -static inline uint32_t makergb(uint32_t r, uint32_t g, uint32_t b, float intensity) -{ - r = (((float)intensity) * r); - g = (((float)intensity) * g); - b = (((float)intensity) * b); - - return (((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff)); -} - -static inline int draw_pixel(fb_fragment_t *f, int x, int y, uint32_t pixel) -{ - uint32_t *pixels = f->buf; - - if (y < 0 || y >= f->height || x < 0 || x >= f->width) { - return 0; - } - - /* FIXME this assumes stride is aligned to 4 */ - pixels[(y * (f->width + (f->stride >> 2))) + x] = pixel; - - return 1; -} - -#endif -- cgit v1.2.3