Remove the obsolete BinaryStateLoader.HasLump()
This commit is contained in:
parent
a86ad73ade
commit
5a408f9321
BizHawk.Client.Common
|
@ -231,13 +231,6 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public bool HasLump(BinaryStateLump lump)
|
||||
{
|
||||
ZipEntry e;
|
||||
return _entriesbyname.TryGetValue(lump.ReadName, out e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a lump
|
||||
/// </summary>
|
||||
|
|
|
@ -173,30 +173,29 @@ namespace BizHawk.Client.Common
|
|||
|
||||
bl.GetLump(BinaryStateLump.Framebuffer, false, PopulateFramebuffer);
|
||||
|
||||
if (bl.HasLump(BinaryStateLump.UserData))
|
||||
string userData = string.Empty;
|
||||
bl.GetLump(BinaryStateLump.UserData, false, delegate(TextReader tr)
|
||||
{
|
||||
string userData = string.Empty;
|
||||
bl.GetLump(BinaryStateLump.UserData, false, delegate(TextReader tr)
|
||||
string line;
|
||||
while ((line = tr.ReadLine()) != null)
|
||||
{
|
||||
string line;
|
||||
while ((line = tr.ReadLine()) != null)
|
||||
if (!string.IsNullOrWhiteSpace(line))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(line))
|
||||
{
|
||||
userData = line;
|
||||
}
|
||||
userData = line;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(userData))
|
||||
{
|
||||
Global.UserBag = (Dictionary<string, object>)ConfigService.LoadWithType(userData);
|
||||
}
|
||||
|
||||
if (bl.HasLump(BinaryStateLump.LagLog)
|
||||
&& Global.MovieSession.Movie.IsActive && Global.MovieSession.Movie is TasMovie)
|
||||
if (Global.MovieSession.Movie.IsActive && Global.MovieSession.Movie is TasMovie)
|
||||
{
|
||||
bl.GetLump(BinaryStateLump.LagLog, false, delegate(BinaryReader br, long length)
|
||||
{
|
||||
(Global.MovieSession.Movie as TasMovie).TasLagLog.Load(br);
|
||||
((TasMovie)Global.MovieSession.Movie).TasLagLog.Load(br);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,51 +70,43 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
});
|
||||
|
||||
if (bl.HasLump(BinaryStateLump.Comments))
|
||||
bl.GetLump(BinaryStateLump.Comments, false, delegate(TextReader tr)
|
||||
{
|
||||
bl.GetLump(BinaryStateLump.Comments, true, delegate(TextReader tr)
|
||||
string line;
|
||||
while ((line = tr.ReadLine()) != null)
|
||||
{
|
||||
string line;
|
||||
while ((line = tr.ReadLine()) != null)
|
||||
if (!string.IsNullOrWhiteSpace(line))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(line))
|
||||
{
|
||||
Comments.Add(line);
|
||||
}
|
||||
Comments.Add(line);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (bl.HasLump(BinaryStateLump.Subtitles))
|
||||
bl.GetLump(BinaryStateLump.Subtitles, false, delegate(TextReader tr)
|
||||
{
|
||||
bl.GetLump(BinaryStateLump.Subtitles, true, delegate(TextReader tr)
|
||||
string line;
|
||||
while ((line = tr.ReadLine()) != null)
|
||||
{
|
||||
string line;
|
||||
while ((line = tr.ReadLine()) != null)
|
||||
if (!string.IsNullOrWhiteSpace(line))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(line))
|
||||
{
|
||||
Subtitles.AddFromString(line);
|
||||
}
|
||||
Subtitles.AddFromString(line);
|
||||
}
|
||||
Subtitles.Sort();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (bl.HasLump(BinaryStateLump.SyncSettings))
|
||||
Subtitles.Sort();
|
||||
});
|
||||
|
||||
bl.GetLump(BinaryStateLump.SyncSettings, false, delegate(TextReader tr)
|
||||
{
|
||||
bl.GetLump(BinaryStateLump.SyncSettings, true, delegate(TextReader tr)
|
||||
string line;
|
||||
while ((line = tr.ReadLine()) != null)
|
||||
{
|
||||
string line;
|
||||
while ((line = tr.ReadLine()) != null)
|
||||
if (!string.IsNullOrWhiteSpace(line))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(line))
|
||||
{
|
||||
_syncSettingsJson = line;
|
||||
}
|
||||
_syncSettingsJson = line;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
bl.GetLump(BinaryStateLump.Input, true, delegate(TextReader tr)
|
||||
{
|
||||
|
|
|
@ -188,13 +188,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// TasMovie enhanced information
|
||||
if (bl.HasLump(BinaryStateLump.LagLog))
|
||||
bl.GetLump(BinaryStateLump.LagLog, false, delegate(BinaryReader br, long length)
|
||||
{
|
||||
bl.GetLump(BinaryStateLump.LagLog, false, delegate(BinaryReader br, long length)
|
||||
{
|
||||
LagLog.Load(br);
|
||||
});
|
||||
}
|
||||
LagLog.Load(br);
|
||||
});
|
||||
|
||||
bl.GetLump(BinaryStateLump.StateHistorySettings, false, delegate(TextReader tr)
|
||||
{
|
||||
|
@ -213,10 +210,10 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
});
|
||||
|
||||
if (GetClientSettingsOnLoad != null && bl.HasLump(BinaryStateLump.ClientSettings))
|
||||
if (GetClientSettingsOnLoad != null)
|
||||
{
|
||||
string clientSettings = string.Empty;
|
||||
bl.GetLump(BinaryStateLump.ClientSettings, true, delegate(TextReader tr)
|
||||
bl.GetLump(BinaryStateLump.ClientSettings, false, delegate(TextReader tr)
|
||||
{
|
||||
string line;
|
||||
while ((line = tr.ReadLine()) != null)
|
||||
|
@ -228,30 +225,30 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
});
|
||||
|
||||
GetClientSettingsOnLoad(clientSettings);
|
||||
}
|
||||
|
||||
if (bl.HasLump(BinaryStateLump.VerificationLog))
|
||||
{
|
||||
bl.GetLump(BinaryStateLump.VerificationLog, true, delegate(TextReader tr)
|
||||
if (!string.IsNullOrWhiteSpace(clientSettings))
|
||||
{
|
||||
VerificationLog.Clear();
|
||||
while (true)
|
||||
{
|
||||
var line = tr.ReadLine();
|
||||
if (string.IsNullOrEmpty(line))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (line.StartsWith("|"))
|
||||
{
|
||||
VerificationLog.Add(line);
|
||||
}
|
||||
}
|
||||
});
|
||||
GetClientSettingsOnLoad(clientSettings);
|
||||
}
|
||||
}
|
||||
|
||||
bl.GetLump(BinaryStateLump.VerificationLog, false, delegate(TextReader tr)
|
||||
{
|
||||
VerificationLog.Clear();
|
||||
while (true)
|
||||
{
|
||||
var line = tr.ReadLine();
|
||||
if (string.IsNullOrEmpty(line))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (line.StartsWith("|"))
|
||||
{
|
||||
VerificationLog.Add(line);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Branches.Load(bl, this);
|
||||
if (StateManager.Settings.BranchStatesInTasproj)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue