X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fgfxutil.h;h=adbbd15cc74f777c1c573ce32d4cb21cc6392566;hp=c0a1fdedcf265ddc945d2940d1befa4c723d434a;hb=c1029b14c3fde9c98d524f17201364c695b6b117;hpb=e61875cfadc6ac33302d69474209fd215b9f6842 diff --git a/src/gfxutil.h b/src/gfxutil.h index c0a1fde..adbbd15 100644 --- a/src/gfxutil.h +++ b/src/gfxutil.h @@ -15,6 +15,10 @@ #define PACK_RGB32(r, g, b) \ ((((r) & 0xff) << 16) | (((g) & 0xff) << 8) | ((b) & 0xff)) +#define UNPACK_R32(c) (((c) >> 16) & 0xff) +#define UNPACK_G32(c) (((c) >> 8) & 0xff) +#define UNPACK_B32(c) ((c) & 0xff) + int clip_line(int *x0, int *y0, int *x1, int *y1, int xmin, int ymin, int xmax, int ymax); void draw_line(int x0, int y0, int x1, int y1, unsigned short color); @@ -22,4 +26,6 @@ void draw_line(int x0, int y0, int x1, int y1, unsigned short color); void blur_grey_horiz(uint16_t *dest, uint16_t *src, int xsz, int ysz, int radius, int scale); void blur_grey_vert(uint16_t *dest, uint16_t *src, int xsz, int ysz, int radius, int scale); +void convimg_rgb24_rgb16(uint16_t *dest, unsigned char *src, int xsz, int ysz); + #endif /* GFXUTIL_H_ */