diff --git a/src/BizHawk.Client.Common/movie/interfaces/ITasMovie.cs b/src/BizHawk.Client.Common/movie/interfaces/ITasMovie.cs index ab9ab063ba..36b9da864a 100644 --- a/src/BizHawk.Client.Common/movie/interfaces/ITasMovie.cs +++ b/src/BizHawk.Client.Common/movie/interfaces/ITasMovie.cs @@ -47,6 +47,11 @@ namespace BizHawk.Client.Common void RemoveFrame(int frame); void RemoveFrames(ICollection frames); + /// + /// Remove all frames between removeStart and removeUpTo (excluding removeUpTo). + /// + /// The first frame to remove. + /// The frame after the last frame to remove. void RemoveFrames(int removeStart, int removeUpTo); void SetFrame(int frame, string source); diff --git a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.Editing.cs b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.Editing.cs index b67de61568..2b3ffed5da 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.Editing.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.Editing.cs @@ -123,11 +123,6 @@ namespace BizHawk.Client.Common } } - /// - /// Remove all frames between removeStart and removeUpTo (excluding removeUpTo). - /// - /// The first frame to remove. - /// The frame after the last frame to remove. public void RemoveFrames(int removeStart, int removeUpTo) { // Log.GetRange() might be preferrable, but Log's type complicates that. diff --git a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs index ce73e23a4d..14a5623f7c 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs @@ -8,11 +8,35 @@ namespace BizHawk.Client.Common List Names { get; } int UndoIndex { get; } string NextUndoStepName { get; } + /// + /// Gets or sets a value indicating whether the movie is recording action history. + /// This is not intended to turn off the ChangeLog, but to disable the normal recording process. + /// Use this to manually control the ChangeLog. (Useful for disabling the ChangeLog during undo/redo). + /// bool IsRecording { get; set; } void Clear(int upTo = -1); + /// + /// All changes made between calling Begin and End will be one Undo. + /// If already recording in a batch, calls EndBatch. + /// + /// The name of the batch + /// If set and a batch is in progress, a new batch will not be created. + /// Returns true if a new batch was started; otherwise false. bool BeginNewBatch(string name = "", bool keepOldBatch = false); + /// + /// Ends the current undo batch. Future changes will be one undo each. + /// If not already recording a batch, does nothing. + /// void EndBatch(); + /// + /// Undoes the most recent action batch, if any exist. + /// + /// Returns the frame which the movie needs to rewind to. int Undo(); + /// + /// Redoes the most recent undo, if any exist. + /// + /// Returns the frame which the movie needs to rewind to. int Redo(); bool CanUndo { get; } bool CanRedo { get; } @@ -65,11 +89,6 @@ namespace BizHawk.Client.Common } } - /// - /// Gets or sets a value indicating whether the movie is recording action history. - /// This is not intended to turn off the ChangeLog, but to disable the normal recording process. - /// Use this to manually control the ChangeLog. (Useful for disabling the ChangeLog during undo/redo). - /// public bool IsRecording { get; set; } = true; public void Clear(int upTo = -1) @@ -112,13 +131,6 @@ namespace BizHawk.Client.Common } } - /// - /// All changes made between calling Begin and End will be one Undo. - /// If already recording in a batch, calls EndBatch. - /// - /// The name of the batch - /// If set and a batch is in progress, a new batch will not be created. - /// Returns true if a new batch was started; otherwise false. public bool BeginNewBatch(string name = "", bool keepOldBatch = false) { if (!IsRecording) @@ -149,10 +161,6 @@ namespace BizHawk.Client.Common return ret; } - /// - /// Ends the current undo batch. Future changes will be one undo each. - /// If not already recording a batch, does nothing. - /// public void EndBatch() { if (!IsRecording || !_recordingBatch) @@ -174,10 +182,6 @@ namespace BizHawk.Client.Common } } - /// - /// Undoes the most recent action batch, if any exist. - /// - /// Returns the frame which the movie needs to rewind to. public int Undo() { if (UndoIndex == -1) @@ -196,10 +200,6 @@ namespace BizHawk.Client.Common return batch.TrueForAll(static a => a is MovieActionMarker) ? _movie.InputLogLength : PreviousUndoFrame; } - /// - /// Redoes the most recent undo, if any exist. - /// - /// Returns the frame which the movie needs to rewind to. public int Redo() { if (UndoIndex == _history.Count - 1)