static void Main(string[] args) { string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + @"\test.gbc"; if (File.Exists(path)) { GBCDecompiler d = new GBCDecompiler(path); d.Decompile(); } Console.Read(); }
private OP PeekNextOp(int startPos, int opPostion) { long currReaderPos = reader.BaseStream.Position; GBCDecompiler tmp = new GBCDecompiler(); tmp.reader = this.reader; tmp.reader.BaseStream.Position = startPos; while (tmp.reader.BaseStream.Position < opPostion) { tmp.DecompileNextCodeLine(); } OP peekOP = tmp.PeekNextOp(); this.reader.BaseStream.Position = currReaderPos; return(peekOP); }