Esempio n. 1
0
        static void DecompileFixedStringCollection(IDecompiler decompiler, byte[] rom, string name, FixedStringCollection fixedStringCollection)
        {
            // Decompile the strings
            foreach (var fixedStringRef in fixedStringCollection.StringRefs)
            {
                fixedStringRef.Old     =
                    fixedStringRef.New =
                        decompiler.DecompileRange(rom, fixedStringRef.OldPointer,
                                                  fixedStringRef.OldPointer + fixedStringCollection.EntryLength, false);
            }

            // Write JSON
            File.WriteAllText(Path.Combine(options.WorkingDirectory, name + ".json"),
                              JsonConvert.SerializeObject(fixedStringCollection, Formatting.Indented));
        }