diff --git a/BizHawk.Client.Common/BizHawk.Client.Common.csproj b/BizHawk.Client.Common/BizHawk.Client.Common.csproj
index d58a126762..6045d2f843 100644
--- a/BizHawk.Client.Common/BizHawk.Client.Common.csproj
+++ b/BizHawk.Client.Common/BizHawk.Client.Common.csproj
@@ -138,6 +138,7 @@
+
diff --git a/BizHawk.Client.Common/movie/bk2/Bk2FloatConstants.cs b/BizHawk.Client.Common/movie/bk2/Bk2FloatConstants.cs
new file mode 100644
index 0000000000..c83985a316
--- /dev/null
+++ b/BizHawk.Client.Common/movie/bk2/Bk2FloatConstants.cs
@@ -0,0 +1,58 @@
+using System.Collections.Generic;
+
+namespace BizHawk.Client.Common
+{
+ public class Bk2FloatConstants
+ {
+ public string this[string button]
+ {
+ get
+ {
+ var key = button
+ .Replace("P1 ", "")
+ .Replace("P2 ", "")
+ .Replace("P3 ", "")
+ .Replace("P4 ", "")
+ .Replace("Key ", "");
+
+ if (SystemOverrides.ContainsKey(Global.Emulator.SystemId) && SystemOverrides[Global.Emulator.SystemId].ContainsKey(key))
+ {
+ return SystemOverrides[Global.Emulator.SystemId][key];
+ }
+
+ if (BaseMnemonicLookupTable.ContainsKey(key))
+ {
+ return BaseMnemonicLookupTable[key];
+ }
+
+ return button;
+ }
+ }
+
+ private readonly Dictionary BaseMnemonicLookupTable = new Dictionary
+ {
+ { "Zapper X", "zapX" },
+ { "Zapper Y", "zapY" },
+ { "Paddle", "Pad" },
+ { "Pen", "Pen" },
+ { "Mouse X", "mX" },
+ { "Mouse Y", "mY" },
+ { "Lightgun X", "lX" },
+ { "Lightgun Y", "lY" },
+ { "X Axis", "aX" },
+ { "Y Axis", "aY" }
+ };
+
+ private readonly Dictionary> SystemOverrides = new Dictionary>
+ {
+ {
+ "A78",
+ new Dictionary
+ {
+ { "VPos", "X" },
+ { "HPos", "Y" }
+ }
+ },
+ };
+ }
+}
diff --git a/BizHawk.Client.Common/movie/bk2/Bk2LogEntryGenerator.cs b/BizHawk.Client.Common/movie/bk2/Bk2LogEntryGenerator.cs
index 5f30702fd9..896cf62d05 100644
--- a/BizHawk.Client.Common/movie/bk2/Bk2LogEntryGenerator.cs
+++ b/BizHawk.Client.Common/movie/bk2/Bk2LogEntryGenerator.cs
@@ -9,6 +9,8 @@ namespace BizHawk.Client.Common
public class Bk2LogEntryGenerator : ILogEntryGenerator
{
private readonly Bk2MnemonicConstants Mnemonics = new Bk2MnemonicConstants();
+ private readonly Bk2FloatConstants FloatLookup = new Bk2FloatConstants();
+
private IController _source;
private readonly string _logKey = string.Empty;
@@ -95,7 +97,14 @@ namespace BizHawk.Client.Common
{
foreach (var button in group)
{
- dict.Add(button, Mnemonics[button].ToString()); // TODO: floats should be a float lookup that returns a string, floats by convention should always be more than one character to distinguish from boolean input
+ if (_source.Type.BoolButtons.Contains(button))
+ {
+ dict.Add(button, Mnemonics[button].ToString());
+ }
+ else if (_source.Type.FloatControls.Contains(button))
+ {
+ dict.Add(button, FloatLookup[button]);
+ }
}
}
diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs
index 0ae073d135..999e87e52f 100644
--- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs
+++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs
@@ -44,8 +44,6 @@ namespace BizHawk.Client.EmuHawk
return _map;
}
}
-
- #region API
public TAStudio()
{
@@ -75,6 +73,8 @@ namespace BizHawk.Client.EmuHawk
TasView.PointedCellChanged += TasView_PointedCellChanged;
}
+ #region IToolForm implementation
+
public bool AskSave()
{
if (_tas.Changes)
@@ -244,7 +244,7 @@ namespace BizHawk.Client.EmuHawk
foreach (var kvp in ColumnNames)
{
- AddColumn(kvp.Key, kvp.Value, 20);
+ AddColumn(kvp.Key, kvp.Value, 20 * kvp.Value.Length);
}
}
diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GenSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GenSchema.cs
index b384f01ff9..363ed12218 100644
--- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GenSchema.cs
+++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GenSchema.cs
@@ -331,6 +331,7 @@ namespace BizHawk.Client.EmuHawk
}
};
}
+
public static PadSchema Activator(int controller)
{
return new PadSchema
@@ -409,6 +410,7 @@ namespace BizHawk.Client.EmuHawk
}
};
}
+
public static PadSchema XE1AP(int controller)
{
return new PadSchema
@@ -476,6 +478,5 @@ namespace BizHawk.Client.EmuHawk
}
};
}
-
}
}
diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NesSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NesSchema.cs
index 20db68f719..197eb4dd36 100644
--- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NesSchema.cs
+++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NesSchema.cs
@@ -510,7 +510,7 @@ namespace BizHawk.Client.EmuHawk
{
return new PadSchema
{
- DisplayName = "Zapper",
+ DisplayName = "Tablet",
IsConsole = false,
DefaultSize = new Size(356, 260),
MaxSize = new Size(356, 260),