tile.cpp: Optimise tile flipping.

Instead of having four completely different loops to draw pixels depending on both the horizontal and the vertical flipping of a tile, the code now has one decision based on vertical flipping and two loops based on horizontal flipping. This reduces the code size and the amount of missed branches, helping architectures having a small instruction cache or a small loop prefetcher.