diff --git a/src/bimg_p.h b/src/bimg_p.h index 7a4f436..c74531d 100644 --- a/src/bimg_p.h +++ b/src/bimg_p.h @@ -20,8 +20,8 @@ BX_ERROR_RESULT(BIMG_ERROR, BX_MAKEFOURCC('b', 'i', 'm', 'g') ); #ifndef BIMG_CONFIG_ASTC_DECODE - #define BIMG_CONFIG_ASTC_DECODE 0 -#endif +# define BIMG_CONFIG_ASTC_DECODE 0 +#endif // BIMG_CONFIG_ASTC_DECODE namespace bimg { diff --git a/src/image.cpp b/src/image.cpp index 0166b94..0eacfb9 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -3,14 +3,12 @@ * License: https://github.com/bkaradzic/bimg#license-bsd-2-clause */ -#define BIMG_CONFIG_ASTC_DECODE 1 - #include "bimg_p.h" #include #if BIMG_CONFIG_ASTC_DECODE - #include "../3rdparty/astc/astc_lib.h" -#endif +# include "../3rdparty/astc/astc_lib.h" +#endif // BIMG_CONFIG_ASTC_DECODE namespace bimg { @@ -4482,24 +4480,24 @@ namespace bimg case TextureFormat::ASTC8x5: case TextureFormat::ASTC8x6: case TextureFormat::ASTC10x5: -# if BIMG_CONFIG_ASTC_DECODE - astc_decompress - ( - (const uint8_t*) _src, - s_imageBlockInfo[_srcFormat].blockWidth, - s_imageBlockInfo[_srcFormat].blockHeight, - ASTC_DECODE_LDR_LINEAR, +#if BIMG_CONFIG_ASTC_DECODE + astc_decompress + ( + (const uint8_t*) _src, + s_imageBlockInfo[_srcFormat].blockWidth, + s_imageBlockInfo[_srcFormat].blockHeight, + ASTC_DECODE_LDR_LINEAR, - _width, - _height, - (uint8_t*) _dst, - ASTC_BGRA, - _dstPitch - ); -# else - BX_WARN(false, "ASTC decoder is not implemented."); + _width, + _height, + (uint8_t*) _dst, + ASTC_BGRA, + _dstPitch + ); +#else + BX_WARN(false, "ASTC decoder is not implemented."); imageCheckerboard(_dst, _width, _height, 16, UINT32_C(0xff000000), UINT32_C(0xffffff00) ); -# endif +#endif break; case TextureFormat::RGBA8: