We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a tilemap like this:
tilemap = new Tilemap("tiles", 32, 32, [ [ 1, 1, 0, 1, 1, 0 ], [ 1, 0, 0, 0, 1, 0 ], [ 1, 0, 0, 0, 1, 0 ], [ 1, 1, 1, 1, 1, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], null, true);
When I render it like this
tilemap.render(painter, Std.int(x), Std.int(y), 800, 600);
I get an error as soon as x and y become negative. As I set the tilemap with repeat = true, this doesn't make much sense in my opinion.
The text was updated successfully, but these errors were encountered:
I agree, but I can not reproduce the error. Can you send me a complete example?
Sorry, something went wrong.
Here is the code: http://dl.dropboxusercontent.com/u/10650964/_stuff/kha/tilemaptest/Snakhe.hx Here is the tiles.png: http://dl.dropboxusercontent.com/u/10650964/_stuff/kha/tilemaptest/tiles.png
When I move left or up, the program will fail at some point, because tilemapPos.x or tilemapPos.y becomes negative. Then, in Tilemap.hx, line 28
tileset.render(painter, map[x % levelWidth][y % levelHeight], x * tileset.TILE_WIDTH, y * tileset.TILE_HEIGHT);
has a problem because it tries to access map[][] with negative values, as far as I understand it.
17dd981
Got it. Didn't happen in all backends. Thanks for the help!
No branches or pull requests
I have a tilemap like this:
When I render it like this
I get an error as soon as x and y become negative. As I set the tilemap with repeat = true, this doesn't make much sense in my opinion.
The text was updated successfully, but these errors were encountered: