Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Staggered flipping now works as expected, as well, Hexagonal rotation now works in 60 degree intervals. #1515
I've focused on coding style in this review since I don't have time to try it out right now. The change looks promising!
As before, I have only mentioned each coding style problem once, but I found many cases where the code was in a different style. Please check your patch against each rule. And please try to remember them! :-)
Btw, some rules may be arbitrary, but if I may highlight one in particular, the spaces after commas (and around operators) one:
Hex newCenter(newWidth/2,newHeight/2,staggerIndex,staggerAxis); vs. Hex newCenter(newWidth / 2, newHeight / 2, staggerIndex, staggerAxis);
The second is simply more readable, isn't it? It's a good habit to use everywhere, unless for some inexplicable reason you come to work on a project that explicitly tells you to do otherwise.
Would it be best to close this pr and start a new one with everything cleaned up? Or just continue working in this one?
Actually you had convinced me that it was not a good idea to change the stagger index, because indeed that's on the map and not the layer, so we're just lucky it works here because at the moment the rotation is only invoked from a map that has only this one tile layer.
But since for our current use-case this works fine and is nicer than adding an empty row, let's leave it for now.
I noticed only one now outdated comment which is still to be updated, then this patch can be merged!