anchor.diff:    function FindClosestHouseEntrance(aOnlyPlaced: Boolean; var aNewLoc, aExistLoc: TKMPoint): Boolean;
     const
       INIT_DIST = 1000000;
  +    MAX_WATCHTOWER_DIST = 10;
     var
       I: Integer;
       Dist, BestDist: Single;
  
positive.code:   end;
    Result := aField.Count;
  end;
  
  
  //function TKMCityPlanner.GetBlockingTrees(aHT: THouseType; aLoc: TKMPoint; var aTrees: TKMPointArray): Boolean;
  //var
  //  Output: Boolean;
  //  I,X,Y, TreeCnt: Integer;
  //  HMA: THouseMappingArray;
  //begin
  //  Result := True;
  //  if (aHT in [ht_IronMine, ht_GoldMine, ht_CoalMine]) then
  //    Exit;
  //
  //  HMA := gAIFields.Eye.HousesMapping;
  //  SetLength(aTrees, Length(HMA[aHT].Tiles));
  //  for I := Low(aTrees) to High(aTrees) do
  //    aTrees[I] := KMPOINT_ZERO;
  //
  //  Output := True;
  //  TreeCnt := 0;
  //  for I := Low(HMA[aHT].Tiles) to High(HMA[aHT].Tiles) do
  //  begin
  //    X := aLoc.X + HMA[aHT].Tiles[I].X;
  //    Y := aLoc.Y + HMA[aHT].Tiles[I].Y;
  //    Output := Output AND (tpBuild in gTerrain.Land[Y,X].Passability);
  //    if gTerrain.ObjectIsChopableTree(X, Y) then
  //    begin
  //      aTrees[TreeCnt] := KMPoint(X,Y);
  //      TreeCnt := TreeCnt + 1;
  //    end;
  //    if not Output then
  //      break;
  //  end;
  //  Result := Output;
  //end;
  //
  //
  //function TKMCityPlanner.GetBlockingFields(aHT: THouseType; aLoc: TKMPoint; var aFields: TKMPointArray): Boolean;
  //var
  //  I,X,Y, FieldCnt: Integer;
  //  HMA: THouseMappingArray;
  //begin
  //  Result := True;
  //  if (aHT in [ht_IronMine, ht_GoldMine, ht_CoalMine]) then
  //    Exit;
  //
  //  HMA := gAIFields.Eye.HousesMapping;
  //  SetLength(aFields, Length(HMA[aHT].Tiles));
  //  for I := Low(aFields) to High(aFields) do
  //    aFields[I] := KMPOINT_ZERO;
  //
  //  FieldCnt := 0;
  //  for I := Low(HMA[aHT].Tiles) to High(HMA[aHT].Tiles) do
  //  begin
  //    X := aLoc.X + HMA[aHT].Tiles[I].X;
  //    Y := aLoc.Y + HMA[aHT].Tiles[I].Y;
  //    aFields[FieldCnt] := KMPoint(X,Y);
  //    if     (gHands[fOwner].BuildList.FieldworksList.HasField(aFields[FieldCnt]) = ft_Wine)
  //        OR (gHands[fOwner].BuildList.FieldworksList.HasField(aFields[FieldCnt]) = ft_Corn) then
  //      FieldCnt := FieldCnt + 1;
  //  end;
  //  Result := (FieldCnt > 0);
  //end;
  
  
  procedure TKMCityPlanner.PlanWineFields(aLoc: TKMPoint; var aNodeList: TKMPointList);
  
negative.code:     for I := 0 to fForestsNearby.Count - 1 do
      begin
        Loc := fForestsNearby.Items[I];
        Color := (Max(50,Round((fForestsNearby.Tag[I] - fForestsNearby.Tag[0]) * Division)) shl 24) OR $000000FF;
        gRenderAux.Quad(Loc.X, Loc.Y, Color);
      end;
  