diff --git a/SabreTools.Helper/Mappings/Good.xml b/SabreTools.Helper/Mappings/Good.xml deleted file mode 100644 index c6902cb0..00000000 --- a/SabreTools.Helper/Mappings/Good.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SabreTools.Helper/Mappings/MAME.xml b/SabreTools.Helper/Mappings/MAME.xml deleted file mode 100644 index d3df2e6c..00000000 --- a/SabreTools.Helper/Mappings/MAME.xml +++ /dev/null @@ -1,445 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SabreTools.Helper/Mappings/Mappings.cs b/SabreTools.Helper/Mappings/Mappings.cs deleted file mode 100644 index 69fc54c9..00000000 --- a/SabreTools.Helper/Mappings/Mappings.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Xml; - -namespace SabreTools.Helper -{ - /// - /// Contains all remappings of known import classes - /// - public class Mappings - { - // Local paths - private const string _remappersPath = "Mappings"; - - // Remapping classes represented by a dictionary of dictionaries (name, (from, to)) - private static Dictionary> _datMaps = new Dictionary>(); - public static Dictionary> DatMaps - { - get - { - if (_datMaps.Count == 0) - { - CreateRemappings(); - } - return _datMaps; - } - } - - #region DAT Name Remappings - - /// - /// Create all remappings to be used by the program - /// - private static void CreateRemappings() - { - // Create array of dictionary names - string[] remappings = - { - "Good", "MAME", "MaybeIntro", "NoIntro", "NonGood", "Redump", "TOSEC", "TruRip", - }; - - // Loop through and add all remappings - foreach (string remapping in remappings) - { - _datMaps.Add(remapping, new Dictionary()); - RemappingHelper(remapping); - } - } - - /// - /// Create a remapping from XML - /// - /// Name of the mapping to be populated - private static void RemappingHelper(string mapping) - { - // Read in remapping from file - XmlDocument doc = new XmlDocument(); - try - { - doc.LoadXml(File.ReadAllText(Path.Combine(_remappersPath, mapping + ".xml"))); - } - catch (XmlException ex) - { - Console.WriteLine(mapping + " remappings could not be loaded! " + ex.ToString()); - return; - } - - // Get the mappings parent node - XmlNode node = doc.FirstChild; - while (node.Name != "mappings") - { - node = node.NextSibling; - } - - // If the node is empty, just return so it doesn't crash - if (!node.HasChildNodes) - { - return; - } - - // Get the first mapping node - node = node.FirstChild; - while (node.NodeType != XmlNodeType.Element && node.Name != "mapping") - { - node = node.NextSibling; - } - - // Now read in the mappings - while (node != null && node.Name == "mapping") - { - _datMaps[mapping].Add(node.Attributes["from"].Value, node.Attributes["to"].Value); - - // Get the next node and skip over anything that's not an element - node = node.NextSibling; - - if (node == null) - { - break; - } - - while (node.NodeType != XmlNodeType.Element && node.Name != "mapping") - { - node = node.NextSibling; - } - } - } - - #endregion - } -} diff --git a/SabreTools.Helper/Mappings/MaybeIntro.xml b/SabreTools.Helper/Mappings/MaybeIntro.xml deleted file mode 100644 index 2c88832b..00000000 --- a/SabreTools.Helper/Mappings/MaybeIntro.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SabreTools.Helper/Mappings/NoIntro.xml b/SabreTools.Helper/Mappings/NoIntro.xml deleted file mode 100644 index a0a7a919..00000000 --- a/SabreTools.Helper/Mappings/NoIntro.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SabreTools.Helper/Mappings/NonGood.xml b/SabreTools.Helper/Mappings/NonGood.xml deleted file mode 100644 index a6849a2f..00000000 --- a/SabreTools.Helper/Mappings/NonGood.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SabreTools.Helper/Mappings/Redump.xml b/SabreTools.Helper/Mappings/Redump.xml deleted file mode 100644 index c00a756d..00000000 --- a/SabreTools.Helper/Mappings/Redump.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SabreTools.Helper/Mappings/TOSEC.xml b/SabreTools.Helper/Mappings/TOSEC.xml deleted file mode 100644 index 6ea650e9..00000000 --- a/SabreTools.Helper/Mappings/TOSEC.xml +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SabreTools.Helper/Mappings/TruRip.xml b/SabreTools.Helper/Mappings/TruRip.xml deleted file mode 100644 index 76b5e3d1..00000000 --- a/SabreTools.Helper/Mappings/TruRip.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SabreTools.Helper/SabreTools.Helper.csproj b/SabreTools.Helper/SabreTools.Helper.csproj index 78743a54..2f036a93 100644 --- a/SabreTools.Helper/SabreTools.Helper.csproj +++ b/SabreTools.Helper/SabreTools.Helper.csproj @@ -138,7 +138,6 @@ - @@ -155,7 +154,28 @@ - + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + Always