anchor.diff:  end;
   
   
  -procedure TRenderPool.AddWholeHouse(H: TKMHouse; FlagColor: Cardinal; DoImmediateRender: Boolean = False; DoHighlight: Boolean = False; HighlightColor: TColor4 = 0);
  +procedure TRenderPool.AddWholeHouse(H: TKMHouse; aFlagColor: Cardinal; aDoImmediateRender: Boolean = False;
  +                                    aDoHighlight: Boolean = False; aHighlightColor: TColor4 = 0);
   begin
     if H <> nil then
     begin
  -    AddHouse(H.HouseType, H.Position, 1, 1, 0, DoImmediateRender, DoHighlight, HighlightColor);
  -    AddHouseSupply(H.HouseType, H.Position, H.ResourceInArray, H.ResourceOutArray, H.ResourceOutPoolArray, DoImmediateRender, DoHighlight, HighlightColor);
  +    AddHouse(H.HouseType, H.Position, 1, 1, 0, aDoImmediateRender, aDoHighlight, aHighlightColor);
  +    AddHouseSupply(H.HouseType, H.Position, H.ResourceInArray, H.ResourceOutArray, H.ResourceOutPoolArray, aDoImmediateRender, aDoHighlight, aHighlightColor);
       if H.CurrentAction <> nil then
  -      gRenderPool.AddHouseWork(H.HouseType, H.Position, H.CurrentAction.SubAction, H.WorkAnimStep, H.WorkAnimStepPrev, FlagColor, DoImmediateRender, DoHighlight, HighlightColor);
  +      gRenderPool.AddHouseWork(H.HouseType, H.Position, H.CurrentAction.SubAction, H.WorkAnimStep, H.WorkAnimStepPrev, aFlagColor, aDoImmediateRender, aDoHighlight, aHighlightColor);
     end;
   end;
   
   
   // Render house in wood
  -procedure TRenderPool.AddHouse(aHouse: TKMHouseType; const aLoc: TKMPoint; aWoodStep, aStoneStep, aSnowStep: Single; DoImmediateRender: Boolean = False; DoHighlight: Boolean = False; HighlightColor: TColor4 = 0);
  -var
  -  R: TRXData;
  +procedure TRenderPool.AddHouse(aHouse: TKMHouseType; const aLoc: TKMPoint; aWoodStep, aStoneStep, aSnowStep: Single;
  +                               aDoImmediateRender: Boolean = False; aDoHighlight: Boolean = False; aHighlightColor: TColor4 = 0);
  +var
  +  rxData: TRXData;
     picWood, picStone, picSnow: Integer;
     groundWood, groundStone, gX, gY: Single;
   
     function CornerX(aPic: Integer): Single;
     begin
  -    Result := aLoc.X + R.Pivot[aPic].X / CELL_SIZE_PX - 1;
  +    Result := aLoc.X + rxData.Pivot[aPic].X / CELL_SIZE_PX - 1;
     end;
   
     function CornerY(aPic: Integer): Single;
     begin
  -    Result := aLoc.Y + (R.Pivot[aPic].Y + R.Size[aPic].Y) / CELL_SIZE_PX - 1
  +    Result := aLoc.Y + (rxData.Pivot[aPic].Y + rxData.Size[aPic].Y) / CELL_SIZE_PX - 1
                        - gTerrain.LandExt^[aLoc.Y + 1, aLoc.X].RenderHeight / CELL_HEIGHT_DIV;
     end;
   
  
positive.code: end;
  
  
  procedure TRenderPool.RenderMapElement(aIndex: Word; AnimStep,pX,pY: Integer; DoImmediateRender: Boolean = False; Deleting: Boolean = False);
  begin
    if (gMySpectator.FogOfWar.CheckVerticeRenderRev(pX,pY) <= FOG_OF_WAR_MIN) then Exit;// Do not render tiles fully covered by FOW
    // Render either normal object or quad depending on what it is
    if gMapElements[aIndex].WineOrCorn then
      RenderMapElement4(aIndex,AnimStep,pX,pY,(aIndex in [54..57]),DoImmediateRender,Deleting) // 54..57 are grapes, all others are doubles
    else
      RenderMapElement1(aIndex,AnimStep,pX,pY,True,DoImmediateRender,Deleting);
  end;
  
  
  procedure TRenderPool.RenderMapElement1(aIndex: Word; AnimStep: Cardinal; LocX,LocY: Integer; aLoopAnim: Boolean; DoImmediateRender: Boolean = False; Deleting: Boolean = False);
  var
    R: TRXData;
    pX, pY: Integer;
  
negative.code: end;
  
  
  function TRenderList.GetSelectionUID(const aCurPos: TKMPointF): Integer;
  var
    I, K: Integer;
  begin
    Result := -1; // Didn't hit anything
    // Skip if cursor is over FOW
    if gMySpectator.FogOfWar.CheckRevelation(aCurPos) <= FOG_OF_WAR_MIN then Exit;
    // Select closest (higher Z) units first (list is in low..high Z-order)
    for I := Length(fRenderOrder) - 1 downto 0 do
    begin
      K := fRenderOrder[I];
      // Don't check child sprites, we don't want to select serfs by the long pike they are carrying
      if (fRenderList[K].UID > 0) and KMInRect(aCurPos, fRenderList[K].SelectionRect) then
      begin
        Result := fRenderList[K].UID;
        Exit;
  