2013-12-07 21:37:52 +00:00
|
|
|
|
using System.Collections.Generic;
|
2014-01-11 15:05:41 +00:00
|
|
|
|
using System.IO;
|
2013-12-07 21:37:52 +00:00
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Client.Common
|
|
|
|
|
{
|
|
|
|
|
public class MovieRecordList : List<MovieRecord>
|
|
|
|
|
{
|
2013-12-07 22:41:45 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// DONT USE ME RIGHT NOW
|
|
|
|
|
/// </summary>
|
2014-01-11 15:05:41 +00:00
|
|
|
|
public void WriteToText(TextWriter tw)
|
2013-12-07 22:41:45 +00:00
|
|
|
|
{
|
|
|
|
|
tw.WriteLine("[Input]");
|
|
|
|
|
tw.WriteLine("Frame {0}", Global.Emulator.Frame);
|
|
|
|
|
ForEach(record => tw.WriteLine(record.ToString()));
|
|
|
|
|
tw.WriteLine("[/Input]");
|
|
|
|
|
}
|
|
|
|
|
|
2013-12-07 21:37:52 +00:00
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
var sb = new StringBuilder();
|
|
|
|
|
sb
|
|
|
|
|
.AppendLine("[Input]")
|
|
|
|
|
|
|
|
|
|
.Append("Frame ")
|
|
|
|
|
.Append(Global.Emulator.Frame)
|
|
|
|
|
.AppendLine();
|
|
|
|
|
|
|
|
|
|
ForEach(record => sb.Append(record.ToString()));
|
|
|
|
|
|
|
|
|
|
sb.AppendLine("[/Input]");
|
|
|
|
|
|
|
|
|
|
return sb.ToString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Truncate(int index)
|
|
|
|
|
{
|
|
|
|
|
if (index < Count)
|
|
|
|
|
{
|
|
|
|
|
RemoveRange(index, Count - index);
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-12-09 17:24:32 +00:00
|
|
|
|
|
|
|
|
|
public void TruncateStates(int index)
|
|
|
|
|
{
|
|
|
|
|
for (int i = index; i < Count; i++)
|
|
|
|
|
{
|
|
|
|
|
this[i].ClearState();
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-12-07 21:37:52 +00:00
|
|
|
|
}
|
|
|
|
|
}
|