void Open(params string[] files) { if (files.Length <= 0) { return; } if (files.Length == 1) { recents.FileOpened(files[0]); } var lastFile = Path.GetFileName(files.Last()); Title = $"{lastFile} - ThnPlayer"; Audio.ReleaseAllSfx(); toReload = files; decompiled = files.Select(x => new DecompiledThn() { Name = Path.GetFileName(x), Text = ThnDecompile.Decompile(x) }).ToArray(); var ctx = new ThnScriptContext(null); cutscene = new Cutscene(ctx, GameData, new Rectangle(0, 0, Width, Height), this); cutscene.BeginScene(files.Select(x => new ThnScript(x))); }
public static void Main(string[] args) { if (args.Length == 0) { Console.Error.WriteLine("thorn2lua: input.thn [output.lua]"); return; } else if (args.Length == 1) { Console.WriteLine(ThnDecompile.Decompile(args[0])); } else { File.WriteAllText(args[1], ThnDecompile.Decompile(args[0])); } }
void Open(params string[] files) { var lastFile = Path.GetFileName(files.Last()); Title = $"{lastFile} - ThnPlayer"; Audio.ReleaseAllSfx(); toReload = files; decompiled = files.Select(x => new DecompiledThn() { Name = Path.GetFileName(x), Text = ThnDecompile.Decompile(x) }).ToArray(); var ctx = new ThnScriptContext(files.Select(x => new ThnScript(x))); cutscene = new Cutscene(ctx, GameData, new Viewport(0, 0, Width, Height), this); }