OpenRA/OpenRA — pull request #7071 by RoosterDragon (2014-12-05 22:00:17+00:00)
Title: Avoid redunant cell <-> map conversions

The CellRegion and CellLayer classes prefer map-coords internally since they can be used more directly for array indexing, but their APIs all expose cell co-ordinates.

The lead to a particularly bad case where enumerating the cells of a region would do map->cell converions for you, only to use those cells as an indexer into a layer which would convert the cell back into a map co-ordinate. All the round trips are quite expensive since so many are performed.

This PR adds the ability to enumerate a region in map-coords and then uses this ability in several key places to index into the layer using those map-coords. I didn't fix every use since there's so many.