TAStudio - start new recording on load, and generate columns dynamically based on the core currently loaded. Currently only does 1 player's worth of columns.
This commit is contained in:
parent
b6eb13a8b2
commit
5384fcfdd2
|
@ -88,7 +88,14 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
if (frame < _records.Count)
|
if (frame < _records.Count)
|
||||||
{
|
{
|
||||||
return _records[frame].Input;
|
if (frame >= 0)
|
||||||
|
{
|
||||||
|
return _records[frame].Input;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return String.Empty;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
using BizHawk.Client.Common;
|
using BizHawk.Client.Common;
|
||||||
|
@ -13,6 +14,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
private int _defaultWidth;
|
private int _defaultWidth;
|
||||||
private int _defaultHeight;
|
private int _defaultHeight;
|
||||||
|
private TasMovie _tas;
|
||||||
|
|
||||||
#region API
|
#region API
|
||||||
|
|
||||||
|
@ -56,6 +58,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
public void UpdateValues()
|
public void UpdateValues()
|
||||||
{
|
{
|
||||||
if (!IsHandleCreated || IsDisposed) return;
|
if (!IsHandleCreated || IsDisposed) return;
|
||||||
|
|
||||||
|
TASView.ItemCount = _tas.InputLogLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Restart()
|
public void Restart()
|
||||||
|
@ -89,7 +93,26 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
GlobalWin.OSD.AddMessage("TAStudio engaged");
|
GlobalWin.OSD.AddMessage("TAStudio engaged");
|
||||||
Global.MovieSession.Movie = new TasMovie();
|
Global.MovieSession.Movie = new TasMovie();
|
||||||
|
_tas = Global.MovieSession.Movie as TasMovie;
|
||||||
|
_tas.StartNewRecording();
|
||||||
|
|
||||||
LoadConfigSettings();
|
LoadConfigSettings();
|
||||||
|
|
||||||
|
SetUpColumns();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetUpColumns()
|
||||||
|
{
|
||||||
|
TASView.Columns.Clear();
|
||||||
|
ToolHelpers.AddColumn(TASView, "", true, 18);
|
||||||
|
ToolHelpers.AddColumn(TASView, "Frame#", true, 68);
|
||||||
|
|
||||||
|
var mnemonics = MnemonicConstants.BUTTONS[Global.Emulator.Controller.Type.Name].Select(x => x.Value);
|
||||||
|
|
||||||
|
foreach (var mnemonic in mnemonics)
|
||||||
|
{
|
||||||
|
ToolHelpers.AddColumn(TASView, mnemonic, true, 20);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadConfigSettings()
|
private void LoadConfigSettings()
|
||||||
|
|
Loading…
Reference in New Issue