Get started on a Movie class
This commit is contained in:
parent
f912e9976a
commit
cbdcea1341
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{DD448B37-BA3F-4544-9754-5406E8094723}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
|
@ -111,6 +111,9 @@
|
|||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="movie\Movie.cs" />
|
||||
<Compile Include="movie\MovieHeader.cs" />
|
||||
<Compile Include="movie\MovieLog.cs" />
|
||||
<Compile Include="MruStack.cs" />
|
||||
<Compile Include="NameStateForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
class Movie
|
||||
{
|
||||
private MovieHeader Header = new MovieHeader();
|
||||
private MovieLog Log = new MovieLog();
|
||||
|
||||
public Movie()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void AddMovieRecord()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void WriteMovie()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public int GetMovieLength()
|
||||
{
|
||||
return Log.GetMovieLength();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
class MovieHeader
|
||||
{
|
||||
//Required Header Params
|
||||
//Emulation - Core version, will be 1.0.0 until there is a versioning system
|
||||
//Movie - Versioning for the Movie code itself, or perhaps this could be changed client version?
|
||||
//Platform - Must know what platform we are making a movie on!
|
||||
//GameName - Which game
|
||||
//TODO: GUID, checksum of game, other stuff
|
||||
|
||||
Dictionary<string, string> HeaderParams = new Dictionary<string, string>(); //Platform specific options go here
|
||||
|
||||
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("Platform", "");
|
||||
HeaderParams.Add("GameName", "");
|
||||
}
|
||||
|
||||
public MovieHeader(string EmulatorVersion, string MovieVersion, string Platform, string GameName)
|
||||
{
|
||||
HeaderParams.Add("EmulationVersion", EmulatorVersion);
|
||||
HeaderParams.Add("MovieVersion", MovieVersion);
|
||||
HeaderParams.Add("Platform", Platform);
|
||||
HeaderParams.Add("GameName", GameName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the key value pair to header params. If key already exists, value will be updated
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="value"></param>
|
||||
public void AddHeaderLine(string key, string value) //TODO: check for redundancy and return bool?
|
||||
{
|
||||
if (!HeaderParams.TryGetValue(key, out value)) //TODO: does a failed attempt mess with value?
|
||||
HeaderParams.Add(key, value);
|
||||
}
|
||||
|
||||
public bool RemoveHeaderLine(string key)
|
||||
{
|
||||
return HeaderParams.Remove(key);
|
||||
}
|
||||
|
||||
public string GetHeaderLine(string key)
|
||||
{
|
||||
string value = "";
|
||||
HeaderParams.TryGetValue(key, out value);
|
||||
return value;
|
||||
}
|
||||
|
||||
public Dictionary<string, string> GetHeaderInfo()
|
||||
{
|
||||
return HeaderParams;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the controller key presses of a movie
|
||||
/// </summary>
|
||||
class MovieLog
|
||||
{
|
||||
List<string> MovieRecords = new List<string>();
|
||||
|
||||
public MovieLog()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public int GetMovieLength()
|
||||
{
|
||||
return MovieRecords.Count;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue