示例#1
0
 /// <summary>
 /// Try and apply configuration using the <see cref="Symbols"/> data.
 /// </summary>
 public void TryApplyConfiguration(PatcherOptions options)
 {
     try
     {
         // Try and write D-Pad configuration, if D-Pad symbols are found
         this.WriteDPadConfig(options.DPadConfig);
     }
     catch (KeyNotFoundException)
     {
     }
 }
示例#2
0
        /// <summary>
        /// Apply patches.
        /// </summary>
        /// <param name="symbols">Symbols</param>
        /// <param name="options">Options</param>
        public void Apply(Symbols symbols, PatcherOptions options)
        {
            // Write patch data to existing MMFiles
            WriteToROM(symbols);

            // For our custom data, create and insert our own MMFile
            var file = CreateMMFile(symbols);

            RomUtils.AppendFile(file);

            // Encode Symbols into a special MMFile and insert that too
            var symbolsFile = symbols.CreateMMFile();

            RomUtils.AppendFile(symbolsFile);

            // Write our D-Pad config
            symbols.WriteDPadConfig(options.DPadConfig);
        }
示例#3
0
 /// <summary>
 /// Apply patches using <see cref="Symbols"/> loaded from the internal resource.
 /// </summary>
 /// <param name="options">Options</param>
 public void Apply(PatcherOptions options)
 {
     Apply(Symbols.Load(), options);
 }