TasMovie - small todo
This commit is contained in:
parent
de71c0d8c7
commit
ada517d433
|
@ -9,7 +9,7 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
public class MovieRecord
|
public class MovieRecord
|
||||||
{
|
{
|
||||||
private readonly byte[] _state;
|
private byte[] _state = new byte[0];
|
||||||
private Dictionary<string, bool> _boolButtons = new Dictionary<string, bool>();
|
private Dictionary<string, bool> _boolButtons = new Dictionary<string, bool>();
|
||||||
|
|
||||||
public MovieRecord(Dictionary<string, bool> buttons, bool captureState)
|
public MovieRecord(Dictionary<string, bool> buttons, bool captureState)
|
||||||
|
@ -55,6 +55,11 @@ namespace BizHawk.Client.Common
|
||||||
_boolButtons.Clear();
|
_boolButtons.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ClearState()
|
||||||
|
{
|
||||||
|
_state = new byte[0];
|
||||||
|
}
|
||||||
|
|
||||||
public bool HasState
|
public bool HasState
|
||||||
{
|
{
|
||||||
get { return State.Any(); }
|
get { return State.Any(); }
|
||||||
|
|
|
@ -41,5 +41,13 @@ namespace BizHawk.Client.Common
|
||||||
RemoveRange(index, Count - index);
|
RemoveRange(index, Count - index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void TruncateStates(int index)
|
||||||
|
{
|
||||||
|
for (int i = index; i < Count; i++)
|
||||||
|
{
|
||||||
|
this[i].ClearState();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ namespace BizHawk.Client.Common
|
||||||
public void ToggleButton(int frame, string buttonName)
|
public void ToggleButton(int frame, string buttonName)
|
||||||
{
|
{
|
||||||
_records[frame].Buttons[buttonName] ^= true;
|
_records[frame].Buttons[buttonName] ^= true;
|
||||||
|
Changes = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetButton(int frame, string buttonName, bool value)
|
public void SetButton(int frame, string buttonName, bool value)
|
||||||
|
|
Loading…
Reference in New Issue