anchor.diff:  
     fPalettes := TKMResPalettes.Create;
     fPalettes.LoadPalettes(ExeDir + 'data\gfx\');
  +
  +  fResUnits := TKMResUnits.Create;
  +
  +  fTempDir := ExeDir + 'SpriteInterp\';
  +  fDainFolder := 'C:\Dev\kam_sprites\DAIN_APP Alpha 1.0\';
  +  fDainExe := fDainFolder+'DAINAPP.exe';
  +  fDainParams := 'cmd.exe /C "'+fDainExe+'" --cli 1 -o '+fTempDir+' -p 0 -l 1 -in 8 -da 0 -a 1 -se 0 -si 1 -sr 0 -ha 0 --fast_mode 0'; // & pause
  +
  +  fOrigSpritesDir := fTempDir + 'original_frames\';
  +  fInterpSpritesDir := fTempDir + 'interpolated_frames\';
  +  ForceDirectories(fOrigSpritesDir);
   end;
   
   end.
  
positive.code: uses
    Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
    Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,
    KM_ResPalettes;
  
  type
    TForm1 = class(TForm)
  
negative.code: implementation
  uses
    ShellApi, Math,
    KM_ResHouses, KM_Log, KM_PNG;
  
  {$R *.dfm}
  
  
  function TForm1.DoInterpUnit(aUT: TKMUnitType; aAction: TKMUnitActionType; aDir: TKMDirection; aPicOffset: Integer): Integer;
  var
    RT: TRXType;
    RXName: string;
    I, Step, SpriteID: Integer;
    A: TKMAnimLoop;
    pngWidth, pngHeight, newWidth, newHeight: Word;
  