Remove Loaded property from IMovie and refactor accordingly, it was only needed for a hack that had faulty logic

This commit is contained in:
adelikat 2013-12-10 17:41:30 +00:00
parent 1f181f48db
commit 7e67658f1c
5 changed files with 9 additions and 12 deletions

View File

@ -17,7 +17,6 @@ namespace BizHawk.Client.Common
bool IsRecording { get; } bool IsRecording { get; }
bool IsFinished { get; } bool IsFinished { get; }
bool Changes { get; } bool Changes { get; }
bool Loaded { get; }
#endregion #endregion

View File

@ -46,7 +46,7 @@ namespace BizHawk.Client.Common
public int InputLogLength public int InputLogLength
{ {
get { return Loaded ? _log.Length : _preloadFramecount; } get { return _log.Length; }
} }
public double FrameCount public double FrameCount

View File

@ -116,11 +116,6 @@ namespace BizHawk.Client.Common
public bool Changes { get; private set; } public bool Changes { get; private set; }
public bool Loaded
{
get { throw new NotImplementedException(); }
}
public TimeSpan Time public TimeSpan Time
{ {
get get
@ -160,7 +155,7 @@ namespace BizHawk.Client.Common
} }
else else
{ {
_mode = Moviemode.Finished; _mode = Moviemode.Finished; // TODO: never do this in a TasMovie!
return String.Empty; return String.Empty;
} }
} }
@ -183,7 +178,6 @@ namespace BizHawk.Client.Common
public void SwitchToPlay() public void SwitchToPlay()
{ {
_mode = Moviemode.Play; _mode = Moviemode.Play;
Save();
} }
public void StartNewPlayback() public void StartNewPlayback()

View File

@ -603,13 +603,19 @@ namespace BizHawk.Client.EmuHawk
{ {
for (int i = 0; i < frames; i++) for (int i = 0; i < frames; i++)
{ {
if (RewindBuf.Count == 0 || (Global.MovieSession.Movie.Loaded && Global.MovieSession.Movie.FrameCount == 0)) if (RewindBuf.Count == 0 || (Global.MovieSession.Movie.IsActive && Global.MovieSession.Movie.InputLogLength == 0))
{
return; return;
}
if (LastState.Length < 0x10000) if (LastState.Length < 0x10000)
{
Rewind64K(); Rewind64K();
}
else else
{
RewindLarge(); RewindLarge();
}
} }
} }

View File

@ -11,8 +11,6 @@ namespace BizHawk.Client.EmuHawk
{ {
public partial class TAStudio : Form, IToolForm public partial class TAStudio : Form, IToolForm
{ {
// TOOD: clean up Input painting logic (lock to a column, lock to on or off)
private const string MarkerColumnName = "MarkerColumn"; private const string MarkerColumnName = "MarkerColumn";
private const string FrameColumnName = "FrameColumn"; private const string FrameColumnName = "FrameColumn";