anchor.diff:      A: TKMAnimLoop;
     begin
       A := gMapElements[aIndex].Anim;
  -    Id := A.Step[aAnimStep mod Byte(A.Count) + 1] + 1;
  +    Id := GetTreeAnimSprite(aIndex, AnimStep, gGameParams.TickFrac, True);
       Id0 := A.Step[1] + 1;
   
       gX := pX + (R.Pivot[Id0].X + R.Size[Id0].X/2) / CELL_SIZE_PX;
  
positive.code:                                      aDir: TKMDirection;
                                       Thought: TKMUnitThought; pX,pY: Single);
  var
    Id: Integer;
    cornerX, cornerY, ground: Single;
    R: TRXData;
    A: TKMAnimLoop;
    id0: Integer;
  begin
    if Thought = thNone then Exit;
    R := fRXData[rxUnits];
  
negative.code:   // The thought should be slightly lower than the unit so it goes OVER warrior flags
    ground := ground + THOUGHT_X_OFFSET;
  
    InterpOffset := GetThoughtInterpSpriteOffset(Thought);
  
    // Thought bubbles are animated in reverse
    AnimCount := THOUGHT_BOUNDS[Thought, 2] - THOUGHT_BOUNDS[Thought, 1];
    if InterpOffset > 0 then
    begin
      Id := InterpOffset + (AnimCount-1)*INTERP_LEVEL
        - INTERP_LEVEL*(gGameParams.Tick mod AnimCount)
        + EnsureRange(Floor(INTERP_LEVEL*(1.0-gGameParams.TickFrac)), 0, INTERP_LEVEL-1);
    end
    else
    begin
      Id := THOUGHT_BOUNDS[Thought, 2] + 1 -
           (gGameParams.Tick mod AnimCount);
    end;
  
    cornerX := pX + R.Pivot[Id].X / CELL_SIZE_PX;
    cornerY := gTerrain.RenderFlatToHeight(pX, pY) + (R.Pivot[Id].Y + R.Size[Id].Y) / CELL_SIZE_PX - 1.5;
  