anchor.diff:  
   
   procedure TViewport.Load(LoadStream:TKMemoryStream);
  -var s:string;
  +var s: string;
   begin
     LoadStream.Read(s);
     Assert(s = 'Viewport');
  
positive.code:   TViewport = class
    private
      fMapX, fMapY: Word;
      fPosition:TKMPointF;
      fScrolling: boolean;
      PrevScrollAdv:array [1..24]of single;
      PrevScrollPos:byte;
      fViewportClip:TPoint;
      fViewRect:TRect;
      fZoom:single;
      function GetPosition:TKMPointF;
      procedure SetPosition(Value: TKMPointF);
      procedure SetZoom(aZoom:single);
    public
      ScrollKeyLeft, ScrollKeyRight, ScrollKeyUp, ScrollKeyDown: boolean;
      constructor Create(aWidth, aHeight: Integer);
  
      property Position:TKMPointF read GetPosition write SetPosition;
      property Scrolling:boolean read fScrolling;
      property ViewportClip:TPoint read fViewportClip;
      property ViewRect:TRect read fViewRect;
      property Zoom:single read fZoom write SetZoom;
  
      procedure ResetZoom;
      procedure Resize(NewWidth, NewHeight: Integer);
      procedure ResizeMap(aMapX, aMapY: Integer);
      function GetClip:TRect; //returns visible area dimensions in map space
      function GetMinimapClip:TRect;
      procedure ReleaseScrollKeys;
  
      procedure Save(SaveStream:TKMemoryStream);
      procedure Load(LoadStream:TKMemoryStream);
  
      procedure UpdateStateIdle(aFrameTime:cardinal);
    end;
  
  
  
negative.code:   Result.Y := EnsureRange(fPosition.Y, 1, fMapY);
    if not SMOOTH_SCROLLING then Result.X := round(Result.X);
    if not SMOOTH_SCROLLING then Result.Y := round(Result.Y);
  end;
  
  
  