diff --git a/Assets/dll/dsda.wbx.zst b/Assets/dll/dsda.wbx.zst index d85b366f2f..de6a6a5cde 100644 Binary files a/Assets/dll/dsda.wbx.zst and b/Assets/dll/dsda.wbx.zst differ diff --git a/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.IEmulator.cs b/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.IEmulator.cs index dd50f44cad..de7c469d49 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.IEmulator.cs @@ -151,20 +151,22 @@ namespace BizHawk.Emulation.Cores.Computers.Doom PackedRenderInfo renderInfo = new PackedRenderInfo() { - ScaleFactor = _settings.ScaleFactor, - Gamma = _settings.Gamma, - HeadsUpMode = (int)_settings.HeadsUpMode, - RenderVideo = renderVideo ? 1 : 0, - RenderAudio = renderAudio ? 1 : 0, - DoUpdate = _settings.DoUpdate ? 1 : 0, - ShowMessages = _settings.ShowMessages ? 1 : 0, - ReportSecrets = _settings.ReportSecrets ? 1 : 0, - DsdaExHud = _settings.DsdaExHud ? 1 : 0, - DisplayCommands = _settings.DisplayCommands ? 1 : 0, - MapTotals = _settings.MapTotals ? 1 : 0, - MapTime = _settings.MapTime ? 1 : 0, - MapCoordinates = _settings.MapCoordinates ? 1 : 0, - PlayerPointOfView = _settings.DisplayPlayer - 1, + Gamma = _settings.Gamma, + HeadsUpMode = (int)_settings.HeadsUpMode, + MapDetails = (int)_settings.MapDetails, + MapOverlay = (int)_settings.MapOverlay, + RenderVideo = renderVideo ? 1 : 0, + RenderAudio = renderAudio ? 1 : 0, + DoUpdate = _settings.DoUpdate ? 1 : 0, + ShowMessages = _settings.ShowMessages ? 1 : 0, + ReportSecrets = _settings.ReportSecrets ? 1 : 0, + DsdaExHud = _settings.DsdaExHud ? 1 : 0, + DisplayCoordinates = _settings.DisplayCoordinates ? 1 : 0, + DisplayCommands = _settings.DisplayCommands ? 1 : 0, + MapTotals = _settings.MapTotals ? 1 : 0, + MapTime = _settings.MapTime ? 1 : 0, + MapCoordinates = _settings.MapCoordinates ? 1 : 0, + PlayerPointOfView = _settings.DisplayPlayer - 1, }; IsLagFrame = _core.dsda_frame_advance( diff --git a/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.ISettable.cs b/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.ISettable.cs index 0b43861e34..2e0a7fd56b 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.ISettable.cs @@ -72,6 +72,21 @@ namespace BizHawk.Emulation.Cores.Computers.Doom None = 2 } + public enum MapDetail : int + { + Normal = 0, + Linedefs = 1, + [Display(Name = "Linedefs and things")] + Everything = 2 + } + + public enum MapOverlays : int + { + Disabled = 0, + Enabled = 1, + Dark = 2 + } + public enum TurningResolution : int { [Display(Name = "16 bits (longtics)")] @@ -82,11 +97,11 @@ namespace BizHawk.Emulation.Cores.Computers.Doom public enum MultiplayerMode : int { - [Display(Name = "0 - Single Player / Coop")] + [Display(Name = "Single Player / Coop")] Single_Coop = 0, - [Display(Name = "1 - Deathmatch")] + [Display(Name = "Deathmatch")] Deathmatch = 1, - [Display(Name = "2 - Altdeath")] + [Display(Name = "Altdeath")] Altdeath = 2 } @@ -162,6 +177,11 @@ namespace BizHawk.Emulation.Cores.Computers.Doom [DefaultValue(false)] public bool DsdaExHud { get; set; } + [DisplayName("Display Coordinates")] + [Description("Shows player position (X, Y, Z, angle), velocity (combined, X, Y), and distance travelled (combined, X, Y) per frame. Color indicates velocity/distance tiers: green - SR40 (15.11+/16.67+), blue - SR50 (19.35+/21.35+), red - turbo/wallrun (21.37+/23.58+).")] + [DefaultValue(false)] + public bool DisplayCoordinates { get; set; } + [DisplayName("Display Commands")] [Description("Shows input history on the screen. History size is 10, empty commands are excluded.")] [DefaultValue(false)] @@ -181,6 +201,17 @@ namespace BizHawk.Emulation.Cores.Computers.Doom [Description("Shows in-level coordinates on automap.")] [DefaultValue(false)] public bool MapCoordinates { get; set; } + + [DisplayName("Automap Overlay")] + [Description("Shows automap on top of gameplay.")] + [DefaultValue(MapOverlays.Disabled)] + public MapOverlays MapOverlay { get; set; } + + [DisplayName("Automap Details")] + [Description("Exposes all linedefs and things (IDDT cheat toggle).")] + [DefaultValue(MapDetail.Normal)] + [TypeConverter(typeof(DescribableEnumConverter))] + public MapDetail MapDetails { get; set; } [JsonIgnore] [DisplayName("Player Point of View")] diff --git a/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.cs b/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.cs index a5aa4f16c4..744a4cf8b4 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.cs @@ -91,17 +91,19 @@ namespace BizHawk.Emulation.Cores.Computers.Doom _configFile = Encoding.ASCII.GetBytes( hudMode + $"screen_resolution \"{ - _nativeResolution.X * _settings.ScaleFactor}x{ - _nativeResolution.Y * _settings.ScaleFactor}\"\n" - + $"usegamma { _settings.Gamma}\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_command_display {(_settings.DisplayCommands ? 1 : 0)}\n" - + $"render_wipescreen { (_syncSettings.RenderWipescreen ? 1 : 0)}\n" + _nativeResolution.X * _settings.ScaleFactor}x{ + _nativeResolution.Y * _settings.ScaleFactor}\"\n" + + $"usegamma { _settings.Gamma}\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" + "render_stretchsky 0\n" + "render_doom_lightmaps 1\n" + "render_aspect 3\n" // 4:3, controls FOV on higher resolutions (see SetRatio() in the core) diff --git a/src/BizHawk.Emulation.Cores/Computers/Doom/LibDSDA.cs b/src/BizHawk.Emulation.Cores/Computers/Doom/LibDSDA.cs index f8bfa05f46..3f8d848b18 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Doom/LibDSDA.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Doom/LibDSDA.cs @@ -62,16 +62,18 @@ namespace BizHawk.Emulation.Cores.Computers.Doom public int DoUpdate; public int RenderVideo; public int RenderAudio; - public int ScaleFactor; public int Gamma; public int ShowMessages; public int ReportSecrets; public int HeadsUpMode; public int DsdaExHud; + public int DisplayCoordinates; public int DisplayCommands; public int MapTotals; public int MapTime; public int MapCoordinates; + public int MapDetails; + public int MapOverlay; public int PlayerPointOfView; } diff --git a/waterbox/dsda/BizhawkInterface.c b/waterbox/dsda/BizhawkInterface.c index 1138d60617..b5f42e125a 100644 --- a/waterbox/dsda/BizhawkInterface.c +++ b/waterbox/dsda/BizhawkInterface.c @@ -161,22 +161,33 @@ ECL_EXPORT bool dsda_frame_advance(CommonButtons commonButtons, struct PackedPla { if (renderInfo->DoUpdate) { - dsda_UpdateIntConfig(dsda_config_screenblocks, renderInfo->HeadsUpMode != HUD_VANILLA ? 11 : 10, true); - dsda_UpdateIntConfig(dsda_config_hud_displayed, renderInfo->HeadsUpMode == HUD_NONE ? 0 : 1, true); - dsda_UpdateIntConfig(dsda_config_usegamma, renderInfo->Gamma, true); - dsda_UpdateIntConfig(dsda_config_show_messages, renderInfo->ShowMessages, true); - dsda_UpdateIntConfig(dsda_config_hudadd_secretarea, renderInfo->ReportSecrets, true); - dsda_UpdateIntConfig(dsda_config_exhud, renderInfo->DsdaExHud, true); - dsda_UpdateIntConfig(dsda_config_command_display, renderInfo->DisplayCommands, true); - dsda_UpdateIntConfig(dsda_config_map_totals, renderInfo->MapTotals, true); - dsda_UpdateIntConfig(dsda_config_map_time, renderInfo->MapTime, true); - dsda_UpdateIntConfig(dsda_config_map_coordinates, renderInfo->MapCoordinates, true); + if (renderInfo->MapOverlay != dsda_IntConfig(dsda_config_automap_overlay)) + { + dsda_UpdateIntConfig(dsda_config_automap_overlay, renderInfo->MapOverlay, true); + dsda_AddMessage(automap_overlay == 0 ? AMSTR_OVERLAYOFF : + automap_overlay == 1 ? AMSTR_OVERLAYON : + "Overlay Mode Dark"); + } + if (renderInfo->ShowMessages != dsda_ShowMessages()) + dsda_UpdateIntConfig(dsda_config_show_messages, renderInfo->ShowMessages, true); + dsda_UpdateIntConfig(dsda_config_usegamma, renderInfo->Gamma, true); + dsda_UpdateIntConfig(dsda_config_hudadd_secretarea, renderInfo->ReportSecrets, true); + dsda_UpdateIntConfig(dsda_config_exhud, renderInfo->DsdaExHud, true); + dsda_UpdateIntConfig(dsda_config_coordinate_display, renderInfo->DisplayCoordinates, true); + dsda_UpdateIntConfig(dsda_config_command_display, renderInfo->DisplayCommands, true); + dsda_UpdateIntConfig(dsda_config_map_totals, renderInfo->MapTotals, true); + dsda_UpdateIntConfig(dsda_config_map_time, renderInfo->MapTime, true); + dsda_UpdateIntConfig(dsda_config_map_coordinates, renderInfo->MapCoordinates, true); + dsda_UpdateIntConfig(dsda_config_screenblocks, renderInfo->HeadsUpMode != HUD_VANILLA ? 11 : 10, true); + dsda_UpdateIntConfig(dsda_config_hud_displayed, renderInfo->HeadsUpMode == HUD_NONE ? 0 : 1, true); } // Setting inputs headlessClearTickCommand(); common_input(commonButtons); + dsda_reveal_map = renderInfo->MapDetails; + // Setting Players inputs player_input(player1Inputs, 0); player_input(player2Inputs, 1); diff --git a/waterbox/dsda/BizhawkInterface.h b/waterbox/dsda/BizhawkInterface.h index b929cedaf8..1105c64f02 100644 --- a/waterbox/dsda/BizhawkInterface.h +++ b/waterbox/dsda/BizhawkInterface.h @@ -59,6 +59,7 @@ extern void AM_StopZooming(); extern void AM_saveScaleAndLoc(); extern int AM_minOutWindowScale(); extern int AM_restoreScaleAndLoc(); +extern int dsda_reveal_map; extern int automap_active; extern int automap_follow; extern int automap_grid; @@ -160,16 +161,18 @@ struct PackedRenderInfo int DoUpdate; int RenderVideo; int RenderAudio; - int ScaleFactor; int Gamma; int ShowMessages; int ReportSecrets; int HeadsUpMode; int DsdaExHud; + int DisplayCoordinates; int DisplayCommands; int MapTotals; int MapTime; int MapCoordinates; + int MapDetails; + int MapOverlay; int PlayerPointOfView; } __attribute__((packed));