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 horizontal and vertical flipping of tile instances #3

Closed
bjorn opened this issue Apr 18, 2011 · 1 comment
Closed
Assignees
Labels
feature It's a feature, not a bug.
Milestone

Comments

@bjorn
Copy link
Member

bjorn commented Apr 18, 2011

When creating maps for certain systems (GBA and Nintendo DS hardware maps in particular, though there may be others) it would be useful to have support for placing tiles on the map in horizontally and vertically flipped orientations. This allows more versatile use of a smaller tileset as it's not necessary to have additional images in the tileset to represent different orientations. This wouldn't be a property of the tiles themselves, but a property of tile instances on the map (i.e. the same tile could be placed on the map, in different positions, in flipped and non-flipped orientations)

Explanation of the feature on Nintendo DS hardware maps: http://www.liranuna.com/nds-2d-tuts/lesson-3/

This issue replaces the following issue on the old issue tracker:
http://sourceforge.net/apps/mantisbt/tiled/view.php?id=41

@ghost ghost assigned bjorn May 24, 2011
bjorn added a commit that referenced this issue May 27, 2011
This commit changes the TileLayer class to store Cell instances rather
than directly referring to Tile*. The Cell class contains the Tile* plus
information on whether the tile is horizontally or vertically flipped.

The MapReader and MapWriter have been adapted to store and restore the
flipped state as flags in the last bits of the global IDs (this means
older Tiled versions will refuse to load maps with flipped tiles).

The OrthogonalRenderer and IsometricRenderer have been adapted to render
the flipped tiles correctly.

This implements the first part of issue #3

Sponsored-by: Zipline Games, Inc.
@bjorn bjorn closed this as completed in d3e0bd9 May 27, 2011
@bjorn
Copy link
Member Author

bjorn commented May 27, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature It's a feature, not a bug.
Projects
None yet
Development

No branches or pull requests

1 participant