diff --git a/BizHawk.Client.Common/movie/tasproj/TasMovie.cs b/BizHawk.Client.Common/movie/tasproj/TasMovie.cs index ea9a4b754a..708efb87cb 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasMovie.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasMovie.cs @@ -60,5 +60,29 @@ namespace BizHawk.Client.Common { Markers.Remove(frame); } + + private readonly Bk2MnemonicConstants Mnemonics = new Bk2MnemonicConstants(); + /// + /// Returns the mnemonic value for boolean buttons, and actual value for floats, + /// for a given frame and button + /// + public string DisplayValue(int frame, string buttonName) + { + var adapter = GetInputState(frame); + + if (adapter.Type.BoolButtons.Contains(buttonName)) + { + return adapter.IsPressed(buttonName) ? + Mnemonics[buttonName].ToString() : + string.Empty; + } + + if (adapter.Type.FloatControls.Contains(buttonName)) + { + adapter.GetFloat(buttonName); + } + + return "!"; + } } } diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs index f381ca1bc2..a78deb7af8 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs @@ -32,7 +32,6 @@ namespace BizHawk.Client.EmuHawk try { var columnName = TasView.Columns[column].Name; - //var columnText = TasView.Columns[column].Text; if (columnName == MarkerColumnName) { @@ -44,9 +43,7 @@ namespace BizHawk.Client.EmuHawk } else { - //Serialize TODO - //text = _tas[index].IsPressed(columnName) ? columnText : string.Empty; - text = string.Empty; + text = _tas.DisplayValue(index, columnName); } } catch (Exception ex) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index 513e3ecdb0..3d55186566 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -93,7 +93,7 @@ namespace BizHawk.Client.EmuHawk else { NewTasMovie(); - StartSessionFromTasMovie(); + GlobalWin.MainForm.StartNewMovie(_tas, record: true); } EngageTastudio(); @@ -279,7 +279,7 @@ namespace BizHawk.Client.EmuHawk private void FileSubMenu_DropDownOpened(object sender, EventArgs e) { - ToBk2MenuItem.Enabled = + ToBk2MenuItem.Enabled = SaveTASMenuItem.Enabled = !string.IsNullOrWhiteSpace(_tas.Filename); } @@ -344,7 +344,7 @@ namespace BizHawk.Client.EmuHawk var bk2 = _tas.ToBk2(); bk2.Save(); MessageStatusLabel.Text = Path.GetFileName(bk2.Filename) + " created."; - + } private void ExitMenuItem_Click(object sender, EventArgs e)