anchor.diff:    inherited;
   
     fCount := 0;
  -  SetLength(RenderList, 512); // Allocate some space
  +  SetLength(fRenderList, 512); // Allocate some space
   
     fUnitsRXData := gRes.Sprites[rxUnits].RXData;
   end;
  
positive.code:   {$ENDIF}
    fStat_Sprites := fCount;
    fStat_Sprites2 := 0;
    objectsCount := Length(RenderOrder);
  
    for I := 0 to objectsCount - 1 do
    begin
      K := RenderOrder[I];
      glPushMatrix;
  
        if RENDER_3D then
        begin
          glTranslatef(RenderList[K].Loc.X, RenderList[K].Loc.Y, 0);
          glRotatef(gRenderPool.rHeading, -1, 0, 0);
          glTranslatef(-RenderList[K].Loc.X, -RenderList[K].Loc.Y, 0);
        end;
  
        repeat // Render child sprites after their parent
          SendToRender(K);
          if SHOW_SEL_BUFFER and RenderList[K].NewInst and (RenderList[K].UID > 0) then
            gRenderAux.SquareOnTerrain(RenderList[K].SelectionRect.Left , RenderList[K].SelectionRect.Top,
                                       RenderList[K].SelectionRect.Right, RenderList[K].SelectionRect.Bottom, RenderList[K].UID or $FF000000, 1);
          Inc(K);
          Inc(fStat_Sprites2);
        until ((K = fCount) or RenderList[K].NewInst);
      glPopMatrix;
    end;
    {$IFDEF PERFLOG}
  
negative.code: 
  destructor TRenderList.Destroy;
  begin
    SetLength(fRenderList, 0);
  
    inherited;
  end;
  