diff --git a/BizHawk.MultiClient/MainForm.Designer.cs b/BizHawk.MultiClient/MainForm.Designer.cs index 16d955319f..826a6528dc 100644 --- a/BizHawk.MultiClient/MainForm.Designer.cs +++ b/BizHawk.MultiClient/MainForm.Designer.cs @@ -179,6 +179,8 @@ this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.EmuStatus = new System.Windows.Forms.ToolStripStatusLabel(); + this.readonlyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator15 = new System.Windows.Forms.ToolStripSeparator(); this.menuStrip1.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.SuspendLayout(); @@ -617,6 +619,8 @@ // movieToolStripMenuItem // this.movieToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.readonlyToolStripMenuItem, + this.toolStripSeparator15, this.recentToolStripMenuItem, this.recordMovieToolStripMenuItem, this.playMovieToolStripMenuItem, @@ -1367,6 +1371,18 @@ this.EmuStatus.Size = new System.Drawing.Size(162, 17); this.EmuStatus.Text = "Currently emulating: ur mom"; // + // readonlyToolStripMenuItem + // + this.readonlyToolStripMenuItem.Name = "readonlyToolStripMenuItem"; + this.readonlyToolStripMenuItem.Size = new System.Drawing.Size(182, 22); + this.readonlyToolStripMenuItem.Text = "Read-only"; + this.readonlyToolStripMenuItem.Click += new System.EventHandler(this.readonlyToolStripMenuItem_Click); + // + // toolStripSeparator15 + // + this.toolStripSeparator15.Name = "toolStripSeparator15"; + this.toolStripSeparator15.Size = new System.Drawing.Size(179, 6); + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1543,6 +1559,8 @@ private System.Windows.Forms.ToolStripMenuItem disableSaveslotKeysOnLoToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem pathsToolStripMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripSeparator14; + private System.Windows.Forms.ToolStripMenuItem readonlyToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator15; } } diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 5722b970eb..70e82f8631 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -24,6 +24,7 @@ namespace BizHawk.MultiClient //TODO: adelikat: can this be the official file extension? public Movie InputLog = new Movie("log.tas", MOVIEMODE.RECORD); //This movie is always recording while user is playing public Movie UserMovie = new Movie("", MOVIEMODE.INACTIVE); + public bool ReadOnly = true; //Global Movie Read only setting //the currently selected savestate slot private int SaveSlot = 0; @@ -1682,6 +1683,20 @@ namespace BizHawk.MultiClient stopMovieToolStripMenuItem.Enabled = true; playFromBeginningToolStripMenuItem.Enabled = true; } + + if (ReadOnly) + readonlyToolStripMenuItem.Checked = true; + else + readonlyToolStripMenuItem.Checked = false; + } + + private void readonlyToolStripMenuItem_Click(object sender, EventArgs e) + { + ReadOnly ^= true; + if (ReadOnly) + Global.RenderPanel.AddMessage("Movie read-only mode"); + else + Global.RenderPanel.AddMessage("Movie read+write mode"); } } } \ No newline at end of file diff --git a/BizHawk.MultiClient/movie/Movie.cs b/BizHawk.MultiClient/movie/Movie.cs index 45b7199dad..92e296bbe4 100644 --- a/BizHawk.MultiClient/movie/Movie.cs +++ b/BizHawk.MultiClient/movie/Movie.cs @@ -18,6 +18,7 @@ namespace BizHawk.MultiClient private MOVIEMODE MovieMode = new MOVIEMODE(); public int lastLog; + public int rerecordCount; //TODO: //Author field, needs to be passed in by a record or play dialog @@ -27,6 +28,7 @@ namespace BizHawk.MultiClient Filename = filename; //TODO: Validate that file is writable MovieMode = m; lastLog = 0; + rerecordCount = 0; } public string GetFilePath() @@ -55,7 +57,7 @@ namespace BizHawk.MultiClient { MovieMode = MOVIEMODE.RECORD; Log.Clear(); - Header = new MovieHeader("BizHawk v1.0.0", MovieHeader.MovieVersion, Global.Emulator.SystemId, Global.Game.Name, ""); + Header = new MovieHeader("BizHawk v1.0.0", MovieHeader.MovieVersion, Global.Emulator.SystemId, Global.Game.Name, "", 0); } public void StartPlayback() @@ -181,7 +183,6 @@ namespace BizHawk.MultiClient { Header.Comments.Add(str); } - } } diff --git a/BizHawk.MultiClient/movie/MovieHeader.cs b/BizHawk.MultiClient/movie/MovieHeader.cs index c0c164345e..d27af67e37 100644 --- a/BizHawk.MultiClient/movie/MovieHeader.cs +++ b/BizHawk.MultiClient/movie/MovieHeader.cs @@ -22,25 +22,28 @@ namespace BizHawk.MultiClient public const string PLATFORM = "Platform"; public const string GAMENAME = "GameName"; public const string AUTHOR = "Author"; + public const string RERECORDS = "Rerecords"; public static string MovieVersion = "BizHawk v0.0.1"; public MovieHeader() //All required fields will be set to default values { - HeaderParams.Add(EMULATIONVERSION, "v1.0.0"); - HeaderParams.Add(MOVIEVERSION, "v1.0.0"); + HeaderParams.Add(EMULATIONVERSION, "BizHawk v1.0.0"); + HeaderParams.Add(MOVIEVERSION, MovieVersion); HeaderParams.Add(PLATFORM, ""); HeaderParams.Add(GAMENAME, ""); HeaderParams.Add(AUTHOR, ""); + HeaderParams.Add(RERECORDS, "0"); } - public MovieHeader(string EmulatorVersion, string MovieVersion, string Platform, string GameName, string Author) + public MovieHeader(string EmulatorVersion, string MovieVersion, string Platform, string GameName, string Author, int rerecords) { - HeaderParams.Add("EmulationVersion", EmulatorVersion); - HeaderParams.Add("MovieVersion", MovieVersion); - HeaderParams.Add("Platform", Platform); - HeaderParams.Add("GameName", GameName); - HeaderParams.Add("Author", Author); + HeaderParams.Add(EMULATIONVERSION, EmulatorVersion); + HeaderParams.Add(MOVIEVERSION, MovieVersion); + HeaderParams.Add(PLATFORM, Platform); + HeaderParams.Add(GAMENAME, GameName); + HeaderParams.Add(AUTHOR, Author); + HeaderParams.Add(RERECORDS, rerecords.ToString()); } ///