1
0
mirror of https://github.com/ScrelliCopter/tmx2gba.git synced 2025-02-21 03:29:25 +11:00

tmxlite: further cleanup

This commit is contained in:
2024-03-28 22:15:57 +11:00
parent 849ff6bcc8
commit a7617f3a3a
24 changed files with 123 additions and 209 deletions

View File

@@ -25,15 +25,14 @@ and must not be misrepresented as being the original software.
source distribution.
*********************************************************************/
#include "tmxlite/FreeFuncs.hpp"
#include "tmxlite/Types.hpp"
#include "tmxlite/detail/Log.hpp"
#ifndef USE_ZLIB
#include "miniz.h"
# include "miniz.h"
#else
#include <zlib.h>
# include <zlib.h>
#endif
#include <tmxlite/FreeFuncs.hpp>
#include <tmxlite/Types.hpp>
#include <tmxlite/detail/Log.hpp>
#include <cstring>
bool tmx::decompress(const char* source, std::vector<unsigned char>& dest, std::size_t inSize, std::size_t expectedSize)
@@ -59,7 +58,7 @@ bool tmx::decompress(const char* source, std::vector<unsigned char>& dest, std::
stream.next_out = (Bytef*)byteArray.data();
stream.avail_out = static_cast<unsigned int>(expectedSize);
//we'd prefer to use inflateInit2 but it appears
//we'd prefer to use inflateInit2 but it appears
//to be incorrect in miniz. This is fine for zlib
//compressed data, but gzip compressed streams
//will fail to inflate.