summaryrefslogtreecommitdiffhomepage
path: root/src/utils.c
diff options
context:
space:
mode:
authorRay <[email protected]>2016-12-17 19:05:40 +0100
committerRay <[email protected]>2016-12-17 19:05:40 +0100
commit814507906f56f346d35ca95e7d9888213d3e5974 (patch)
tree85d58c962284b57bb3a6e8af02d641df85caaf00 /src/utils.c
parent673ea62b2710f481775279d4844bca34c56d00c3 (diff)
downloadraylib-814507906f56f346d35ca95e7d9888213d3e5974.tar.gz
raylib-814507906f56f346d35ca95e7d9888213d3e5974.zip
Improving rRES custom format support -IN PROGRESS-
Start removing old rRES functions.
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/utils.c b/src/utils.c
index 640c5720..8fedcaad 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -49,9 +49,6 @@
#include "external/stb_image_write.h" // Required for: stbi_write_png()
#endif
-#include "external/tinfl.c" // Required for: tinfl_decompress_mem_to_mem()
- // NOTE: DEFLATE algorythm data decompression
-
#define DO_NOT_TRACE_DEBUG_MSGS // Avoid DEBUG messages tracing
//----------------------------------------------------------------------------------
@@ -75,45 +72,6 @@ static int android_close(void *cookie);
// Module Functions Definition - Utilities
//----------------------------------------------------------------------------------
-// Data decompression function
-// NOTE: Allocated data MUST be freed!
-unsigned char *DecompressData(const unsigned char *data, unsigned long compSize, int uncompSize)
-{
- int tempUncompSize;
- unsigned char *pUncomp;
-
- // Allocate buffer to hold decompressed data
- pUncomp = (mz_uint8 *)malloc((size_t)uncompSize);
-
- // Check correct memory allocation
- if (pUncomp == NULL)
- {
- TraceLog(WARNING, "Out of memory while decompressing data");
- }
- else
- {
- // Decompress data
- tempUncompSize = tinfl_decompress_mem_to_mem(pUncomp, (size_t)uncompSize, data, compSize, 1);
-
- if (tempUncompSize == -1)
- {
- TraceLog(WARNING, "Data decompression failed");
- free(pUncomp);
- }
-
- if (uncompSize != (int)tempUncompSize)
- {
- TraceLog(WARNING, "Expected uncompressed size do not match, data may be corrupted");
- TraceLog(WARNING, " -- Expected uncompressed size: %i", uncompSize);
- TraceLog(WARNING, " -- Returned uncompressed size: %i", tempUncompSize);
- }
-
- TraceLog(INFO, "Data decompressed successfully from %u bytes to %u bytes", (mz_uint32)compSize, (mz_uint32)tempUncompSize);
- }
-
- return pUncomp;
-}
-
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)
// Creates a bitmap (BMP) file from an array of pixel data
// NOTE: This function is not explicitly available to raylib users