TasMovie.cs - more stubbing out of stuff

This commit is contained in:
adelikat 2013-12-02 04:24:45 +00:00
parent 1818e6f5fc
commit 075a1fb077
2 changed files with 48 additions and 21 deletions

View File

@ -5,7 +5,7 @@ using System.Text;
namespace BizHawk.Client.Common
{
class MovieRecord : IMovieRecord
public class MovieRecord : IMovieRecord
{
private List<byte> _state = new List<byte>();
@ -20,5 +20,24 @@ namespace BizHawk.Client.Common
{
}
public override string ToString()
{
//TODO: consider the fileformat of binary and lagged data
return Input;
}
}
public class MovieRecordList : List<MovieRecord>
{
public override string ToString()
{
var sb = new StringBuilder();
foreach (var record in this)
{
sb.AppendLine(record.ToString());
}
return sb.ToString();
}
}
}

View File

@ -8,6 +8,12 @@ namespace BizHawk.Client.Common
{
public class TasMovie : IMovie
{
// TODO: put this in a better place so that it isn't in Movie.cs and here
private enum Moviemode { Inactive, Play, Record, Finished };
private MovieRecordList _records;
private Moviemode _mode;
public TasMovie(string filename, bool startsFromSavestate = false)
: this(startsFromSavestate)
{
@ -19,12 +25,34 @@ namespace BizHawk.Client.Common
Filename = String.Empty;
Header = new MovieHeader();
Header.StartsFromSavestate = startsFromSavestate;
_records = new MovieRecordList();
_mode = Moviemode.Inactive;
}
public string Filename { get; set; }
public IMovieHeader Header { get; private set; }
public bool IsActive
{
get { return _mode != Moviemode.Inactive; }
}
public bool IsPlaying
{
get { return _mode == Moviemode.Play || _mode == Moviemode.Finished; }
}
public bool IsRecording
{
get { return _mode == Moviemode.Record; }
}
public bool IsFinished
{
get { return _mode == Moviemode.Finished; }
}
public bool IsCountingRerecords
{
get
@ -37,26 +65,6 @@ namespace BizHawk.Client.Common
}
}
public bool IsActive
{
get { throw new NotImplementedException(); }
}
public bool IsPlaying
{
get { throw new NotImplementedException(); }
}
public bool IsRecording
{
get { throw new NotImplementedException(); }
}
public bool IsFinished
{
get { throw new NotImplementedException(); }
}
public bool Changes
{
get { throw new NotImplementedException(); }