Refactored a bit the minimap code to accept a custom minimap image.

This is unused yet, as I realized the minimap image created is big
and should be reduced first.