I mean very simple logic:
if tile have unit, do not show this graphic or show different one.
Simply each tile will have two graphic styles, one for "no unit" and another "have unit over".
Small hack:
if (unit == nullptr)
{
// Draw object
tmpSurface = tile->getSprite(O_OBJECT);
if (tmpSurface)
{
if (tile->isBackTileObject(O_OBJECT))
{
if (tile->getObstacle(O_OBJECT))
Surface::blitRaw(surface, tmpSurface, screenPosition.x, screenPosition.y - tile->getYOffset(O_OBJECT), obstacleShade, false, _nvColor);
else
Surface::blitRaw(surface, tmpSurface, screenPosition.x, screenPosition.y - tile->getYOffset(O_OBJECT), tileShade, false, _nvColor);
}
}
}
Make interesting result (see in attachment).