anchor.diff:  end;
   
   
  -procedure TForm1.Make4xInterpImages(RT: TRXType; aID_1, aID_2: Integer; aBaseDir: string; aExportType: TInterpExportType);
  +procedure TForm1.MakeCustomInterpImages(aInterpCount: Integer; RT: TRXType; aID_1, aID_2: Integer; aBaseDir: string; aExportType: TInterpExportType);
   var
     origSpritesDir, interpSpritesDir: string;
     I: Integer;
  
positive.code:     Exit;
    end;
  
    if Is4xAnim(A) then
    begin
      //Custom handler for tree animations that only update every 4 frames
      outDirLocal := fOutDir+IntToStr(Byte(rxTrees)+1)+'\';
      outPrefix := outDirLocal+IntToStr(Byte(rxTrees)+1)+'_';
      ForceDirectories(outDirLocal);
  
      for Step := 1 to 8 do
      begin
        if Step > (A.Count div 4) then
        begin
          for SubStep := 1 to 32 do
            fOutputStream.Write(Integer(-1));
          Continue;
        end;
  
        StepSprite := A.Step[Step*4] + 1;
        StepNextSprite := A.Step[((Step*4) mod A.Count) + 1] + 1;
  
        fOutputStream.Write(StepSprite);
  
        InterpOffset := aPicOffset;
        //Update return values
        Inc(aPicOffset, 31);
        for SubStep := 0 to 30 do
          fOutputStream.Write(InterpOffset+SubStep);
  
        if aDryRun then
          Continue;
  
        Make4xInterpImages(rxTrees, StepSprite, StepNextSprite, fWorkDir+'base\', ietBase);
        Make4xInterpImages(rxTrees, StepSprite, StepNextSprite, fWorkDir+'shad\', ietShadows);
        for SubStep := 0 to 30 do
        begin
          //Filenames are 1-based, and skip the first one since it's the original
          suffixPath := 'interpolated_frames\' + format('%.15d.png', [SubStep+1+1]);
  
negative.code:   StartupInfo.cb := SizeOf(StartupInfo);
    StartupInfo.dwFlags := STARTF_USESHOWWINDOW;
    StartupInfo.wShowWindow := SW_HIDE;
    CreateProcess(nil, PChar(GetDainParams(aBaseDir, NeedAlpha, aInterpCount)), nil, nil, false, 0, nil, PChar(fDainFolder), StartupInfo, ProcessInfo);
    WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
    //ShellExecute(0, nil, 'cmd.exe', PChar(DainParams), PChar(DainFolder), SW_SHOWNORMAL);
  end;
  