GameInfo - simplify a method name

This commit is contained in:
adelikat 2020-06-12 12:31:53 -05:00
parent f2b79bb0c1
commit 4e7e314a33
7 changed files with 12 additions and 12 deletions

View File

@ -25,7 +25,7 @@ namespace BizHawk.Client.EmuHawk
{
var options = new Dictionary<string, string>();
if (GlobalWin.Game == null) return options;
foreach (var option in GlobalWin.Game.GetOptionsDict()) options[option.Key] = option.Value;
foreach (var option in GlobalWin.Game.GetOptions()) options[option.Key] = option.Value;
return options;
}
}

View File

@ -145,7 +145,7 @@ namespace BizHawk.Emulation.Common
return defaultVal;
}
public IReadOnlyDictionary<string, string> GetOptionsDict()
public IReadOnlyDictionary<string, string> GetOptions()
{
return new ReadOnlyDictionary<string, string>(Options);
}

View File

@ -194,7 +194,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
private void RebootCore()
{
// Regenerate mapper here to make sure its state is entirely clean
_mapper = CreateMapper(this, _game.GetOptionsDict()["m"], Rom.Length);
_mapper = CreateMapper(this, _game.GetOptions()["m"], Rom.Length);
_lagCount = 0;
Cpu = new MOS6502X<CpuLink>(new CpuLink(this));
@ -223,16 +223,16 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
RomDetails = $"{_game.Name}\r\nSHA1:{Rom.HashSHA1()}\r\nMD5:{Rom.HashMD5()}\r\nMapper Impl \"{_mapper.GetType()}\"";
// Some games (ex. 3D tic tac toe), turn off the screen for extended periods, so we need to allow for this here.
if (_game.GetOptionsDict().ContainsKey("SP_FRAME"))
if (_game.GetOptions().ContainsKey("SP_FRAME"))
{
if (_game.GetOptionsDict()["SP_FRAME"] == "true")
if (_game.GetOptions()["SP_FRAME"] == "true")
{
SP_FRAME = true;
}
}
if (_game.GetOptionsDict().ContainsKey("SP_RESET"))
if (_game.GetOptions().ContainsKey("SP_RESET"))
{
if (_game.GetOptionsDict()["SP_RESET"] == "true")
if (_game.GetOptions()["SP_RESET"] == "true")
{
SP_RESET = true;
}

View File

@ -33,7 +33,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
Rom = rom;
_game = game;
if (!game.GetOptionsDict().ContainsKey("m"))
if (!game.GetOptions().ContainsKey("m"))
{
game.AddOption("m", DetectMapper(rom));
}
@ -46,7 +46,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
game.AddOption("m", "F8_sega");
}
Console.WriteLine("Game uses mapper " + game.GetOptionsDict()["m"]);
Console.WriteLine("Game uses mapper " + game.GetOptions()["m"]);
Console.WriteLine(Rom.HashSHA1());
RebootCore();
SetupMemoryDomains();

View File

@ -124,7 +124,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
if (gi != null)
{
var dict = gi.GetOptionsDict();
var dict = gi.GetOptions();
if (dict.ContainsKey("PAL"))
{
_isPAL = true;

View File

@ -47,7 +47,7 @@ namespace BizHawk.Emulation.Cores.Intellivision
var gi = Database.CheckDatabase(hash_sha1);
if (gi != null)
{
var dict = gi.GetOptionsDict();
var dict = gi.GetOptions();
if (!dict.ContainsKey("board"))
{
throw new Exception("INTV gamedb entries must have a board identifier!");

View File

@ -161,7 +161,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
CartInfo cart = new CartInfo();
//try generating a bootgod cart descriptor from the game database
var dict = gi.GetOptionsDict();
var dict = gi.GetOptions();
cart.GameInfo = gi;
if (!dict.ContainsKey("board"))
throw new Exception("NES gamedb entries must have a board identifier!");