Some stuff
This commit is contained in:
parent
98f1e02df3
commit
38d6555763
|
@ -190,6 +190,14 @@ namespace BizHawk.Client.Common
|
||||||
private IController Source;
|
private IController Source;
|
||||||
private string ControlType;
|
private string ControlType;
|
||||||
|
|
||||||
|
public bool this[int player, string mnemonic]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return IsBasePressed("P" + player + " " + mnemonic); //TODO: not every controller uses "P"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void SetSource(IController source)
|
public void SetSource(IController source)
|
||||||
{
|
{
|
||||||
Source = source;
|
Source = source;
|
||||||
|
|
|
@ -10,7 +10,13 @@ namespace BizHawk.Client.Common
|
||||||
private MnemonicsGenerator _mg;
|
private MnemonicsGenerator _mg;
|
||||||
private byte[] _state;
|
private byte[] _state;
|
||||||
|
|
||||||
public string Input { get; private set; }
|
public string Input
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _mg.GetControllersAsMnemonic();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool Lagged { get; private set; }
|
public bool Lagged { get; private set; }
|
||||||
public IEnumerable<byte> State
|
public IEnumerable<byte> State
|
||||||
|
@ -18,6 +24,11 @@ namespace BizHawk.Client.Common
|
||||||
get { return _state; }
|
get { return _state; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsPressed(int player, string mnemonic)
|
||||||
|
{
|
||||||
|
return _mg[player, mnemonic];
|
||||||
|
}
|
||||||
|
|
||||||
public void SetInput(MnemonicsGenerator mg)
|
public void SetInput(MnemonicsGenerator mg)
|
||||||
{
|
{
|
||||||
_mg = mg;
|
_mg = mg;
|
||||||
|
|
|
@ -105,6 +105,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
text = index.ToString().PadLeft(5, '0');
|
text = index.ToString().PadLeft(5, '0');
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
text = _tas[index].IsPressed(1, columnName) ? columnName : String.Empty;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TAStudio_Load(object sender, EventArgs e)
|
private void TAStudio_Load(object sender, EventArgs e)
|
||||||
|
|
Loading…
Reference in New Issue