From e905648804e19508046ffa031031158e21e4babc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 2 Apr 2017 20:56:46 -0700 Subject: [PATCH] Cleanup. --- include/bimg/bimg.h | 37 +++++++----------------- include/bimg/{bimg_decode.h => decode.h} | 2 ++ include/bimg/{bimg_encode.h => encode.h} | 2 ++ src/bimg_p.h | 26 +++++++++++++++++ tools/texturec/texturec.cpp | 5 ++-- 5 files changed, 43 insertions(+), 29 deletions(-) rename include/bimg/{bimg_decode.h => decode.h} (95%) rename include/bimg/{bimg_encode.h => encode.h} (97%) diff --git a/include/bimg/bimg.h b/include/bimg/bimg.h index 4aea97b..0ab4d23 100644 --- a/include/bimg/bimg.h +++ b/include/bimg/bimg.h @@ -6,9 +6,17 @@ #ifndef BIMG_IMAGE_H_HEADER_GUARD #define BIMG_IMAGE_H_HEADER_GUARD -#include -#include -#include +#include // uint32_t +#include // NULL + +namespace bx +{ + struct AllocatorI; + struct Error; + struct ReaderSeekerI; + struct WriterI; + +} // namespace bx namespace bimg { @@ -264,29 +272,6 @@ namespace bimg /// bool imageConvert(TextureFormat::Enum _dstFormat, TextureFormat::Enum _srcFormat); - /// - void imageConvert( - void* _dst - , uint32_t _bpp - , bx::PackFn _pack - , const void* _src - , bx::UnpackFn _unpack - , uint32_t _size - ); - - /// - void imageConvert( - void* _dst - , uint32_t _dstBpp - , bx::PackFn _pack - , const void* _src - , uint32_t _srcBpp - , bx::UnpackFn _unpack - , uint32_t _width - , uint32_t _height - , uint32_t _srcPitch - ); - /// bool imageConvert( void* _dst diff --git a/include/bimg/bimg_decode.h b/include/bimg/decode.h similarity index 95% rename from include/bimg/bimg_decode.h rename to include/bimg/decode.h index f59d141..3b9e53b 100644 --- a/include/bimg/bimg_decode.h +++ b/include/bimg/decode.h @@ -6,6 +6,8 @@ #ifndef BIMG_DECODE_H_HEADER_GUARD #define BIMG_DECODE_H_HEADER_GUARD +#include "bimg.h" + namespace bimg { /// diff --git a/include/bimg/bimg_encode.h b/include/bimg/encode.h similarity index 97% rename from include/bimg/bimg_encode.h rename to include/bimg/encode.h index 0d12f3a..e91288e 100644 --- a/include/bimg/bimg_encode.h +++ b/include/bimg/encode.h @@ -6,6 +6,8 @@ #ifndef BIMG_ENCODE_H_HEADER_GUARD #define BIMG_ENCODE_H_HEADER_GUARD +#include "bimg.h" + namespace bimg { /// diff --git a/src/bimg_p.h b/src/bimg_p.h index 640807a..91bd31e 100644 --- a/src/bimg_p.h +++ b/src/bimg_p.h @@ -4,6 +4,9 @@ */ #include +#include +#include +#include #include #include #include @@ -43,4 +46,27 @@ namespace bimg return 1; } + /// + void imageConvert( + void* _dst + , uint32_t _bpp + , bx::PackFn _pack + , const void* _src + , bx::UnpackFn _unpack + , uint32_t _size + ); + + /// + void imageConvert( + void* _dst + , uint32_t _dstBpp + , bx::PackFn _pack + , const void* _src + , uint32_t _srcBpp + , bx::UnpackFn _unpack + , uint32_t _width + , uint32_t _height + , uint32_t _srcPitch + ); + } // namespace bimg diff --git a/tools/texturec/texturec.cpp b/tools/texturec/texturec.cpp index d598392..e85566c 100644 --- a/tools/texturec/texturec.cpp +++ b/tools/texturec/texturec.cpp @@ -8,9 +8,8 @@ #include #include -#include -#include -#include +#include +#include #if 0 # define BX_TRACE(_format, ...) fprintf(stderr, "" _format "\n", ##__VA_ARGS__)