restrict and consolidate new-ing of IMovie classes
This commit is contained in:
parent
0e59ef1679
commit
0f1066fe93
|
@ -8,7 +8,7 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
private Bk2Controller _adapter;
|
private Bk2Controller _adapter;
|
||||||
|
|
||||||
public Bk2Movie(string filename = null)
|
internal Bk2Movie(string filename = null)
|
||||||
{
|
{
|
||||||
Filename = filename ?? string.Empty;
|
Filename = filename ?? string.Empty;
|
||||||
Header[HeaderKeys.MovieVersion] = "BizHawk v2.0.0";
|
Header[HeaderKeys.MovieVersion] = "BizHawk v2.0.0";
|
||||||
|
|
|
@ -79,7 +79,7 @@ namespace BizHawk.Client.Common.MovieConversionExtensions
|
||||||
|
|
||||||
public static IMovie ToBk2(this IMovie old)
|
public static IMovie ToBk2(this IMovie old)
|
||||||
{
|
{
|
||||||
var bk2 = new Bk2Movie(old.Filename.Replace(old.PreferredExtension, Bk2Movie.Extension));
|
var bk2 = MovieService.Get(old.Filename.Replace(old.PreferredExtension, Bk2Movie.Extension));
|
||||||
|
|
||||||
for (var i = 0; i < old.InputLogLength; i++)
|
for (var i = 0; i < old.InputLogLength; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
Result.Movie = ToBk2(movie);
|
Result.Movie = ToBk2(movie);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Bk2Movie ToBk2(BkmMovie old)
|
private static IMovie ToBk2(BkmMovie old)
|
||||||
{
|
{
|
||||||
var bk2 = new Bk2Movie(old.Filename.Replace(old.PreferredExtension, Bk2Movie.Extension));
|
var bk2 = MovieService.Get(old.Filename.Replace(old.PreferredExtension, Bk2Movie.Extension));
|
||||||
|
|
||||||
for (var i = 0; i < old.InputLogLength; i++)
|
for (var i = 0; i < old.InputLogLength; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace BizHawk.Client.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
var newFileName = $"{SourceFile.FullName}.{Bk2Movie.Extension}";
|
var newFileName = $"{SourceFile.FullName}.{Bk2Movie.Extension}";
|
||||||
Result.Movie = new Bk2Movie(newFileName);
|
Result.Movie = MovieService.Get(newFileName);
|
||||||
|
|
||||||
RunImport();
|
RunImport();
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace BizHawk.Client.Common
|
||||||
public new const string Extension = "tasproj";
|
public new const string Extension = "tasproj";
|
||||||
|
|
||||||
/// <exception cref="InvalidOperationException">loaded core does not implement <see cref="IStatable"/></exception>
|
/// <exception cref="InvalidOperationException">loaded core does not implement <see cref="IStatable"/></exception>
|
||||||
public TasMovie(string path = null, bool startsFromSavestate = false) : base(path)
|
internal TasMovie(string path = null, bool startsFromSavestate = false) : base(path)
|
||||||
{
|
{
|
||||||
if (!Global.Emulator.HasSavestates())
|
if (!Global.Emulator.HasSavestates())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue