anchor.diff:  
   
   //Write out a KaM format mission file to aFileName
  -procedure TMissionParserStandard.SaveDATFile(const aFileName: string);
  +procedure TMissionParserStandard.SaveDATFile(const aFileName: string; aDoXorEncoding: Boolean = False);
   const
     COMMANDLAYERS = 4;
   var
  
positive.code:   //Similar footer to one in Lewin's Editor, useful so ppl know what mission was made with.
    AddData('//This mission was made with KaM Remake Map Editor version ' + GAME_VERSION + ' at ' + AnsiString(DateTimeToStr(Now)));
  
    //Write uncoded file for debug
    SaveStream := TFileStream.Create(aFileName+'.txt', fmCreate);
    SaveStream.WriteBuffer(SaveString[1], Length(SaveString));
    SaveStream.Free;
  
    //Encode it
    for I := 1 to Length(SaveString) do
      SaveString[I] := AnsiChar(Byte(SaveString[I]) xor 239);
  
    SaveStream := TFileStream.Create(aFileName, fmCreate);
    SaveStream.WriteBuffer(SaveString[1], Length(SaveString));
  
negative.code:     procedure PostLoadMission;
  
      property DefaultLocation: ShortInt read fDefaultLocation;
      procedure SaveDATFile(const aFileName: string; aDoXorEncoding: Boolean = False);
    end;
  
  
  