anchor.diff:  
       function GetUnitAnimSprite(aUnit: TKMUnitType; aAct: TKMUnitActionType; aDir: TKMDirection; aStep: Integer; aStepFrac: Single): Integer;
       function GetUnitAnimSpriteByPercent(aUnit: TKMUnitType; aAct: TKMUnitActionType; aDir: TKMDirection; aPercent: Single): Integer;
  +    function GetTreeAnimSprite(aTree, aStep: Integer; aStepFrac: Single; aLoop: Boolean): Integer;
   
       procedure ApplyTransform;
       procedure SetDefaultRenderParams;
  
positive.code: end;
  
  
  function GetTreeAnimSprite(aTree, aStep: Integer; aStepFrac: Single; aLoop: Boolean): Integer;
  const
    TREE_INTERP_LOOKUP: array [0..OBJECTS_CNT] of Integer = (
    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
  
negative.code:   -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1);
  var
    A: TKMAnimLoop;
    InterpOffset: Integer;
  begin
    A := gMapElements[aTree].Anim;
  
    if INTERPOLATED_ANIMS and (aTree <= High(TREE_INTERP_LOOKUP)) then
    begin
      InterpOffset := TREE_INTERP_LOOKUP[aTree];
      //While in development disable interpolation if the sprite is missing
      if (InterpOffset > 0) and (InterpOffset < fRXData[rxTrees].Count) and (fRXData[rxTrees].Size[InterpOffset].X <> 0) then
      begin
        Result := TREE_INTERP_LOOKUP[aTree]
          + INTERP_LEVEL*(aStep mod Byte(A.Count));
  
        //For the last step of non-looping animations, skip the interp
        if aLoop or ((aStep mod Byte(A.Count)) < A.Count-1) then
          Result := Result + EnsureRange(Floor(INTERP_LEVEL*aStepFrac), 0, INTERP_LEVEL-1);
  
        Exit;
      end;
    end;
  
    Result := A.Step[aStep mod Byte(A.Count) +1]+1;
  end;
  
  
  