public ConvertTheMapToMUL() { MaximizeBox = false; MinimizeBox = false; conv = new LegacyMULConverter(); InitializeComponent(); }
public static void UnpackUOP(FileType aFileType) { LegacyMULConverter lConverter = new LegacyMULConverter(); string PathFiles = "MulFiles"; switch (aFileType) { case FileType.ArtLegacyMUL: lConverter.FromUOP(Path.Combine(PathFiles, "artLegacyMUL.uop"), Path.Combine(PathFiles, "art.mul"), Path.Combine(PathFiles, "artidx.mul"), aFileType, 0); break; case FileType.GumpartLegacyMUL: lConverter.FromUOP(Path.Combine(PathFiles, "gumpartLegacyMUL.uop"), Path.Combine(PathFiles, "gumpart.mul"), Path.Combine(PathFiles, "gumpidx.mul"), aFileType, 0); break; } }
public static void PackUOP(FileType aFileType) { LegacyMULConverter lConverter = new LegacyMULConverter(); string PathDestination = "Patched"; switch (aFileType) { case FileType.ArtLegacyMUL: lConverter.ToUOP(Path.Combine(PathDestination, "art.mul"), Path.Combine(PathDestination, "artidx.mul"), Path.Combine(PathDestination, "artLegacyMUL.uop"), aFileType, 0); break; case FileType.GumpartLegacyMUL: lConverter.ToUOP(Path.Combine(PathDestination, "gumpart.mul"), Path.Combine(PathDestination, "gumpidx.mul"), Path.Combine(PathDestination, "gumpartLegacyMUL.uop"), aFileType, 0); break; } }
public static void Main(string[] args) { Console.WriteLine("LegacyMULConverter version N-2.1."); if (args.Length == 0 || args[0] == "-h" || args[0] == "--help" || args[0] == "/?") { Console.WriteLine("Syntax:"); Console.WriteLine(" -x <path> Extracts known UOP files in <path> into MUL format."); Console.WriteLine(" <path> Packs known MUL files in <path> into UOP format."); Console.WriteLine(); return; } string mode = args[0]; switch (mode) { case "-x": { Console.WriteLine("Mode: Extract from UOP."); Console.WriteLine(); if (args.Length < 2) { Console.WriteLine("Missing path name."); return; } string uopDir = args[1]; if (!Directory.Exists(uopDir)) { Console.WriteLine("Directory '{0}' does not exist!", uopDir); return; } m_Path = uopDir; m_Converter = new LegacyMULConverter(); m_Success = m_Total = 0; Extract("artLegacyMUL.uop", "art.mul", "artidx.mul", FileType.ArtLegacyMUL, 0); Extract("gumpartLegacyMUL.uop", "gumpart.mul", "gumpidx.mul", FileType.GumpartLegacyMUL, 0); Extract("MultiCollection.uop", "multi.mul", "multiidx.mul", FileType.MultiMUL, 0); Extract("soundLegacyMUL.uop", "sound.mul", "soundidx.mul", FileType.SoundLegacyMUL, 0); for (int i = 0; i <= 5; ++i) { string map = String.Format("map{0}", i); Extract(map + "LegacyMUL.uop", map + ".mul", null, FileType.MapLegacyMUL, i); Extract(map + "xLegacyMUL.uop", map + "x.mul", null, FileType.MapLegacyMUL, i); } PrintResults(); break; } default: { Console.WriteLine("Mode: Pack to UOP."); Console.WriteLine(); string mulDir = args[0]; if (!Directory.Exists(mulDir)) { Console.WriteLine("Directory '{0}' does not exist!", mulDir); return; } m_Path = mulDir; m_Converter = new LegacyMULConverter(); m_Success = m_Total = 0; Pack("art.mul", "artidx.mul", "artLegacyMUL.uop", FileType.ArtLegacyMUL, 0); Pack("gumpart.mul", "gumpidx.mul", "gumpartLegacyMUL.uop", FileType.GumpartLegacyMUL, 0); if (!File.Exists("housing.bin")) { Console.WriteLine(" Warning: \"housing.bin\" not found, it won't be packed inside MultiCollection.uop (which probably won't work)."); Console.WriteLine(" First, unpack a vanilla MultiCollection.uop to extract \"housing.bin\" in the working directory."); } Pack("multi.mul", "multiidx.mul", "MultiCollection.uop", FileType.MultiMUL, 0); Pack("sound.mul", "soundidx.mul", "soundLegacyMUL.uop", FileType.SoundLegacyMUL, 0); for (int i = 0; i <= 5; ++i) { string map = String.Format("map{0}", i); Pack(map + ".mul", null, map + "LegacyMUL.uop", FileType.MapLegacyMUL, i); Pack(map + "x.mul", null, map + "xLegacyMUL.uop", FileType.MapLegacyMUL, i); } PrintResults(); break; } } }
public static void Main(string[] args) { if (args.Length == 0 || args[0] == "-h" || args[0] == "--help" || args[0] == "/?") { Console.WriteLine(); Console.WriteLine("LegacyMULCL Help"); Console.WriteLine(); Console.WriteLine("Syntax:"); Console.WriteLine(" -x <path> Extracts known UOP files in <path> into MUL format."); Console.WriteLine(" <path> Packs known MUL files in <path> into UOP format."); Console.WriteLine(); return; } string mode = args[0]; switch (mode) { case "-x": { if (args.Length < 2) { Console.WriteLine("Missing path name."); return; } string uopDir = args[1]; if (!Directory.Exists(uopDir)) { Console.WriteLine("Directory '{0}' does not exist!", uopDir); return; } m_Path = uopDir; m_Converter = new LegacyMULConverter(); m_Success = m_Total = 0; Extract("artLegacyMUL.uop", "art.mul", "artidx.mul", FileType.ArtLegacyMUL, 0); Extract("gumpartLegacyMUL.uop", "gumpart.mul", "gumpidx.mul", FileType.GumpartLegacyMUL, 0); Extract("soundLegacyMUL.uop", "sound.mul", "soundidx.mul", FileType.SoundLegacyMUL, 0); for (int i = 0; i <= 5; ++i) { string map = String.Format("map{0}", i); Extract(map + "LegacyMUL.uop", map + ".mul", null, FileType.MapLegacyMUL, i); Extract(map + "xLegacyMUL.uop", map + "x.mul", null, FileType.MapLegacyMUL, i); } PrintResults(); break; } default: { string mulDir = args[0]; if (!Directory.Exists(mulDir)) { Console.WriteLine("Directory '{0}' does not exist!", mulDir); return; } m_Path = mulDir; m_Converter = new LegacyMULConverter(); m_Success = m_Total = 0; Pack("art.mul", "artidx.mul", "artLegacyMUL.uop", FileType.ArtLegacyMUL, 0); Pack("gumpart.mul", "gumpidx.mul", "gumpartLegacyMUL.uop", FileType.GumpartLegacyMUL, 0); Pack("sound.mul", "soundidx.mul", "soundLegacyMUL.uop", FileType.SoundLegacyMUL, 0); for (int i = 0; i <= 5; ++i) { string map = String.Format("map{0}", i); Pack(map + ".mul", null, map + "LegacyMUL.uop", FileType.MapLegacyMUL, i); Pack(map + "x.mul", null, map + "xLegacyMUL.uop", FileType.MapLegacyMUL, i); } PrintResults(); break; } } }