X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fgfxutil.h;h=07883ef84f1af59466ff66c337365967e3d72e3e;hp=f8119878d7f2b0cdbfbfa7971b6d685364757734;hb=07ce18b114e1e01b2a85a04079128f3eb754de1d;hpb=f7789d3011a5ac2620a2f7732a389963f790fd85 diff --git a/src/gfxutil.h b/src/gfxutil.h index f811987..07883ef 100644 --- a/src/gfxutil.h +++ b/src/gfxutil.h @@ -4,6 +4,10 @@ #define PACK_RGB16(r, g, b) \ (((((r) >> 3) & 0x1f) << 11) | ((((g) >> 2) & 0x3f) << 5) | (((b) >> 3) & 0x1f)) +#define UNPACK_R16(c) (((c) >> 8) & 0x7c) +#define UNPACK_G16(c) (((c) >> 3) & 0xfc) +#define UNPACK_B16(c) (((c) << 3) & 0x7c) + #define PACK_RGB32(r, g, b) \ ((((r) & 0xff) << 16) | (((g) & 0xff) << 8) | ((b) & 0xff))