Some bk2 progress
This commit is contained in:
parent
d501a1cf71
commit
01fd28f4b0
|
@ -17,7 +17,8 @@ namespace BizHawk.Client.Common
|
||||||
// Only for movies they probably shoudln't be leaching this stuff
|
// Only for movies they probably shoudln't be leaching this stuff
|
||||||
Movieheader,
|
Movieheader,
|
||||||
Comments,
|
Comments,
|
||||||
Subtitles
|
Subtitles,
|
||||||
|
SyncSettings
|
||||||
}
|
}
|
||||||
|
|
||||||
public class BinaryStateFileNames
|
public class BinaryStateFileNames
|
||||||
|
@ -46,6 +47,7 @@ namespace BizHawk.Client.Common
|
||||||
// Only for movies they probably shoudln't be leaching this stuff
|
// Only for movies they probably shoudln't be leaching this stuff
|
||||||
LumpNames[BinaryStateLump.Comments] = "Comments";
|
LumpNames[BinaryStateLump.Comments] = "Comments";
|
||||||
LumpNames[BinaryStateLump.Subtitles] = "Subtitles";
|
LumpNames[BinaryStateLump.Subtitles] = "Subtitles";
|
||||||
|
LumpNames[BinaryStateLump.SyncSettings] = "SyncSettings";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Get(BinaryStateLump lump)
|
public static string Get(BinaryStateLump lump)
|
||||||
|
|
|
@ -8,6 +8,9 @@ namespace BizHawk.Client.Common
|
||||||
public partial class Bk2Movie : IMovie
|
public partial class Bk2Movie : IMovie
|
||||||
{
|
{
|
||||||
private readonly Bk2Header Header = new Bk2Header();
|
private readonly Bk2Header Header = new Bk2Header();
|
||||||
|
private string _syncSettingsJson = string.Empty;
|
||||||
|
private string _savestateBlob = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
public IDictionary<string, string> HeaderEntries
|
public IDictionary<string, string> HeaderEntries
|
||||||
{
|
{
|
||||||
|
@ -19,32 +22,20 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
public string SyncSettingsJson
|
public string SyncSettingsJson
|
||||||
{
|
{
|
||||||
get { return Header[HeaderKeys.SYNCSETTINGS]; }
|
get { return _syncSettingsJson; }
|
||||||
set { Header[HeaderKeys.SYNCSETTINGS] = value; }
|
set { _syncSettingsJson = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string SavestateBinaryBase64Blob
|
public string SavestateBinaryBase64Blob
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (Header.ContainsKey(HeaderKeys.SAVESTATEBINARYBASE64BLOB))
|
return _savestateBlob;
|
||||||
{
|
|
||||||
return Header[HeaderKeys.SAVESTATEBINARYBASE64BLOB];
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value == null)
|
_savestateBlob = value;
|
||||||
{
|
|
||||||
Header.Remove(HeaderKeys.SAVESTATEBINARYBASE64BLOB);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Header.Add(HeaderKeys.SAVESTATEBINARYBASE64BLOB, value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,8 @@ namespace BizHawk.Client.Common
|
||||||
_log.Clear();
|
_log.Clear();
|
||||||
Subtitles.Clear();
|
Subtitles.Clear();
|
||||||
Comments.Clear();
|
Comments.Clear();
|
||||||
|
_syncSettingsJson = string.Empty;
|
||||||
|
_savestateBlob = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
|
@ -76,6 +78,7 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
bs.PutLump(BinaryStateLump.Comments, (tw) => tw.WriteLine(CommentsString()));
|
bs.PutLump(BinaryStateLump.Comments, (tw) => tw.WriteLine(CommentsString()));
|
||||||
bs.PutLump(BinaryStateLump.Subtitles, (tw) => tw.WriteLine(Subtitles.ToString()));
|
bs.PutLump(BinaryStateLump.Subtitles, (tw) => tw.WriteLine(Subtitles.ToString()));
|
||||||
|
bs.PutLump(BinaryStateLump.SyncSettings, (tw) => tw.WriteLine(_syncSettingsJson));
|
||||||
|
|
||||||
if (StartsFromSavestate)
|
if (StartsFromSavestate)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue