コード例 #1
0
ファイル: crLOL.cs プロジェクト: DevilboxGames/ToxicRagers
        public static LOL Load(string path)
        {
            FileInfo fi = new FileInfo(path);
            Logger.LogToFile(Logger.LogLevel.Info, "{0}", path);
            LOL lol = new LOL();

            byte[] data = File.ReadAllBytes(path);

            if (data[0] == 0x1b &&
                data[1] == 0x4c &&
                data[2] == 0x75 &&
                data[3] == 0x61 &&
                data[4] == 0x51)
            {
                StringBuilder sb = new StringBuilder();

                data[5] = 0;

                ByteBuffer buffer = new ByteBuffer(data);
                BHeader header = new BHeader(buffer);

                Decompiler d = new Decompiler(header.function.parse(buffer, header));
                d.decompile();
                d.print(new Output((s) => { sb.Append(s); }, () => { sb.Append("\r\n"); }));

                lol.document = sb.ToString();
            }
            else
            {
                lol.document = Encoding.Default.GetString(data);
            }

            return lol;
        }
コード例 #2
0
ファイル: CompareBlock.cs プロジェクト: parhelia512/unluacNet
 public override Operation process(Decompiler d)
 {
     return new CompareBlockOperation(end - 1, end, target,branch);
     //JAVA TO VB & C# CONVERTER TODO TASK: Anonymous inner classes are not converted to .NET:
 }