diff options
author | Vito Caputo <vcaputo@gnugeneration.com> | 2017-02-03 15:43:51 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@gnugeneration.com> | 2017-02-03 15:43:51 -0800 |
commit | 90fde2df2d8c59b0b885e6e02b5e89dbe966a5e9 (patch) | |
tree | f1e5d26650fd34bb47b2d8040d7711996c77f97c /src/modules/sparkler/draw.h | |
parent | 1a330772b827364471dbe02b417c14fb42838c2d (diff) |
sparkler: use fb.h put_pixel helpers
discards draw_pixel(), introduces helpers.h and a convenience
function for bounds checking and oob extermination. Move makergb
to helpers.h, draw.h gets removed in a later commit.
Diffstat (limited to 'src/modules/sparkler/draw.h')
-rw-r--r-- | src/modules/sparkler/draw.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/modules/sparkler/draw.h b/src/modules/sparkler/draw.h index b988319..10701e0 100644 --- a/src/modules/sparkler/draw.h +++ b/src/modules/sparkler/draw.h @@ -5,15 +5,6 @@ #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 void draw_pixel(fb_fragment_t *f, int x, int y, uint32_t pixel) { |