示例#1
0
        /// <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);
        }
示例#2
0
        /// <summary>
        /// Populate a Famtasia movie file's header information
        /// </summary>
        public static void FMV(ref TreeView tv, ref TASMovie fmv)
        {
            Famtasia movie = (Famtasia)fmv;

            tv.Nodes.Clear();

            tv.Nodes.Add("Header");
            tv.Nodes[0].Nodes.Add("Signature:      " + movie.Header.Signature);
            tv.Nodes[0].Nodes.Add("Movie Title:    " + movie.Extra.Description);
            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[0].Nodes.Add("Emulator ID:    " + movie.Header.EmulatorID);
            tv.Nodes[0].Nodes.Add("Movie Start:    " + movie.Options.MovieStart);

            tv.Nodes.Add("Controllers");
            tv.Nodes[1].Nodes.Add("Controller 1: " + movie.Input.Controllers[0].ToString());
            tv.Nodes[1].Nodes.Add("Controller 2: " + movie.Input.Controllers[1].ToString());

            movie = null; tv.ExpandAll(); tv.Nodes[0].EnsureVisible();
        }