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

Add support for .world files in tmxrasterizer #2067

Merged
merged 5 commits into from Mar 26, 2019

Conversation

@RainingChain
Copy link
Contributor

RainingChain commented Feb 3, 2019

With this PR, users will be able to convert a .world file into a .png file by running the command :
tmxrasterizer [options...]

This PR does not affect .tmx/.json conversion to png.

Copy link
Owner

bjorn left a comment

Great patch overal! I only had minor comments, which I have put inline.

src/tmxrasterizer/tmxrasterizer.cpp Outdated Show resolved Hide resolved
src/tmxrasterizer/tmxrasterizer.cpp Outdated Show resolved Hide resolved
src/tmxrasterizer/tmxrasterizer.cpp Outdated Show resolved Hide resolved
src/tmxrasterizer/tmxrasterizer.cpp Outdated Show resolved Hide resolved
src/tmxrasterizer/tmxrasterizer.cpp Outdated Show resolved Hide resolved
src/tmxrasterizer/main.cpp Outdated Show resolved Hide resolved
src/tmxrasterizer/tmxrasterizer.cpp Show resolved Hide resolved
src/tmxrasterizer/tmxrasterizer.cpp Outdated Show resolved Hide resolved
src/tmxrasterizer/tmxrasterizer.cpp Outdated Show resolved Hide resolved
src/tmxrasterizer/tmxrasterizer.cpp Outdated Show resolved Hide resolved
@bjorn

This comment has been minimized.

Copy link
Owner

bjorn commented Mar 12, 2019

@RainingChain You seem to have marked all my comments as resolved, but have not pushed a new version of your commit. Did you forget?

@RainingChain

This comment has been minimized.

Copy link
Contributor Author

RainingChain commented Mar 13, 2019

@RainingChain You seem to have marked all my comments as resolved, but have not pushed a new version of your commit. Did you forget?

My PR has a bug because the width of maps is not initialized upon calling WorldManager::privateLoadWorld().

I think I'll just calculate the correct map size in TmxRasterizer::renderWorld().

@bjorn

This comment has been minimized.

Copy link
Owner

bjorn commented Mar 13, 2019

@RainingChain If you push your updated commit I can also see if I can help with that. I think the easiest would be to load each map and rely on MapRenderer::mapBoundingRect. I hope that tileset caching can ensure that this won't add too much of a performance hit.

@RainingChain

This comment has been minimized.

Copy link
Contributor Author

RainingChain commented Mar 26, 2019

I fixed the map boundaries bug and made the changes you requested.

bjorn added 3 commits Mar 26, 2019
@bjorn bjorn merged commit 254f3c9 into bjorn:master Mar 26, 2019
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@bjorn

This comment has been minimized.

Copy link
Owner

bjorn commented Mar 26, 2019

@RainingChain Thanks a lot!

Ruin0x11 added a commit to Ruin0x11/tiled that referenced this pull request May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.