/// <summary> /// Launch an OpenFileDialog an populate the TASMovieInputCollection object /// according to the type of movie file that's selected /// </summary> private string loadMovie(ref TASMovieInputCollection location) { openDlg = new OpenFileDialog(); openDlg.Filter = TAS_FILTER; openDlg.ShowDialog(); string filename = openDlg.FileName; openDlg.Dispose(); if (filename.Length == 0) { return(null); } TASMovie movie = new TASMovie(); location = new TASMovieInputCollection(); location.Format = IsValid(filename); // load the movie object up with the correct format switch (location.Format) { case MovieType.SMV: movie = new SNES9x(filename); break; case MovieType.FCM: movie = new FCEU(filename); break; case MovieType.GMV: movie = new Gens(filename); break; case MovieType.FMV: movie = new Famtasia(filename); break; case MovieType.VBM: movie = new VisualBoyAdvance(filename); break; case MovieType.M64: movie = new Mupen64(filename); break; case MovieType.MMV: movie = new Dega(filename); break; case MovieType.PXM: movie = new PCSX(filename); break; // shares with PJM case MovieType.PJM: movie = new PCSX(filename); break; // shares with PXM } location.Input = movie.Input.FrameData; location.Controllers = movie.Input.ControllerCount; return(filename); }
/// <summary> /// Populate a Mupen64 movie file's header information /// </summary> public static void M64(ref TreeView tv, ref TASMovie m64) { Mupen64 movie = (Mupen64)m64; tv.Nodes.Clear(); tv.Nodes.Add("Header"); tv.Nodes[0].Nodes.Add("Signature: " + movie.Header.Signature); tv.Nodes[0].Nodes.Add("Version: " + movie.Header.Version.ToString()); tv.Nodes[0].Nodes.Add("UID: " + movie.Header.UID); tv.Nodes[0].Nodes.Add("Frame Count: " + String.Format("{0:0,0}", movie.Header.FrameCount)); tv.Nodes[0].Nodes.Add("Rerecord Count: " + String.Format("{0:0,0}", movie.Header.RerecordCount)); tv.Nodes.Add("Options"); tv.Nodes[1].Nodes.Add("FPS: " + movie.Options.FPS); tv.Nodes[1].Nodes.Add("Movie Start: " + movie.Options.MovieStart); tv.Nodes.Add("ROM Information"); tv.Nodes[2].Nodes.Add("Name: " + movie.Extra.ROM); tv.Nodes[2].Nodes.Add("CRC: " + movie.Extra.CRC); tv.Nodes[2].Nodes.Add("Country: " + movie.Extra.Country); tv.Nodes.Add("Extra Information"); tv.Nodes[3].Nodes.Add("Author: " + movie.Extra.Author); tv.Nodes[3].Nodes.Add("Description: " + movie.Extra.Description); tv.Nodes[3].Nodes.Add("Video Plugin: " + movie.M64Specific.VideoPlugin); tv.Nodes[3].Nodes.Add("Audio Plugin: " + movie.M64Specific.AudioPlugin); tv.Nodes[3].Nodes.Add("Input Plugin: " + movie.M64Specific.InputPlugin); tv.Nodes[3].Nodes.Add("RSP Plugin: " + movie.M64Specific.RSPPlugin); tv.Nodes.Add("Controller Information"); for (int i = 0; i < 4; i++) { tv.Nodes[4].Nodes.Add("Controller " + (i + 1)); tv.Nodes[4].Nodes[i].Nodes.Add("Controller Present: " + movie.M64Specific.Controller[i].Option[0]); tv.Nodes[4].Nodes[i].Nodes.Add("Mempak Present: " + movie.M64Specific.Controller[i].Option[1]); tv.Nodes[4].Nodes[i].Nodes.Add("Rumblepak Present: " + movie.M64Specific.Controller[i].Option[2]); } movie = null; tv.ExpandAll(); tv.Nodes[0].EnsureVisible(); }