Remove a no longer needed file
This commit is contained in:
parent
95f874d3a5
commit
0164db5532
|
@ -141,7 +141,6 @@
|
||||||
<Compile Include="movie\MovieSession.cs" />
|
<Compile Include="movie\MovieSession.cs" />
|
||||||
<Compile Include="movie\MultitrackRecording.cs" />
|
<Compile Include="movie\MultitrackRecording.cs" />
|
||||||
<Compile Include="movie\MnemonicsLookupTable.cs" />
|
<Compile Include="movie\MnemonicsLookupTable.cs" />
|
||||||
<Compile Include="movie\NewMnemonicsGenerator.cs" />
|
|
||||||
<Compile Include="movie\PlatformFrameRates.cs" />
|
<Compile Include="movie\PlatformFrameRates.cs" />
|
||||||
<Compile Include="movie\Subtitle.cs" />
|
<Compile Include="movie\Subtitle.cs" />
|
||||||
<Compile Include="movie\SubtitleList.cs" />
|
<Compile Include="movie\SubtitleList.cs" />
|
||||||
|
|
|
@ -1,162 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
using BizHawk.Emulation.Common;
|
|
||||||
|
|
||||||
namespace BizHawk.Client.Common
|
|
||||||
{
|
|
||||||
// Used with the version 2 movie implementation (TasMovie.cs)
|
|
||||||
/*
|
|
||||||
public class NewMnemonicsGenerator
|
|
||||||
{
|
|
||||||
public MnemonicLookupTable MnemonicLookup { get; private set; }
|
|
||||||
public IController Source { get; set; }
|
|
||||||
|
|
||||||
public List<string> ActivePlayers { get; set; }
|
|
||||||
|
|
||||||
public NewMnemonicsGenerator(IController source)
|
|
||||||
{
|
|
||||||
MnemonicLookup = new MnemonicLookupTable();
|
|
||||||
Source = source;
|
|
||||||
ActivePlayers = MnemonicLookup[Global.Emulator.SystemId].Select(x => x.Name).ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsEmpty
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return ActiveCollections
|
|
||||||
.SelectMany(mc => mc)
|
|
||||||
.All(kvp => !this.Source.IsPressed(kvp.Key));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string EmptyMnemonic
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
var sb = new StringBuilder();
|
|
||||||
|
|
||||||
sb.Append('|');
|
|
||||||
foreach (var mc in ActiveCollections)
|
|
||||||
{
|
|
||||||
foreach (var kvp in mc)
|
|
||||||
{
|
|
||||||
sb.Append('.');
|
|
||||||
}
|
|
||||||
|
|
||||||
sb.Append('|');
|
|
||||||
}
|
|
||||||
|
|
||||||
return sb.ToString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Dictionary<string, bool> ParseMnemonicString(string mnemonic)
|
|
||||||
{
|
|
||||||
// TODo: clean me up
|
|
||||||
var buttons = new Dictionary<string, bool>();
|
|
||||||
var collections = AllCollections.SelectMany(mc => mc).ToList();
|
|
||||||
var availMnemonics = AvailableMnemonics;
|
|
||||||
List<char> mnemonicList = mnemonic.Replace("|", "").ToCharArray().ToList();
|
|
||||||
|
|
||||||
for (int i = 0; i < collections.Count; i++)
|
|
||||||
{
|
|
||||||
if (availMnemonics.ContainsKey(collections[i].Key))
|
|
||||||
{
|
|
||||||
buttons.Add(collections[i].Key, mnemonicList[i] != '.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return buttons;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GenerateMnemonicString(Dictionary<string, bool> buttons)
|
|
||||||
{
|
|
||||||
var collections = MnemonicLookup[Global.Emulator.SystemId].Where(x => ActivePlayers.Contains(x.Name));
|
|
||||||
var sb = new StringBuilder();
|
|
||||||
|
|
||||||
sb.Append('|');
|
|
||||||
foreach (var mc in collections)
|
|
||||||
{
|
|
||||||
foreach (var kvp in mc.Where(kvp => buttons.ContainsKey(kvp.Key)))
|
|
||||||
{
|
|
||||||
sb.Append(buttons[kvp.Key] ? kvp.Value : '.');
|
|
||||||
}
|
|
||||||
|
|
||||||
sb.Append('|');
|
|
||||||
}
|
|
||||||
return sb.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public string MnemonicString
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
var sb = new StringBuilder();
|
|
||||||
sb.Append('|');
|
|
||||||
foreach (var mc in ActiveCollections)
|
|
||||||
{
|
|
||||||
foreach (var kvp in mc)
|
|
||||||
{
|
|
||||||
sb.Append(Source.IsPressed(kvp.Key) ? kvp.Value : '.');
|
|
||||||
}
|
|
||||||
|
|
||||||
sb.Append('|');
|
|
||||||
}
|
|
||||||
|
|
||||||
return sb.ToString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<char> Mnemonics
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
var mnemonics = new List<char>();
|
|
||||||
foreach (var mc in ActiveCollections)
|
|
||||||
{
|
|
||||||
mnemonics.AddRange(mc.Select(x => x.Value));
|
|
||||||
}
|
|
||||||
|
|
||||||
return mnemonics;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Dictionary<string, char> AvailableMnemonics
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return ActiveCollections
|
|
||||||
.SelectMany(mc => mc)
|
|
||||||
.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Dictionary<string, bool> GetBoolButtons()
|
|
||||||
{
|
|
||||||
return ActiveCollections
|
|
||||||
.SelectMany(mc => mc)
|
|
||||||
.ToDictionary(kvp => kvp.Key, kvp => this.Source.IsPressed(kvp.Key));
|
|
||||||
}
|
|
||||||
|
|
||||||
private IEnumerable<MnemonicCollection> ActiveCollections
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return MnemonicLookup[Global.Emulator.SystemId].Where(x => ActivePlayers.Contains(x.Name));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private IEnumerable<MnemonicCollection> AllCollections
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return MnemonicLookup[Global.Emulator.SystemId];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
Loading…
Reference in New Issue