diff options
Diffstat (limited to 'src/plot/16bpp.c')
-rw-r--r-- | src/plot/16bpp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plot/16bpp.c b/src/plot/16bpp.c index d629944..9aa7ab1 100644 --- a/src/plot/16bpp.c +++ b/src/plot/16bpp.c @@ -18,23 +18,23 @@ #include "nsfb.h" #include "plot.h" -#define UNUSED __attribute__((unused)) - static inline uint16_t *get_xy_loc(nsfb_t *nsfb, int x, int y) { return (void *)(nsfb->ptr + (y * nsfb->linelen) + (x << 1)); } -static inline nsfb_colour_t pixel_to_colour(UNUSED nsfb_t *nsfb, uint16_t pixel) +static inline nsfb_colour_t pixel_to_colour(nsfb_t *nsfb, uint16_t pixel) { + UNUSED(nsfb); return ((pixel & 0x1F) << 19) | ((pixel & 0x7E0) << 5) | ((pixel & 0xF800) >> 8); } /* convert a colour value to a 16bpp pixel value ready for screen output */ -static inline uint16_t colour_to_pixel(UNUSED nsfb_t *nsfb, nsfb_colour_t c) +static inline uint16_t colour_to_pixel(nsfb_t *nsfb, nsfb_colour_t c) { + UNUSED(nsfb); return ((c & 0xF8) << 8) | ((c & 0xFC00 ) >> 5) | ((c & 0xF80000) >> 19); } |