anchor.diff:  end;
   
   
  -function TKMScriptSoundsManager.StartSound(var aScriptSound: TKMScriptSound): Integer;
  +function TKMScriptSoundsManager.StartSound(aScriptSound: TKMScriptSound): Integer;
   var
     S: UnicodeString;
   begin
  
positive.code: end;
  
  
  function TKMScriptSoundsManager.CanPlay(aScriptSound: TKMScriptSound): Boolean;
  var
    DistanceSqr: Single;
  begin
  
negative.code: 
  procedure TKMScriptSoundsManager.Load(LoadStream: TKMemoryStream);
  var
    I, SoundCount: Integer;
    S: TKMScriptSound;
  begin
    LoadStream.CheckMarker('ScriptSoundsManager');
    LoadStream.Read(fLastScriptUID);
    LoadStream.Read(SoundCount);
    fScriptSounds.Clear;
    for I := 0 to SoundCount - 1 do
    begin
      S := TKMScriptSound.Create;
      LoadStream.Read(S.Looped);
      LoadStream.Read(S.FadeMusic);
      LoadStream.Read(S.ScriptUID);
      LoadStream.ReadA(S.SoundName);
      LoadStream.Read(S.AudioFormat, SizeOf(S.AudioFormat));
      LoadStream.Read(S.Volume);
      LoadStream.Read(S.Radius);
      LoadStream.Read(S.Attenuate);
      LoadStream.Read(S.Loc);
      LoadStream.Read(S.HandIndex);
      S.PlayingIndex := -1; //Indicates that it is not currently playing
      fScriptSounds.Add(S);
    end;
  end;
  
  
  { TKMScriptSound }
  
  constructor TKMScriptSound.Create;
  begin
    PlayingIndex := -1;
    Looped := False;
    FadeMusic := False;
    ScriptUID := 0;
    SoundName := '';
    AudioFormat := Low(TKMAudioFormat);
    Volume := 0.0;
    Radius := 0.0;
    Attenuate := False;
    Loc := KMPoint(0,0);
    HandIndex := 0;
  end;
  
  end.
  