コード例 #1
0
        private void DumpActorTable()
        {
            List <RomVersion> versions = new List <RomVersion>();

            versions.AddRange(ORom.GetSupportedBuilds());
            versions.AddRange(MRom.GetSupportedBuilds());

            StringBuilder sb = new StringBuilder();

            foreach (var version in versions)
            {
                string outFile = $"actor_dlf_{version.ShortUniqueKey}.txt";
                if (PathUtil.TryGetRomLocation(version, out string file))
                {
                    var txt = Get.ActorTable(Rom.New(file, version));
                    System.IO.File.WriteAllText(outFile, txt);
                    sb.AppendLine($"Created {outFile}");
                }
                else
                {
                    sb.AppendLine($"{outFile} failed; no rom found");
                }
            }
            outRichTextBox.Text = sb.ToString();
        }
コード例 #2
0
 private void VersionSelector_Load(object sender, EventArgs e)
 {
     if (Game == Game.OcarinaOfTime)
     {
         versionComboBox.DataSource = ORom.GetSupportedBuilds().ToList();
     }
     else if (Game == Game.MajorasMask)
     {
         versionComboBox.DataSource = MRom.GetSupportedBuilds().ToList();
     }
 }
コード例 #3
0
ファイル: Program.cs プロジェクト: shawlucas/MasterOcarina
        private static void DisplayHelp()
        {
            Console.WriteLine("compress   \"inputRom\" \"outputRom\" \"GameId\" \"Version\"");
            Console.WriteLine("decompress \"inputRom\" \"outputRom\" \"GameId\" \"Version\"");
            Console.WriteLine("swap       \"inputRom\" \"outputRom\" \"SwapType\"");
            Console.WriteLine();

            Console.Write("Press Enter to Continue...");
            Console.ReadLine();
            Console.Clear();

            Console.WriteLine("Ocarina of Time: use GameId \"oot\"");
            Console.WriteLine("Version:");
            foreach (var item in ORom.GetSupportedBuilds())
            {
                var info = ORom.BuildInformation.Get(item);
                Console.WriteLine(" {0,-5} {1}", info.Version + ":", info.Name);
            }
            Console.WriteLine();

            Console.WriteLine("Majora's Mask: use GameId \"mm\"");
            Console.WriteLine("Version:");
            foreach (var item in MRom.GetSupportedBuilds())
            {
                var info = MRom.BuildInformation.Get(item);
                Console.WriteLine(" {0,-5} {1}", info.Version + ":", info.Name);
            }
            Console.WriteLine();

            Console.Write("Press Enter to Continue...");
            Console.ReadLine();
            Console.Clear();

            Console.WriteLine("Swap Types:");
            //                                    00 01 02 03
            Console.WriteLine("little16: converts 01 00 03 02 -> 00 01 02 03");
            Console.WriteLine("little32: converts 03 02 01 00 -> 00 01 02 03");
            //                                    02 03 00 01


            Console.WriteLine();
            Console.WriteLine("Press Enter to Quit");
            Console.ReadLine();
        }