diff --git a/BizHawk.MultiClient/Config.cs b/BizHawk.MultiClient/Config.cs index 7620863f55..905af9deb3 100644 --- a/BizHawk.MultiClient/Config.cs +++ b/BizHawk.MultiClient/Config.cs @@ -153,6 +153,7 @@ namespace BizHawk.MultiClient public bool AutoLoadLastSaveSlot = false; public bool WIN32_CONSOLE = true; public bool SkipLagFrame = false; + public string MovieExtension = "bkm"; // Run-Control settings public int FrameProgressDelayMs = 500; //how long until a frame advance hold turns into a frame progress? diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index eabd9789ac..39e145cff6 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -885,7 +885,7 @@ namespace BizHawk.MultiClient case "GB": str += "gb"; break; } - return str + ".tas"; + return str + "." + Global.Config.MovieExtension; } private void HandlePlatformMenus() @@ -2732,7 +2732,7 @@ namespace BizHawk.MultiClient if (warningMsg.Length > 0) Global.RenderPanel.AddMessage(warningMsg); else - Global.RenderPanel.AddMessage(Path.GetFileName(fn) + " imported as .tas"); + Global.RenderPanel.AddMessage(Path.GetFileName(fn) + " imported as ." + Global.Config.MovieExtension); } } diff --git a/BizHawk.MultiClient/PlayMovie.cs b/BizHawk.MultiClient/PlayMovie.cs index 197d68855c..1e18b18de7 100644 --- a/BizHawk.MultiClient/PlayMovie.cs +++ b/BizHawk.MultiClient/PlayMovie.cs @@ -72,8 +72,7 @@ namespace BizHawk.MultiClient { OpenFileDialog ofd = new OpenFileDialog(); ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.MoviesPath, ""); - ofd.Filter = "Generic Movie Files (*.tas)|*.tas;*.zip;*.7z|" + Global.MainForm.GetMovieExtName() + "|Savestates|*.state|Archive Files|*.zip;*.7z|All Files|*.*"; - //ofd.Filter = "Generic Movie Files (*.tas)|*.tas;*.zip;*.7z|Savestates|*.state|Archive Files|*.zip;*.7z|All Files|*.*"; + ofd.Filter = "Generic Movie Files (*." + Global.Config.MovieExtension + ")|*." + Global.Config.MovieExtension + ";*.zip;*.7z|" + Global.MainForm.GetMovieExtName() + "|Savestates|*.state|Archive Files|*.zip;*.7z|All Files|*.*"; Global.Sound.StopSound(); var result = ofd.ShowDialog(); @@ -269,7 +268,7 @@ namespace BizHawk.MultiClient if (!Directory.Exists(d)) Directory.CreateDirectory(d); - foreach (string f in Directory.GetFiles(d, "*.tas")) + foreach (string f in Directory.GetFiles(d, "*." + Global.Config.MovieExtension)) AddMovieToList(f); if (Global.Config.PlayMovie_ShowStateFiles) { @@ -282,7 +281,7 @@ namespace BizHawk.MultiClient string[] subs = Directory.GetDirectories(d); foreach (string dir in subs) { - foreach (string f in Directory.GetFiles(dir, "*.tas")) + foreach (string f in Directory.GetFiles(dir, "*." + Global.Config.MovieExtension)) AddMovieToList(f); if (Global.Config.PlayMovie_ShowStateFiles) { @@ -370,7 +369,7 @@ namespace BizHawk.MultiClient string[] filePaths = (string[])e.Data.GetData(DataFormats.FileDrop); foreach (string path in filePaths) { - if (Path.GetExtension(path) == ".tas") + if (Path.GetExtension(path) == "." + Global.Config.MovieExtension) AddMovieToList(path); } } diff --git a/BizHawk.MultiClient/RecordMovie.cs b/BizHawk.MultiClient/RecordMovie.cs index 9d637b3a63..49d2e0f4ba 100644 --- a/BizHawk.MultiClient/RecordMovie.cs +++ b/BizHawk.MultiClient/RecordMovie.cs @@ -36,8 +36,8 @@ namespace BizHawk.MultiClient path = path.Insert(0, "\\"); path = PathManager.MakeAbsolutePath(Global.Config.MoviesPath, "") + path; - if (path[path.Length - 4] != '.') //If no file extension, add .tas - path += ".tas"; + if (path[path.Length - 4] != '.') //If no file extension, add movie extension + path += "." + Global.Config.MovieExtension; return path; } else @@ -118,10 +118,9 @@ namespace BizHawk.MultiClient { SaveFileDialog sfd = new SaveFileDialog(); sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.MoviesPath, ""); - sfd.DefaultExt = ".tas"; + sfd.DefaultExt = "." + Global.Config.MovieExtension; sfd.FileName = PathManager.FilesystemSafeName(Global.Game) + "." + sfd.DefaultExt; - sfd.Filter = "Generic Movie Files (*.tas)|*.tas|" + Global.MainForm.GetMovieExtName() + "|All Files (*.*)|*.*"; - //sfd.Filter = "Generic Movie Files (*.tas)|*.tas|All Files (*.*)|*.*"; + sfd.Filter = "Generic Movie Files (*." + Global.Config.MovieExtension + ")|*." + Global.Config.MovieExtension + "|" + Global.MainForm.GetMovieExtName() + "|All Files (*.*)|*.*"; Global.Sound.StopSound(); var result = sfd.ShowDialog(); diff --git a/BizHawk.MultiClient/movie/MovieImport.cs b/BizHawk.MultiClient/movie/MovieImport.cs index 7e557e6daa..be23b891c4 100644 --- a/BizHawk.MultiClient/movie/MovieImport.cs +++ b/BizHawk.MultiClient/movie/MovieImport.cs @@ -90,7 +90,7 @@ namespace BizHawk.MultiClient { errorMsg = ""; warningMsg = ""; - Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY); + Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY); FileInfo file = new FileInfo(path); StreamReader sr = file.OpenText(); string[] buttons = new string[] { }; @@ -307,7 +307,7 @@ namespace BizHawk.MultiClient { errorMsg = ""; warningMsg = ""; - Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY); + Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY); FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); BinaryReader r = new BinaryReader(fs); // 000 4-byte signature: 46 43 4D 1A "FCM\x1A" @@ -562,7 +562,7 @@ namespace BizHawk.MultiClient { errorMsg = ""; warningMsg = ""; - Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY); + Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY); FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); BinaryReader r = new BinaryReader(fs); // 000 4-byte signature: 46 4D 56 1A "FMV\x1A" @@ -692,7 +692,7 @@ namespace BizHawk.MultiClient { errorMsg = ""; warningMsg = ""; - Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY); + Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY); FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); BinaryReader r = new BinaryReader(fs); // 000 16-byte signature and format version: "Gens Movie TEST9" @@ -806,7 +806,7 @@ namespace BizHawk.MultiClient { errorMsg = ""; warningMsg = ""; - Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY); + Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY); FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); BinaryReader r = new BinaryReader(fs); // 000 8-byte "MDFNMOVI" signature @@ -929,7 +929,7 @@ namespace BizHawk.MultiClient { errorMsg = ""; warningMsg = ""; - Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY); + Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY); FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); BinaryReader r = new BinaryReader(fs); // 0000: 4-byte signature: "MMV\0" @@ -1044,7 +1044,7 @@ namespace BizHawk.MultiClient { errorMsg = ""; warningMsg = ""; - Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY); + Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY); FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); BinaryReader r = new BinaryReader(fs); // 000 4-byte signature: 4E 53 53 1A "NSS\x1A" @@ -1293,7 +1293,7 @@ namespace BizHawk.MultiClient // SMV 1.43 file format: http://code.google.com/p/snes9x-rr/wiki/SMV143 private static Movie ImportSMV143(BinaryReader r, string path) { - Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY); + Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY); uint GUID = r.ReadUInt32(); m.Header.SetHeaderLine(MovieHeader.GUID, GUID.ToString()); //TODO: format to hex string m.SetRerecords((int)r.ReadUInt32()); @@ -1348,7 +1348,7 @@ namespace BizHawk.MultiClient // SMV 1.51 file format: http://code.google.com/p/snes9x-rr/wiki/SMV151 private static Movie ImportSMV151(BinaryReader r, string path) { - Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY); + Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY); m.Header.Comments.Add(EMULATIONORIGIN + " Snes9x version 1.51"); m.Header.Comments.Add(MOVIEORIGIN + " .SMV"); return m; @@ -1356,7 +1356,7 @@ namespace BizHawk.MultiClient private static Movie ImportSMV152(BinaryReader r, string path) { - Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY); + Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY); uint GUID = r.ReadUInt32(); m.Header.Comments.Add(EMULATIONORIGIN + " Snes9x version 1.52"); m.Header.Comments.Add(MOVIEORIGIN + " .SMV"); @@ -1368,7 +1368,7 @@ namespace BizHawk.MultiClient { errorMsg = ""; warningMsg = ""; - Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY); + Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY); FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); BinaryReader r = new BinaryReader(fs); // 000 4-byte signature: 56 42 4D 1A "VBM\x1A" @@ -1594,7 +1594,7 @@ namespace BizHawk.MultiClient { errorMsg = ""; warningMsg = ""; - Movie m = new Movie(path + ".tas", MOVIEMODE.PLAY); + Movie m = new Movie(path + "." + Global.Config.MovieExtension, MOVIEMODE.PLAY); FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); BinaryReader r = new BinaryReader(fs); // 000 12-byte signature: "VirtuaNES MV" diff --git a/BizHawk.MultiClient/tools/TAStudio.cs b/BizHawk.MultiClient/tools/TAStudio.cs index 9d9856ff23..c439872b41 100644 --- a/BizHawk.MultiClient/tools/TAStudio.cs +++ b/BizHawk.MultiClient/tools/TAStudio.cs @@ -32,7 +32,7 @@ namespace BizHawk.MultiClient //Movie header object - to have the main project header data //List MacroFiles - list of .macro files (simply log files) - //List TimeLines - list of .tas files + //List TimeLines - list of movie files //List Bookmarks - list of savestate files public TAStudio()