dsda: put non-sync settings to ini but not pass them on init
if we set them on core init that's how it'd remember them in the reference state, so loading states made with different init options would fail to load instead we set everything to default on init and then change to what the user set during the first frame advance. that way reference state remains the same so states using different options keep working across all variants need to not show core messages tho when something is changed from default, because now they appear on init and state load rather than only on explicit change
This commit is contained in:
parent
8fcaaedd2c
commit
eef983cc2c
|
@ -157,21 +157,18 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
|||
[TypeConverter(typeof(ConstrainedIntConverter))]
|
||||
public int ScaleFactor { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[DisplayName("Sfx Volume")]
|
||||
[Description("Sound effects volume [0 - 15].")]
|
||||
[Range(0, 15)]
|
||||
[DefaultValue(8)]
|
||||
public int SfxVolume { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[DisplayName("Music Volume")]
|
||||
[Description("[0 - 15]")]
|
||||
[Range(0, 15)]
|
||||
[DefaultValue(8)]
|
||||
public int MusicVolume { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[DisplayName("Gamma Correction Level")]
|
||||
[Description("Increases brightness [0 - 4].\n\nDefault value in vanilla is \"OFF\" (0).")]
|
||||
[Range(0, 4)]
|
||||
|
@ -179,74 +176,62 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
|||
[TypeConverter(typeof(ConstrainedIntConverter))]
|
||||
public int Gamma { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[DisplayName("Show Messages")]
|
||||
[Description("Displays messages about items you pick up.\n\nDefault value in vanilla is \"ON\".")]
|
||||
[DefaultValue(true)]
|
||||
public bool ShowMessages { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[DisplayName("Report Revealed Secrets")]
|
||||
[Description("Shows an on-screen notification when revealing a secret.")]
|
||||
[DefaultValue(false)]
|
||||
public bool ReportSecrets { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[DisplayName("HUD Mode")]
|
||||
[Description("Sets heads-up display mode.")]
|
||||
[DefaultValue(HudMode.Vanilla)]
|
||||
public HudMode HeadsUpMode { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[DisplayName("Extended HUD")]
|
||||
[Description("Shows DSDA-Doom-specific information above vanilla heads-up-display.")]
|
||||
[DefaultValue(false)]
|
||||
public bool DsdaExHud { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[DisplayName("Display Coordinates")]
|
||||
[Description("Shows player position, angle, velocity, and distance travelled per frame. Color indicates movement tiers: green - SR40, blue - SR50, red - turbo/wallrun.\n\nAvailable in vanilla via the IDMYPOS cheat code, however vanilla only shows angle, X, and Y.")]
|
||||
[DefaultValue(false)]
|
||||
public bool DisplayCoordinates { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[DisplayName("Display Commands")]
|
||||
[Description("Shows input history on the screen. History size is 10, empty commands are excluded.")]
|
||||
[DefaultValue(false)]
|
||||
public bool DisplayCommands { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[DisplayName("Automap Totals")]
|
||||
[Description("Shows counts for kills, items, and secrets on automap.")]
|
||||
[DefaultValue(false)]
|
||||
public bool MapTotals { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[DisplayName("Automap Time")]
|
||||
[Description("Shows elapsed time on automap.")]
|
||||
[DefaultValue(false)]
|
||||
public bool MapTime { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[DisplayName("Automap Coordinates")]
|
||||
[Description("Shows in-level coordinates on automap.")]
|
||||
[DefaultValue(false)]
|
||||
public bool MapCoordinates { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[DisplayName("Automap Overlay")]
|
||||
[Description("Shows automap on top of gameplay.")]
|
||||
[DefaultValue(MapOverlays.Disabled)]
|
||||
public MapOverlays MapOverlay { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[DisplayName("Automap Details")]
|
||||
[Description("Exposes all linedefs and things.\n\nAvailable in vanilla via the IDDT cheat code.")]
|
||||
[DefaultValue(MapDetail.Normal)]
|
||||
[TypeConverter(typeof(DescribableEnumConverter))]
|
||||
public MapDetail MapDetails { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[DisplayName("Player Point of View")]
|
||||
[Description("Which of the players' point of view to use during rendering")]
|
||||
[Range(1, 4)]
|
||||
|
|
|
@ -71,37 +71,10 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
|
|||
uint totalWadSizeKb = (totalWadSize / 1024) + 1;
|
||||
Console.WriteLine($"Reserving {totalWadSizeKb}kb for WAD file memory");
|
||||
|
||||
string hudMode = "";
|
||||
switch (_settings.HeadsUpMode)
|
||||
{
|
||||
case HudMode.Vanilla:
|
||||
hudMode = "screenblocks 10\nhud_displayed 1\n";
|
||||
break;
|
||||
case HudMode.DSDA:
|
||||
hudMode = "screenblocks 11\nhud_displayed 1\n";
|
||||
break;
|
||||
case HudMode.None:
|
||||
hudMode = "screenblocks 11\nhud_displayed 0\n";
|
||||
break;
|
||||
}
|
||||
|
||||
_configFile = Encoding.ASCII.GetBytes(
|
||||
hudMode
|
||||
+ $"screen_resolution \"{
|
||||
$"screen_resolution \"{
|
||||
_nativeResolution.X * _settings.ScaleFactor}x{
|
||||
_nativeResolution.Y * _settings.ScaleFactor}\"\n"
|
||||
+ $"usegamma { _settings.Gamma}\n"
|
||||
+ $"sfx_volume { _settings.SfxVolume}\n"
|
||||
+ $"music_volume { _settings.MusicVolume}\n"
|
||||
+ $"automap_overlay { (int)_settings.MapOverlay}\n"
|
||||
+ $"dsda_exhud { (_settings.DsdaExHud ? 1 : 0)}\n"
|
||||
+ $"map_totals { (_settings.MapTotals ? 1 : 0)}\n"
|
||||
+ $"map_time { (_settings.MapTime ? 1 : 0)}\n"
|
||||
+ $"map_coordinates { (_settings.MapCoordinates ? 1 : 0)}\n"
|
||||
+ $"hudadd_secretarea { (_settings.ReportSecrets ? 1 : 0)}\n"
|
||||
+ $"show_messages { (_settings.ShowMessages ? 1 : 0)}\n"
|
||||
+ $"dsda_coordinate_display {(_settings.DisplayCoordinates ? 1 : 0)}\n"
|
||||
+ $"dsda_command_display { (_settings.DisplayCommands ? 1 : 0)}\n"
|
||||
+ $"render_wipescreen { (_syncSettings.RenderWipescreen ? 1 : 0)}\n"
|
||||
+ "boom_translucent_sprites 0\n"
|
||||
+ "render_aspect 3\n" // 4:3, controls FOV on higher resolutions (see SetRatio() in the core)
|
||||
|
|
Loading…
Reference in New Issue