Branimir Karadžić 8 yıl önce
ebeveyn
işleme
e905648804
5 değiştirilmiş dosya ile 43 ekleme ve 29 silme
  1. 11 26
      include/bimg/bimg.h
  2. 2 0
      include/bimg/decode.h
  3. 2 0
      include/bimg/encode.h
  4. 26 0
      src/bimg_p.h
  5. 2 3
      tools/texturec/texturec.cpp

+ 11 - 26
include/bimg/bimg.h

@@ -6,9 +6,17 @@
 #ifndef BIMG_IMAGE_H_HEADER_GUARD
 #define BIMG_IMAGE_H_HEADER_GUARD
 
-#include <bx/pixelformat.h>
-#include <bx/allocator.h>
-#include <bx/readerwriter.h>
+#include <stdint.h> // uint32_t
+#include <stdlib.h> // 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

+ 2 - 0
include/bimg/bimg_decode.h → 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
 {
 	///

+ 2 - 0
include/bimg/bimg_encode.h → 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
 {
 	///

+ 26 - 0
src/bimg_p.h

@@ -4,6 +4,9 @@
  */
 
 #include <bimg/bimg.h>
+#include <bx/allocator.h>
+#include <bx/readerwriter.h>
+#include <bx/pixelformat.h>
 #include <bx/endian.h>
 #include <bx/error.h>
 #include <bx/simd_t.h>
@@ -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

+ 2 - 3
tools/texturec/texturec.cpp

@@ -8,9 +8,8 @@
 #include <bx/readerwriter.h>
 #include <bx/endian.h>
 
-#include <bimg/bimg.h>
-#include <bimg/bimg_decode.h>
-#include <bimg/bimg_encode.h>
+#include <bimg/decode.h>
+#include <bimg/encode.h>
 
 #if 0
 #	define BX_TRACE(_format, ...) fprintf(stderr, "" _format "\n", ##__VA_ARGS__)