Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decompress() zipped string fails when linked with latest zlib headers. #82

Open
turric4n opened this issue May 19, 2021 · 3 comments
Open

Comments

@turric4n
Copy link

Hi!
I compiled Tilengine library with VS2019 (Windows x64) using latest libpng & zlib headers without problems at compile time and dynamic library is built successfully.
Problems began when compiled library is being used... It doesn't load the Tilemaps inside TMX file. Especifically doesn't load correctly when Tilemap data is zipped.
I was taking a look into the code and I find that inflateInit() returns -2 and obviously data was not populated.

Did you test the code with latest zlib version? I suppose is not a problem with Tilengine but a TMX/Tiled problem.

What version of zlib do you suggest to use that feature without problems? As you know, sometimes is not easy to find right headers for x,y

Thanks for your work as always.

@turric4n
Copy link
Author

turric4n commented May 19, 2021

zlib.h inflateInit() image
loadtilemap.c decompress() image

@megamarc
Copy link
Owner

Hi Turrican,
I haven't tested newer versions of libraries, but there shouldn't be breaking changes... I validated zlib 1.2.8 and libpng 1.6.3, both dating from 2013. They're quite old and maybe I should test current releases.
What version of zlib are you testing? Make sure that you aren't mixing headers from one version and implementation from another, that's always a source of problems

@turric4n
Copy link
Author

Hi Marc,
It worked with zlib 1.2.8 & libpng 1.6.3. that makes zlib 1.2.11 incompatible with TMX afik.
No problem with that so you can close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants