diff --git a/modules/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp index bb836c85782..a4ab9308695 100644 --- a/modules/squish/image_compress_squish.cpp +++ b/modules/squish/image_compress_squish.cpp @@ -81,6 +81,7 @@ void image_decompress_squish(Image *p_image) { p_image->create(p_image->get_width(), p_image->get_height(), p_image->has_mipmaps(), target_format, data); } +#ifdef TOOLS_ENABLED void image_compress_squish(Image *p_image, Image::CompressSource p_source) { if (p_image->get_format() >= Image::FORMAT_DXT1) @@ -176,3 +177,4 @@ void image_compress_squish(Image *p_image, Image::CompressSource p_source) { p_image->create(p_image->get_width(), p_image->get_height(), p_image->has_mipmaps(), target_format, data); } } +#endif diff --git a/modules/squish/image_compress_squish.h b/modules/squish/image_compress_squish.h index 060afce19e4..3d30396c0f5 100644 --- a/modules/squish/image_compress_squish.h +++ b/modules/squish/image_compress_squish.h @@ -33,7 +33,9 @@ #include "image.h" +#ifdef TOOLS_ENABLED void image_compress_squish(Image *p_image, Image::CompressSource p_source); +#endif void image_decompress_squish(Image *p_image); #endif // IMAGE_COMPRESS_SQUISH_H diff --git a/modules/squish/register_types.cpp b/modules/squish/register_types.cpp index 3e42563c9bc..be91fba4efd 100644 --- a/modules/squish/register_types.cpp +++ b/modules/squish/register_types.cpp @@ -29,17 +29,14 @@ /*************************************************************************/ #include "register_types.h" - -#ifdef TOOLS_ENABLED - #include "image_compress_squish.h" void register_squish_types() { +#ifdef TOOLS_ENABLED Image::set_compress_bc_func(image_compress_squish); +#endif Image::_image_decompress_bc = image_decompress_squish; } void unregister_squish_types() {} - -#endif diff --git a/modules/squish/register_types.h b/modules/squish/register_types.h index 4764c991222..59331463296 100644 --- a/modules/squish/register_types.h +++ b/modules/squish/register_types.h @@ -28,7 +28,5 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifdef TOOLS_ENABLED void register_squish_types(); void unregister_squish_types(); -#endif