diff --git a/common/com_image.h b/common/com_image.h index 33a0f812..1975032d 100644 --- a/common/com_image.h +++ b/common/com_image.h @@ -10,6 +10,7 @@ NOTE: number at end of pixelformat name it's a total bitscount e.g. PF_RGB_24 == */ #define ImageRAW( type ) (type == PF_RGBA_32 || type == PF_BGRA_32 || type == PF_RGB_24 || type == PF_BGR_24 || type == PF_LUMINANCE) #define ImageDXT( type ) (type == PF_DXT1 || type == PF_DXT3 || type == PF_DXT5 || type == PF_ATI2) +#define Image16( type ) (type == PF_RGBA_64 || type == PF_RGB_48) typedef enum { @@ -25,6 +26,8 @@ typedef enum PF_DXT3, // s3tc DXT3 format PF_DXT5, // s3tc DXT5 format PF_ATI2, // latc ATI2N format + PF_RGBA_64, // 16-bit RGBA + PF_RGB_48, // 16-bit RGB PF_TOTALCOUNT, // must be last } pixformat_t; diff --git a/engine/common/imagelib/img_main.c b/engine/common/imagelib/img_main.c index 70e67ce1..8db2df06 100644 --- a/engine/common/imagelib/img_main.c +++ b/engine/common/imagelib/img_main.c @@ -71,7 +71,7 @@ static const cubepack_t load_cubemap[] = }; // soul of ImageLib - table of image format constants -const bpc_desc_t PFDesc[] = +const bpc_desc_t PFDesc[PF_TOTALCOUNT] = { { PF_UNKNOWN, "raw", 0x1908, 0 }, { PF_INDEXED_24, "pal 24", 0x1908, 1 }, @@ -85,6 +85,8 @@ const bpc_desc_t PFDesc[] = { PF_DXT3, "DXT 3", 0x83F2, 4 }, { PF_DXT5, "DXT 5", 0x83F3, 4 }, { PF_ATI2, "ATI 2", 0x8837, 4 }, +{ PF_RGBA_64, "RGBA 64", 0x1908, 8 }, +{ PF_RGB_48, "RGB 48", 0x1908, 6 }, }; void Image_Reset( void )