Fixing tile rotation/flip issue.

This flip code can be very optimized through math. Actualy, the whole FromTiledMap code can be very optimized. But this is a quest to another day. :)