TAStudio - when loading a movie, set to playback mode, implement auto-switching to record mode at the end of a movie
This commit is contained in:
parent
415985cd2e
commit
5c9a604ae5
|
@ -17,8 +17,7 @@ namespace BizHawk.Client.Common
|
|||
SetInput(buttons);
|
||||
if (captureState)
|
||||
{
|
||||
Lagged = Global.Emulator.IsLagFrame;
|
||||
_state = Global.Emulator.SaveStateBinary();
|
||||
CaptureSate();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,6 +48,12 @@ namespace BizHawk.Client.Common
|
|||
_boolButtons = buttons;
|
||||
}
|
||||
|
||||
public void CaptureSate()
|
||||
{
|
||||
Lagged = Global.Emulator.IsLagFrame;
|
||||
_state = Global.Emulator.SaveStateBinary();
|
||||
}
|
||||
|
||||
public void ClearInput()
|
||||
{
|
||||
InputChanged(_boolButtons);
|
||||
|
|
|
@ -146,6 +146,10 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
if (frame >= 0)
|
||||
{
|
||||
if (!_records[frame].HasState)
|
||||
{
|
||||
_records[frame].CaptureSate();
|
||||
}
|
||||
return _mg.GenerateMnemonicString(_records[frame].Buttons);
|
||||
}
|
||||
else
|
||||
|
@ -155,7 +159,11 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
else
|
||||
{
|
||||
_mode = Moviemode.Finished; // TODO: never do this in a TasMovie!
|
||||
_mode = Moviemode.Record;
|
||||
|
||||
var buttons = _mg.ParseMnemonicString(_mg.EmptyMnemonic);
|
||||
|
||||
_records.Add(new MovieRecord(buttons, true));
|
||||
return String.Empty;
|
||||
}
|
||||
}
|
||||
|
@ -363,6 +371,8 @@ namespace BizHawk.Client.Common
|
|||
catch (EndOfStreamException) { }
|
||||
});
|
||||
}
|
||||
|
||||
_mode = Moviemode.Play;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -167,7 +167,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
else
|
||||
{
|
||||
EngageTasStudio();
|
||||
|
||||
}
|
||||
|
||||
_tas.ActivePlayers = new List<string> { "Player 1" }; // TODO
|
||||
|
|
Loading…
Reference in New Issue