More movie code reorg
This commit is contained in:
parent
898155f5be
commit
1ab1538f8b
|
@ -133,15 +133,19 @@
|
|||
<Compile Include="lua\LuaLibraryBase.cs" />
|
||||
<Compile Include="lua\LuaMemoryBase.cs" />
|
||||
<Compile Include="lua\NamedLuaFunction.cs" />
|
||||
<Compile Include="movie\bk2\Movie2.cs" />
|
||||
<Compile Include="movie\bk2\MovieHeader2.cs" />
|
||||
<Compile Include="movie\bkm\Movie.cs" />
|
||||
<Compile Include="movie\bkm\Movie.HeaderApi.cs" />
|
||||
<Compile Include="movie\bkm\Movie.InputLog.cs" />
|
||||
<Compile Include="movie\bkm\Movie.IO.cs" />
|
||||
<Compile Include="movie\bkm\Movie.ModeApi.cs" />
|
||||
<Compile Include="movie\bkm\MovieHeader.cs" />
|
||||
<Compile Include="movie\bkm\MovieLog.cs" />
|
||||
<Compile Include="movie\bk2\Bk2Header.cs" />
|
||||
<Compile Include="movie\bk2\Bk2Movie.cs" />
|
||||
<Compile Include="movie\bk2\Bk2Movie.HeaderApi.cs" />
|
||||
<Compile Include="movie\bk2\Bk2Movie.InputLog.cs" />
|
||||
<Compile Include="movie\bk2\Bk2Movie.IO.cs" />
|
||||
<Compile Include="movie\bk2\Bk2Movie.ModeApi.cs" />
|
||||
<Compile Include="movie\bkm\BkmHeader.cs" />
|
||||
<Compile Include="movie\bkm\BkmLog.cs" />
|
||||
<Compile Include="movie\bkm\BkmMovie.cs" />
|
||||
<Compile Include="movie\bkm\BkmMovie.HeaderApi.cs" />
|
||||
<Compile Include="movie\bkm\BkmMovie.InputLog.cs" />
|
||||
<Compile Include="movie\bkm\BkmMovie.IO.cs" />
|
||||
<Compile Include="movie\bkm\BkmMovie.ModeApi.cs" />
|
||||
<Compile Include="movie\HeaderKeys.cs" />
|
||||
<Compile Include="movie\InputAdapters.cs" />
|
||||
<Compile Include="movie\interfaces\IMovie.cs" />
|
||||
|
|
|
@ -65,9 +65,9 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// Attempt to import another type of movie file into a movie object.
|
||||
public static Movie ImportFile(string path, out string errorMsg, out string warningMsg)
|
||||
public static BkmMovie ImportFile(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
Movie m = new Movie();
|
||||
BkmMovie m = new BkmMovie();
|
||||
errorMsg = string.Empty;
|
||||
warningMsg = string.Empty;
|
||||
|
||||
|
@ -155,7 +155,7 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// Import a frame from a text-based format.
|
||||
private static Movie ImportTextFrame(string line, int lineNum, Movie m, string path, string platform,
|
||||
private static BkmMovie ImportTextFrame(string line, int lineNum, BkmMovie m, string path, string platform,
|
||||
ref string warningMsg)
|
||||
{
|
||||
string[] buttons = new string[] { };
|
||||
|
@ -289,7 +289,7 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// Import a subtitle from a text-based format.
|
||||
private static Movie ImportTextSubtitle(string line, Movie m, string path)
|
||||
private static BkmMovie ImportTextSubtitle(string line, BkmMovie m, string path)
|
||||
{
|
||||
line = SingleSpaces(line);
|
||||
// The header name, frame, and message are separated by whitespace.
|
||||
|
@ -319,10 +319,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// Import a text-based movie format. This works for .FM2, .MC2, and .YMV.
|
||||
private static Movie ImportText(string path, out string errorMsg, out string warningMsg)
|
||||
private static BkmMovie ImportText(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = warningMsg = string.Empty;
|
||||
Movie m = new Movie(path + "." + MovieService.DefaultExtension);
|
||||
BkmMovie m = new BkmMovie(path + "." + MovieService.DefaultExtension);
|
||||
FileInfo file = new FileInfo(path);
|
||||
StreamReader sr = file.OpenText();
|
||||
string emulator = string.Empty;
|
||||
|
@ -516,10 +516,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// FCM file format: http://code.google.com/p/fceu/wiki/FCM
|
||||
private static Movie ImportFCM(string path, out string errorMsg, out string warningMsg)
|
||||
private static BkmMovie ImportFCM(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = warningMsg = string.Empty;
|
||||
Movie m = new Movie(path + "." + MovieService.DefaultExtension);
|
||||
BkmMovie m = new BkmMovie(path + "." + MovieService.DefaultExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 4-byte signature: 46 43 4D 1A "FCM\x1A"
|
||||
|
@ -762,16 +762,16 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// FM2 file format: http://www.fceux.com/web/FM2.html
|
||||
private static Movie ImportFM2(string path, out string errorMsg, out string warningMsg)
|
||||
private static BkmMovie ImportFM2(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
return ImportText(path, out errorMsg, out warningMsg);
|
||||
}
|
||||
|
||||
// FMV file format: http://tasvideos.org/FMV.html
|
||||
private static Movie ImportFMV(string path, out string errorMsg, out string warningMsg)
|
||||
private static BkmMovie ImportFMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = warningMsg = string.Empty;
|
||||
Movie m = new Movie(path + "." + MovieService.DefaultExtension);
|
||||
BkmMovie m = new BkmMovie(path + "." + MovieService.DefaultExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 4-byte signature: 46 4D 56 1A "FMV\x1A"
|
||||
|
@ -908,10 +908,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// GMV file format: http://code.google.com/p/gens-rerecording/wiki/GMV
|
||||
private static Movie ImportGMV(string path, out string errorMsg, out string warningMsg)
|
||||
private static BkmMovie ImportGMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = warningMsg = string.Empty;
|
||||
Movie m = new Movie(path + "." + MovieService.DefaultExtension);
|
||||
BkmMovie m = new BkmMovie(path + "." + MovieService.DefaultExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 16-byte signature and format version: "Gens Movie TEST9"
|
||||
|
@ -1032,10 +1032,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// LSMV file format: http://tasvideos.org/Lsnes/Movieformat.html
|
||||
private static Movie ImportLSMV(string path, out string errorMsg, out string warningMsg)
|
||||
private static BkmMovie ImportLSMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = warningMsg = string.Empty;
|
||||
Movie m = new Movie(path + "." + MovieService.DefaultExtension);
|
||||
BkmMovie m = new BkmMovie(path + "." + MovieService.DefaultExtension);
|
||||
HawkFile hf = new HawkFile(path);
|
||||
// .LSMV movies are .zip files containing data files.
|
||||
if (!hf.IsArchive)
|
||||
|
@ -1266,10 +1266,10 @@ namespace BizHawk.Client.Common
|
|||
MCM file format: http://code.google.com/p/mednafen-rr/wiki/MCM
|
||||
Mednafen-rr switched to MC2 from r261, so see r260 for details.
|
||||
*/
|
||||
private static Movie ImportMCM(string path, out string errorMsg, out string warningMsg)
|
||||
private static BkmMovie ImportMCM(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = warningMsg = string.Empty;
|
||||
Movie m = new Movie(path + "." + MovieService.DefaultExtension);
|
||||
BkmMovie m = new BkmMovie(path + "." + MovieService.DefaultExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 8-byte "MDFNMOVI" signature
|
||||
|
@ -1381,16 +1381,16 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// MC2 file format: http://code.google.com/p/pcejin/wiki/MC2
|
||||
private static Movie ImportMC2(string path, out string errorMsg, out string warningMsg)
|
||||
private static BkmMovie ImportMC2(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
return ImportText(path, out errorMsg, out warningMsg);
|
||||
}
|
||||
|
||||
// MMV file format: http://tasvideos.org/MMV.html
|
||||
private static Movie ImportMMV(string path, out string errorMsg, out string warningMsg)
|
||||
private static BkmMovie ImportMMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = warningMsg = string.Empty;
|
||||
Movie m = new Movie(path + "." + MovieService.DefaultExtension);
|
||||
BkmMovie m = new BkmMovie(path + "." + MovieService.DefaultExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 0000: 4-byte signature: "MMV\0"
|
||||
|
@ -1501,10 +1501,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// NMV file format: http://tasvideos.org/NMV.html
|
||||
private static Movie ImportNMV(string path, out string errorMsg, out string warningMsg)
|
||||
private static BkmMovie ImportNMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = warningMsg = string.Empty;
|
||||
Movie m = new Movie(path + "." + MovieService.DefaultExtension);
|
||||
BkmMovie m = new BkmMovie(path + "." + MovieService.DefaultExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 4-byte signature: 4E 53 53 1A "NSS\x1A"
|
||||
|
@ -1728,10 +1728,10 @@ namespace BizHawk.Client.Common
|
|||
return m;
|
||||
}
|
||||
|
||||
private static Movie ImportSMV(string path, out string errorMsg, out string warningMsg)
|
||||
private static BkmMovie ImportSMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = warningMsg = string.Empty;
|
||||
Movie m = new Movie(path + "." + MovieService.DefaultExtension);
|
||||
BkmMovie m = new BkmMovie(path + "." + MovieService.DefaultExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 4-byte signature: 53 4D 56 1A "SMV\x1A"
|
||||
|
@ -1999,10 +1999,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// VBM file format: http://code.google.com/p/vba-rerecording/wiki/VBM
|
||||
private static Movie ImportVBM(string path, out string errorMsg, out string warningMsg)
|
||||
private static BkmMovie ImportVBM(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = warningMsg = string.Empty;
|
||||
Movie m = new Movie(path + "." + MovieService.DefaultExtension);
|
||||
BkmMovie m = new BkmMovie(path + "." + MovieService.DefaultExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 4-byte signature: 56 42 4D 1A "VBM\x1A"
|
||||
|
@ -2269,10 +2269,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// VMV file format: http://tasvideos.org/VMV.html
|
||||
private static Movie ImportVMV(string path, out string errorMsg, out string warningMsg)
|
||||
private static BkmMovie ImportVMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = warningMsg = string.Empty;
|
||||
Movie m = new Movie(path + "." + MovieService.DefaultExtension);
|
||||
BkmMovie m = new BkmMovie(path + "." + MovieService.DefaultExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 12-byte signature: "VirtuaNES MV"
|
||||
|
@ -2487,16 +2487,16 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// YMV file format: https://code.google.com/p/yabause-rr/wiki/YMVfileformat
|
||||
private static Movie ImportYMV(string path, out string errorMsg, out string warningMsg)
|
||||
private static BkmMovie ImportYMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
return ImportText(path, out errorMsg, out warningMsg);
|
||||
}
|
||||
|
||||
// ZMV file format: http://tasvideos.org/ZMV.html
|
||||
private static Movie ImportZMV(string path, out string errorMsg, out string warningMsg)
|
||||
private static BkmMovie ImportZMV(string path, out string errorMsg, out string warningMsg)
|
||||
{
|
||||
errorMsg = warningMsg = string.Empty;
|
||||
Movie m = new Movie(path + "." + MovieService.DefaultExtension);
|
||||
BkmMovie m = new BkmMovie(path + "." + MovieService.DefaultExtension);
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
// 000 3-byte signature: 5A 4D 56 "ZMV"
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace BizHawk.Client.Common
|
|||
// TODO: open the file and determine the format, and instantiate the appropriate implementation
|
||||
// Currently we just assume it is a bkm implementation
|
||||
// TODO: change IMovies to take HawkFiles only and not path
|
||||
return new Movie(path);
|
||||
return new BkmMovie(path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -48,7 +48,7 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
get
|
||||
{
|
||||
return new Movie();
|
||||
return new BkmMovie();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,197 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BizHawk.Client.Common
|
||||
{
|
||||
public partial class Bk2Movie : IMovie
|
||||
{
|
||||
public IDictionary<string, string> HeaderEntries
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public SubtitleList Subtitles
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public IList<string> Comments
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public string SyncSettingsJson
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string SavestateBinaryBase64Blob
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public ulong Rerecords
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool StartsFromSavestate
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string GameName
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string SystemID
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string Hash
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string Author
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string Core
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string Platform
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string BoardName
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string EmulatorVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string FirmwareHash
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using BizHawk.Common;
|
||||
|
||||
namespace BizHawk.Client.Common
|
||||
{
|
||||
public partial class Bk2Movie : IMovie
|
||||
{
|
||||
public void Save()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void SaveBackup()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool Load()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool PreLoadText(HawkFile hawkFile)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BizHawk.Client.Common
|
||||
{
|
||||
public partial class Bk2Movie : IMovie
|
||||
{
|
||||
public string GetInputLog()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool ExtractInputLog(TextReader reader, out string errorMessage)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool CheckTimeLines(TextReader reader, out string errorMessage)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BizHawk.Client.Common
|
||||
{
|
||||
public partial class Bk2Movie : IMovie
|
||||
{
|
||||
private enum Moviemode { Inactive, Play, Record, Finished }
|
||||
private Moviemode _mode = Moviemode.Inactive;
|
||||
|
||||
public bool IsActive
|
||||
{
|
||||
get { return _mode != Moviemode.Inactive; }
|
||||
}
|
||||
|
||||
public bool IsPlaying
|
||||
{
|
||||
get { return _mode == Moviemode.Play || _mode == Moviemode.Finished; }
|
||||
}
|
||||
|
||||
public bool IsRecording
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public bool IsFinished
|
||||
{
|
||||
get { return _mode == Moviemode.Finished; }
|
||||
}
|
||||
|
||||
public void StartNewRecording()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void StartNewPlayback()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void SwitchToRecord()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void SwitchToPlay()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Stop(bool saveChanges = true)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Emulation.Common;
|
||||
|
||||
namespace BizHawk.Client.Common
|
||||
{
|
||||
public partial class Bk2Movie : IMovie
|
||||
{
|
||||
private readonly MovieLog _log = new MovieLog();
|
||||
private readonly PlatformFrameRates _frameRates = new PlatformFrameRates();
|
||||
|
||||
private bool MakeBackup { get; set; }
|
||||
|
||||
public Bk2Movie(string filename, bool startsFromSavestate = false)
|
||||
: this(startsFromSavestate)
|
||||
{
|
||||
Rerecords = 0;
|
||||
Filename = filename;
|
||||
}
|
||||
|
||||
public Bk2Movie(bool startsFromSavestate = false)
|
||||
{
|
||||
Filename = string.Empty;
|
||||
StartsFromSavestate = startsFromSavestate;
|
||||
|
||||
IsCountingRerecords = true;
|
||||
_mode = Moviemode.Inactive;
|
||||
MakeBackup = true;
|
||||
}
|
||||
|
||||
#region Implementation
|
||||
|
||||
public string PreferredExtension { get { return "bk2"; } }
|
||||
public bool IsCountingRerecords { get; set; }
|
||||
|
||||
public bool Changes
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
private set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public double FrameCount
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public double Fps
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public TimeSpan Time
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public int InputLogLength
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public string Filename
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public void AppendFrame(IController source)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void RecordFrame(int frame, IController source)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Truncate(int frame)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetInput(int frame)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Probably won't support
|
||||
public void PokeFrame(int frame, IController source)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void ClearFrame(int frame)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,381 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Emulation.Common;
|
||||
|
||||
namespace BizHawk.Client.Common
|
||||
{
|
||||
public class Movie2 : IMovie
|
||||
{
|
||||
private enum Moviemode { Inactive, Play, Record, Finished }
|
||||
|
||||
private readonly MovieLog _log = new MovieLog();
|
||||
private readonly PlatformFrameRates _frameRates = new PlatformFrameRates();
|
||||
private Moviemode _mode = Moviemode.Inactive;
|
||||
private bool MakeBackup { get; set; }
|
||||
|
||||
public Movie2(string filename, bool startsFromSavestate = false)
|
||||
: this(startsFromSavestate)
|
||||
{
|
||||
Rerecords = 0;
|
||||
Filename = filename;
|
||||
}
|
||||
|
||||
public Movie2(bool startsFromSavestate = false)
|
||||
{
|
||||
Filename = string.Empty;
|
||||
StartsFromSavestate = startsFromSavestate;
|
||||
|
||||
IsCountingRerecords = true;
|
||||
_mode = Moviemode.Inactive;
|
||||
MakeBackup = true;
|
||||
}
|
||||
|
||||
#region Implementation
|
||||
|
||||
public string PreferredExtension { get { return "bk2"; } }
|
||||
public bool IsCountingRerecords { get; set; }
|
||||
|
||||
public bool PreLoadText(HawkFile hawkFile)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public SubtitleList Subtitles
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public IList<string> Comments
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public string SyncSettingsJson
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string SavestateBinaryBase64Blob
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public ulong Rerecords
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool StartsFromSavestate
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string GameName
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string SystemID
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string Hash
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public IDictionary<string, string> HeaderEntries
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string Author
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string Platform
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string EmulatorVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string FirmwareHash
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string Core
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string BoardName
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveBackup()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool IsActive
|
||||
{
|
||||
get { return _mode != Moviemode.Inactive; }
|
||||
}
|
||||
|
||||
public bool IsPlaying
|
||||
{
|
||||
get { return _mode == Moviemode.Play || _mode == Moviemode.Finished; }
|
||||
}
|
||||
|
||||
public bool IsRecording
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public bool IsFinished
|
||||
{
|
||||
get { return _mode == Moviemode.Finished; }
|
||||
}
|
||||
|
||||
public bool Changes
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
private set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public double FrameCount
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public double Fps
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public TimeSpan Time
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public int InputLogLength
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public string Filename
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool Load()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetInputLog()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool CheckTimeLines(TextReader reader, out string errorMessage)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool ExtractInputLog(TextReader reader, out string errorMessage)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void StartNewRecording()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void StartNewPlayback()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Stop(bool saveChanges = true)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void SwitchToRecord()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void SwitchToPlay()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void AppendFrame(IController source)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void RecordFrame(int frame, IController source)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Truncate(int frame)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetInput(int frame)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Probably won't support
|
||||
public void PokeFrame(int frame, IController source)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void ClearFrame(int frame)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace BizHawk.Client.Common
|
||||
{
|
||||
public partial class Movie : IMovie
|
||||
public partial class BkmMovie : IMovie
|
||||
{
|
||||
public IDictionary<string, string> HeaderEntries
|
||||
{
|
|
@ -6,7 +6,7 @@ using BizHawk.Common;
|
|||
|
||||
namespace BizHawk.Client.Common
|
||||
{
|
||||
public partial class Movie : IMovie
|
||||
public partial class BkmMovie : IMovie
|
||||
{
|
||||
private int _preloadFramecount; // Not a a reliable number, used for preloading (when no log has yet been loaded), this is only for quick stat compilation for dialogs such as play movie
|
||||
|
|
@ -4,7 +4,7 @@ using System.Text;
|
|||
|
||||
namespace BizHawk.Client.Common
|
||||
{
|
||||
public partial class Movie : IMovie
|
||||
public partial class BkmMovie : IMovie
|
||||
{
|
||||
private readonly MovieLog _log = new MovieLog();
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
namespace BizHawk.Client.Common
|
||||
{
|
||||
public partial class Movie : IMovie
|
||||
public partial class BkmMovie : IMovie
|
||||
{
|
||||
private enum Moviemode { Inactive, Play, Record, Finished }
|
||||
|
|
@ -3,14 +3,14 @@ using BizHawk.Emulation.Common;
|
|||
|
||||
namespace BizHawk.Client.Common
|
||||
{
|
||||
public partial class Movie : IMovie
|
||||
public partial class BkmMovie : IMovie
|
||||
{
|
||||
private readonly PlatformFrameRates _frameRates = new PlatformFrameRates();
|
||||
private bool _makeBackup = true;
|
||||
private bool _changes;
|
||||
private int? _loopOffset;
|
||||
|
||||
public Movie(string filename, bool startsFromSavestate = false)
|
||||
public BkmMovie(string filename, bool startsFromSavestate = false)
|
||||
: this(startsFromSavestate)
|
||||
{
|
||||
Rerecords = 0;
|
||||
|
@ -18,7 +18,7 @@ namespace BizHawk.Client.Common
|
|||
Loaded = !string.IsNullOrWhiteSpace(filename);
|
||||
}
|
||||
|
||||
public Movie(bool startsFromSavestate = false)
|
||||
public BkmMovie(bool startsFromSavestate = false)
|
||||
{
|
||||
Header = new MovieHeader();
|
||||
Header[HeaderKeys.MOVIEVERSION] = "BizHawk v0.0.1";
|
Loading…
Reference in New Issue