anchor.diff:  procedure TTerrain.RefreshMinimapData;
   var i,k,ID:integer; Light:smallint; Loc:TKMPointList; FOW:byte;
   begin
  -  for i:=1 to fTerrain.MapY do for k:=1 to fTerrain.MapX do begin
  +  for i:=1 to MapY do for k:=1 to MapX do begin
       FOW := MyPlayer.FogOfWar.CheckTileRevelation(k,i);
       if FOW = 0 then
         MiniMapRGB[i,k] := 0
       else
  -      if fTerrain.Land[i,k].TileOwner = -1 then begin
  -        ID := fTerrain.Land[i,k].Terrain+1;
  -        Light := round(fTerrain.Land[i,k].Light*64)-(255-FOW); //it's -255..255 range now
  +      if Land[i,k].TileOwner = -1 then begin
  +        ID := Land[i,k].Terrain+1;
  +        Light := round(Land[i,k].Light*64)-(255-FOW); //it's -255..255 range now
           MiniMapRGB[i,k] :=  EnsureRange(TileMMColor[ID].R+Light,0,255) +
                               EnsureRange(TileMMColor[ID].G+Light,0,255) shl 8 +
                               EnsureRange(TileMMColor[ID].B+Light,0,255) shl 16;
         end else
  -        MiniMapRGB[i,k] :=  fPlayers.Player[fTerrain.Land[i,k].TileOwner].FlagColor;
  +        MiniMapRGB[i,k] :=  fPlayers.Player[Land[i,k].TileOwner].FlagColor;
     end;
   
     Loc := TKMPointList.Create;
  
positive.code:     if Land[L1.List[i].Y,L1.List[i].X].IsUnit <> nil then
      begin
        if KMSamePoint(L1.List[i],Loc2) then Loc2IsOk := true; //Make sure unit that pushed us is a valid tile
        TempUnit := fTerrain.UnitsHitTest(L1.List[i].X, L1.List[i].Y);
        if TempUnit <> nil then
          if (TempUnit.GetUnitAction is TUnitActionStay) and (not TUnitActionStay(TempUnit.GetUnitAction).Locked) then
            L3.AddEntry(L1.List[i]);
  
negative.code:     ViewCenter := fViewport.GetCenter; //Required for Linux compatibility
      Float.X := ViewCenter.X + (X-fViewport.ViewRect.Right/2-TOOLBAR_WIDTH/2)/CELL_SIZE_PX/fViewport.Zoom;
      Float.Y := ViewCenter.Y + (Y-fViewport.ViewRect.Bottom/2)/CELL_SIZE_PX/fViewport.Zoom;
      Float.Y := ConvertCursorToMapCoord(Float.X,Float.Y);
  
      Cell.X := EnsureRange(round(Float.X+0.5), 1, MapX); //Cell below cursor in map bounds
      Cell.Y := EnsureRange(round(Float.Y+0.5), 1, MapY);
  
      SState := Shift;
    end;
  