2013-12-01 20:55:52 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Client.Common
|
|
|
|
|
{
|
|
|
|
|
public class TasMovie : IMovie
|
|
|
|
|
{
|
2013-12-02 04:24:45 +00:00
|
|
|
|
private enum Moviemode { Inactive, Play, Record, Finished };
|
|
|
|
|
|
|
|
|
|
private MovieRecordList _records;
|
|
|
|
|
private Moviemode _mode;
|
|
|
|
|
|
2013-12-01 22:29:38 +00:00
|
|
|
|
public TasMovie(string filename, bool startsFromSavestate = false)
|
|
|
|
|
: this(startsFromSavestate)
|
|
|
|
|
{
|
|
|
|
|
Filename = filename;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public TasMovie(bool startsFromSavestate = false)
|
|
|
|
|
{
|
|
|
|
|
Filename = String.Empty;
|
|
|
|
|
Header = new MovieHeader();
|
|
|
|
|
Header.StartsFromSavestate = startsFromSavestate;
|
2013-12-02 04:24:45 +00:00
|
|
|
|
_records = new MovieRecordList();
|
|
|
|
|
_mode = Moviemode.Inactive;
|
2013-12-02 17:50:29 +00:00
|
|
|
|
IsCountingRerecords = true;
|
2013-12-01 22:29:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Filename { get; set; }
|
|
|
|
|
|
|
|
|
|
public IMovieHeader Header { get; private set; }
|
2013-12-01 20:55:52 +00:00
|
|
|
|
|
|
|
|
|
public bool IsActive
|
|
|
|
|
{
|
2013-12-02 04:24:45 +00:00
|
|
|
|
get { return _mode != Moviemode.Inactive; }
|
2013-12-01 20:55:52 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool IsPlaying
|
|
|
|
|
{
|
2013-12-02 04:24:45 +00:00
|
|
|
|
get { return _mode == Moviemode.Play || _mode == Moviemode.Finished; }
|
2013-12-01 20:55:52 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool IsRecording
|
|
|
|
|
{
|
2013-12-02 04:24:45 +00:00
|
|
|
|
get { return _mode == Moviemode.Record; }
|
2013-12-01 20:55:52 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool IsFinished
|
|
|
|
|
{
|
2013-12-02 04:24:45 +00:00
|
|
|
|
get { return _mode == Moviemode.Finished; }
|
|
|
|
|
}
|
|
|
|
|
|
2013-12-02 17:50:29 +00:00
|
|
|
|
public bool IsCountingRerecords { get; set; }
|
2013-12-01 20:55:52 +00:00
|
|
|
|
|
|
|
|
|
public bool Changes
|
|
|
|
|
{
|
|
|
|
|
get { throw new NotImplementedException(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Loaded
|
|
|
|
|
{
|
|
|
|
|
get { throw new NotImplementedException(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public double FrameCount
|
|
|
|
|
{
|
|
|
|
|
get { throw new NotImplementedException(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int InputLogLength
|
|
|
|
|
{
|
2013-12-02 19:54:10 +00:00
|
|
|
|
get { return _records.Count; }
|
2013-12-01 20:55:52 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Load()
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Save()
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SaveAs()
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string GetInputLog()
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void StartNewRecording()
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void StartNewPlayback()
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Stop(bool saveChanges = true)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SwitchToRecord()
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SwitchToPlay()
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ClearFrame(int frame)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void AppendFrame(string record)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void TruncateMovie(int frame)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void CommitFrame(int frameNum, Emulation.Common.IController source)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void PokeFrame(int frameNum, string input)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public LoadStateResult CheckTimeLines(System.IO.TextReader reader, bool onlyGuid, bool ignoreGuidMismatch, out string errorMessage)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string GetTime(bool preLoad)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ExtractInputLog(System.IO.TextReader reader, bool isMultitracking)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string GetInput(int frame)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|