From c9f125aadedff4c6d524cba7d18ced2b8fb568f1 Mon Sep 17 00:00:00 2001 From: MaxED Date: Wed, 7 Sep 2016 15:15:07 +0000 Subject: [PATCH] Added Rendering toolbar items to the View menu. Merged "Toggle models, dynamic lights and fog rendering" and "Toggle Geometry Effects" actions into "Toggle Enhanced Rendering Effects" action. Removed "Dynamic light size" and "Dynamic light intensity" settings. Updated documentation ("Rendering toolbar" page). --- .../general/menu_renderingtoolbar.jpg | Bin 3530 -> 3886 bytes .../features/general/rendering_toolbar.html | 16 +- Source/Core/Builder.csproj | 1 - Source/Core/Config/ProgramConfiguration.cs | 12 +- Source/Core/General/MapManager.cs | 57 ----- Source/Core/Properties/Resources.Designer.cs | 9 +- Source/Core/Properties/Resources.resx | 3 - Source/Core/Resources/Actions.cfg | 22 +- Source/Core/Resources/fx.png | Bin 272 -> 0 bytes Source/Core/VisualModes/VisualThing.cs | 47 +++-- Source/Core/Windows/MainForm.Designer.cs | 195 ++++++++++++++++-- Source/Core/Windows/MainForm.cs | 98 ++++++++- .../Core/Windows/PreferencesForm.Designer.cs | 129 ++---------- Source/Core/Windows/PreferencesForm.cs | 18 -- Source/Core/Windows/PreferencesForm.resx | 6 - .../BuilderModes/ClassicModes/ThingsMode.cs | 9 +- .../BuilderModes/IO/WavefrontExporter.cs | 6 +- .../BuilderModes/Resources/Actions.cfg | 11 - .../VisualModes/BaseVisualMode.cs | 11 +- 19 files changed, 357 insertions(+), 293 deletions(-) delete mode 100644 Source/Core/Resources/fx.png diff --git a/Help/gzdb/features/general/menu_renderingtoolbar.jpg b/Help/gzdb/features/general/menu_renderingtoolbar.jpg index 312620b27c3578c90339350d1d3fd2926ebe497c..ffc0c3816ba21cf1313e5ef6ad01cbea19d57d4f 100644 GIT binary patch delta 3758 zcmYk8c|25o`^V4B7)uN@CfQ}*X&76SU1Mu7WXYDX?^(LZ(pW;4>`RuCErf{5nuzQ> zA^Vcb*d^We-{`rY`}v*M`RjcDd0*FgU)T53!}^LNv5>$Fyn}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xa_uR1)c!r!~^?>bEL3;(wYQPyg423gRTZ}@Guzt|n$YRi)T ztHrXX9!kPK=&Ch$ho!=LnR`u)>H_`S>iG58&gKZ_-n<(LfUCRMd&u+ij0^_jEu(co z@EiDHjpzAY8CirVk!;UJj3+9|c-K-7IHu`3JR|g%)cn>(lN+5kw7(luvhxvWgZnOK zU%bQxV;DYX+>5|vvKZj@a$H*|d3ImRdH4nze10E#!OF%DE&534ne+2rYy4eN@@n*ug! zGe&x;SHhSKbQM-Q?3}oDW^&^3yaWa(tepioMba=A)i_0{N=e!8$TkMSx23;do@**M zQ)L~^H{J73HlIs?WCn&j2ey84$&NcXJjb0{2@Dw$I5CvU^AaX)L4TT=p}3fl#iJfB zkRuX}Gy_l&p`MSTu`2#k^_q;PG8c6l6esyJT==P#nyB)j4$S4n0?C`6wwgqNCe9+G zWGH>qRge-zDRW2dGtT$5`MfnrG$-0c*c-_o887zTx0%U2x&(7YLTG@i__#z2A$IQY G)qemCkiTjG diff --git a/Help/gzdb/features/general/rendering_toolbar.html b/Help/gzdb/features/general/rendering_toolbar.html index 56827fe1..e5a3e95c 100644 --- a/Help/gzdb/features/general/rendering_toolbar.html +++ b/Help/gzdb/features/general/rendering_toolbar.html @@ -19,16 +19,16 @@
-

The Rendering toolbar allows you to toggle several GZDoom Builder's features:

+

The Rendering toolbar allows you to toggle several enhanced rendering features:

    -
  1. Toggles models, dynamic lights and fog rendering in Visual mode.
  2. -
  3. Toggles between available dynamic lights rendering modes in Visual mode.
  4. -
  5. Toggles between available model rendering modes.
  6. -
  7. Toggles fog rendering in Visual mode.
  8. +
  9. Allows to select dynamic lights rendering mode used in Visual mode.
  10. +
  11. Allows to select model rendering mode.
  12. +
  13. Toggles fog rendering in Visual mode.
  14. +
  15. Toggles sky rendering in Visual mode.
  16. Toggles Event lines.
  17. -
  18. Toggles Visual vertices in Visual mode (UDMF only).
  19. +
  20. Toggles Visual vertices in Visual mode (UDMF only).
-

Most of these settings can also be toggled using actions from "Rendering" category.
- You can toggle currently enabled rendering effects using "Toggle GZDoom effects" action.

+

Most of these settings can also be toggled using actions found in "Rendering" category or appropriate View menu items.
+ You can toggle rendering effects using "Toggle Enhanced Effects" action.

diff --git a/Source/Core/Builder.csproj b/Source/Core/Builder.csproj index 5fa825f3..b3eea00c 100644 --- a/Source/Core/Builder.csproj +++ b/Source/Core/Builder.csproj @@ -1145,7 +1145,6 @@ - diff --git a/Source/Core/Config/ProgramConfiguration.cs b/Source/Core/Config/ProgramConfiguration.cs index 0fcfe05b..8cecfb91 100644 --- a/Source/Core/Config/ProgramConfiguration.cs +++ b/Source/Core/Config/ProgramConfiguration.cs @@ -124,8 +124,6 @@ namespace CodeImp.DoomBuilder.Config private bool gzShowEventLines; private bool gzOldHighlightMode; private int gzMaxDynamicLights; - private float gzDynamicLightRadius; - private float gzDynamicLightIntensity; private bool gzStretchView; private float gzVertexScale2D; private bool gzShowVisualVertices; @@ -133,7 +131,7 @@ namespace CodeImp.DoomBuilder.Config private string lastUsedConfigName; private string lastUsedMapFolder; private bool gzMarkExtraFloors; - private bool gzdoomrenderingeffects = true; //mxd + private bool enhancedrenderingeffects = true; //mxd private int maxRecentFiles; private bool autoClearSideTextures; private bool storeSelectedEditTab; @@ -250,8 +248,6 @@ namespace CodeImp.DoomBuilder.Config public bool GZShowEventLines { get { return gzShowEventLines; } internal set { gzShowEventLines = value; } } public bool GZOldHighlightMode { get { return gzOldHighlightMode; } internal set { gzOldHighlightMode = value; } } public int GZMaxDynamicLights { get { return gzMaxDynamicLights; } internal set { gzMaxDynamicLights = value; } } - public float GZDynamicLightRadius { get { return gzDynamicLightRadius; } internal set { gzDynamicLightRadius = value; } } - public float GZDynamicLightIntensity { get { return gzDynamicLightIntensity; } internal set { gzDynamicLightIntensity = value; } } public bool GZStretchView { get { return gzStretchView; } internal set { gzStretchView = value; } } public float GZVertexScale2D { get { return gzVertexScale2D; } internal set { gzVertexScale2D = value; } } public bool GZShowVisualVertices { get { return gzShowVisualVertices; } internal set { gzShowVisualVertices = value; } } @@ -259,7 +255,7 @@ namespace CodeImp.DoomBuilder.Config public string LastUsedConfigName { get { return lastUsedConfigName; } internal set { lastUsedConfigName = value; } } public string LastUsedMapFolder { get { return lastUsedMapFolder; } internal set { lastUsedMapFolder = value; } } public bool GZMarkExtraFloors { get { return gzMarkExtraFloors; } internal set { gzMarkExtraFloors = value; } } - public bool GZDoomRenderingEffects { get { return gzdoomrenderingeffects; } set { gzdoomrenderingeffects = value; } } //mxd + public bool EnhancedRenderingEffects { get { return enhancedrenderingeffects; } set { enhancedrenderingeffects = value; } } //mxd public int MaxRecentFiles { get { return maxRecentFiles; } internal set { maxRecentFiles = General.Clamp(value, 8, 25); } } public bool AutoClearSidedefTextures { get { return autoClearSideTextures; } internal set { autoClearSideTextures = value; } } public bool StoreSelectedEditTab { get { return storeSelectedEditTab; } internal set { storeSelectedEditTab = value; } } @@ -387,8 +383,6 @@ namespace CodeImp.DoomBuilder.Config gzShowEventLines = cfg.ReadSetting("gzshoweventlines", true); gzOldHighlightMode = cfg.ReadSetting("gzoldhighlightmode", false); gzMaxDynamicLights = cfg.ReadSetting("gzmaxdynamiclights", 16); - gzDynamicLightRadius = cfg.ReadSetting("gzdynamiclightradius", 1.0f); - gzDynamicLightIntensity = cfg.ReadSetting("gzdynamiclightintensity", 1.0f); gzStretchView = cfg.ReadSetting("gzstretchview", true); gzVertexScale2D = cfg.ReadSetting("gzvertexscale2d", 1.0f); gzShowVisualVertices = cfg.ReadSetting("gzshowvisualvertices", true); @@ -505,8 +499,6 @@ namespace CodeImp.DoomBuilder.Config cfg.WriteSetting("gzoldhighlightmode", gzOldHighlightMode); cfg.WriteSetting("gztoolbargzdoom", gzToolbarGZDoom); cfg.WriteSetting("gzmaxdynamiclights", gzMaxDynamicLights); - cfg.WriteSetting("gzdynamiclightradius", gzDynamicLightRadius); - cfg.WriteSetting("gzdynamiclightintensity", gzDynamicLightIntensity); cfg.WriteSetting("gzstretchview", gzStretchView); cfg.WriteSetting("gzvertexscale2d", gzVertexScale2D); cfg.WriteSetting("gzshowvisualvertices", gzShowVisualVertices); diff --git a/Source/Core/General/MapManager.cs b/Source/Core/General/MapManager.cs index 25ffdcc0..c4363f49 100644 --- a/Source/Core/General/MapManager.cs +++ b/Source/Core/General/MapManager.cs @@ -1827,63 +1827,6 @@ namespace CodeImp.DoomBuilder General.MainWindow.UpdateGZDoomPanel(); } - [BeginAction("gztogglefog")] - internal void ToggleFog() - { - General.Settings.GZDrawFog = !General.Settings.GZDrawFog; - General.MainWindow.DisplayStatus(StatusType.Action, "Fog rendering is " + (General.Settings.GZDrawFog ? "ENABLED" : "DISABLED")); - General.MainWindow.RedrawDisplay(); - General.MainWindow.UpdateGZDoomPanel(); - } - - [BeginAction("gztogglesky")] - internal void ToggleSky() - { - General.Settings.GZDrawSky = !General.Settings.GZDrawSky; - General.MainWindow.DisplayStatus(StatusType.Action, "Sky rendering is " + (General.Settings.GZDrawSky ? "ENABLED" : "DISABLED")); - General.MainWindow.RedrawDisplay(); - General.MainWindow.UpdateGZDoomPanel(); - } - - [BeginAction("gztogglefx")] - internal void ToggleFx() - { - int on = 0; - on += General.Settings.GZDrawFog ? 1 : -1; - on += General.Settings.GZDrawSky ? 1 : -1; - on += General.Settings.GZDrawLightsMode != LightRenderMode.NONE ? 1 : -1; - on += General.Settings.GZDrawModelsMode != ModelRenderMode.NONE ? 1 : -1; - - bool enable = (on < 0); - - General.Settings.GZDrawFog = enable; - General.Settings.GZDrawSky = enable; - General.Settings.GZDrawLightsMode = (enable ? LightRenderMode.ALL : LightRenderMode.NONE); - General.Settings.GZDrawModelsMode = (enable ? ModelRenderMode.ALL : ModelRenderMode.NONE); - General.MainWindow.DisplayStatus(StatusType.Action, "Advanced effects are " + (enable ? "ENABLED" : "DISABLED")); - - General.MainWindow.RedrawDisplay(); - General.MainWindow.UpdateGZDoomPanel(); - } - - [BeginAction("gztoggleeventlines")] - internal void ToggleEventLines() - { - General.Settings.GZShowEventLines = !General.Settings.GZShowEventLines; - General.MainWindow.DisplayStatus(StatusType.Action, "Event lines are " + (General.Settings.GZShowEventLines ? "ENABLED" : "DISABLED")); - General.MainWindow.RedrawDisplay(); - General.MainWindow.UpdateGZDoomPanel(); - } - - [BeginAction("gztogglevisualvertices")] - internal void ToggleVisualVertices() - { - General.Settings.GZShowVisualVertices = !General.Settings.GZShowVisualVertices; - General.MainWindow.DisplayStatus(StatusType.Action, "Visual vertices are " + (General.Settings.GZShowVisualVertices ? "ENABLED" : "DISABLED")); - General.MainWindow.RedrawDisplay(); - General.MainWindow.UpdateGZDoomPanel(); - } - [BeginAction("gzreloadmodeldef")] internal void ReloadModeldef() { diff --git a/Source/Core/Properties/Resources.Designer.cs b/Source/Core/Properties/Resources.Designer.cs index 1c089b0e..89b2b032 100644 --- a/Source/Core/Properties/Resources.Designer.cs +++ b/Source/Core/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.5485 +// Runtime Version:2.0.50727.5466 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -347,13 +347,6 @@ namespace CodeImp.DoomBuilder.Properties { } } - internal static System.Drawing.Bitmap fx { - get { - object obj = ResourceManager.GetObject("fx", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - internal static System.Drawing.Bitmap Grid2 { get { object obj = ResourceManager.GetObject("Grid2", resourceCulture); diff --git a/Source/Core/Properties/Resources.resx b/Source/Core/Properties/Resources.resx index afdf57b6..aebb9bf4 100644 --- a/Source/Core/Properties/Resources.resx +++ b/Source/Core/Properties/Resources.resx @@ -271,9 +271,6 @@ ..\Resources\Warning.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\fx.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\mergegeometry2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/Source/Core/Resources/Actions.cfg b/Source/Core/Resources/Actions.cfg index ffb6cd7c..e66d169a 100644 --- a/Source/Core/Resources/Actions.cfg +++ b/Source/Core/Resources/Actions.cfg @@ -1247,17 +1247,6 @@ gztogglesky allowscroll = false; } -gztogglefx -{ - title = "Toggle models, dynamic lights and fog rendering"; - category = "gzdoombuilder"; - description = "This is a combo action, which toggles models, dynamic lights and fog rendering."; - allowkeys = true; - allowmouse = true; - allowscroll = false; - default = 20; // CapsLock -} - gztoggleeventlines { title = "Toggle Event lines"; @@ -1280,6 +1269,17 @@ gztogglevisualvertices default = 262230; } +gztoggleenhancedrendering +{ + title = "Toggle Enhanced Rendering Effects"; + category = "visual"; + description = "Toggles enhanced rendering effects (slopes, 3D-floors, dynamic lights, fog, sky etc.) in Visual mode."; + allowkeys = true; + allowmouse = true; + allowscroll = false; + default = 9; //Tab +} + ////////////////////////////// //GZDOOMBUILDER MENU ACTIONS// ////////////////////////////// diff --git a/Source/Core/Resources/fx.png b/Source/Core/Resources/fx.png deleted file mode 100644 index 5b4dcc2726b01d4880bf86d3152ecdb7be5ef590..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 272 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XHhH=@hE&{2+Vl3o0S1=;k|&sZbn5^AR}VM7ku=Tz|3AY3 zCJplk=1bZBEV{v3|NoHXx8?rH8WtH@UI$n`*cuMxDJxHkIq*d|gMp`+!AQO(_Waz# zr;l?m&+it0_@;E%t^}EqpGI80*SWQ~Y%!R_Db&5AjCZw+u!caQ1j~e<20WMcM8wMa zEIw`6xQF4eLc2uaC`BI-S+2{g;o7W~|hXzK5eXqBu UTJ78?1av)vr>mdKI;Vst0BewF?f?J) diff --git a/Source/Core/VisualModes/VisualThing.cs b/Source/Core/VisualModes/VisualThing.cs index 92fd6eb0..291fd195 100644 --- a/Source/Core/VisualModes/VisualThing.cs +++ b/Source/Core/VisualModes/VisualThing.cs @@ -37,6 +37,8 @@ namespace CodeImp.DoomBuilder.VisualModes #region ================== Constants protected const int FIXED_RADIUS = 8; //mxd. Used to render things with zero width and radius + private const float DYNLIGHT_INTENSITY_SCALER = 255.0f; + private const float SUBLIGHT_INTENSITY_SCALER = 255.0f * 1.5f; // Scaler for subtractive dynamic lights #endregion @@ -652,8 +654,6 @@ namespace CodeImp.DoomBuilder.VisualModes //mxd. Update light info private void UpdateLight(int lightId) { - float scaled_intensity = 255.0f / General.Settings.GZDynamicLightIntensity; - if(lightId < GZBuilder.GZGeneral.GZ_LIGHT_TYPES[2]) //if it's gzdoom light { int n; @@ -662,19 +662,28 @@ namespace CodeImp.DoomBuilder.VisualModes n = 0; lightRenderStyle = DynamicLightRenderStyle.NORMAL; //lightColor.Alpha used in shader to perform some calculations based on light type - lightColor = new Color4((float)lightRenderStyle / 100.0f, thing.Args[0] / scaled_intensity / 2, thing.Args[1] / scaled_intensity / 2, thing.Args[2] / scaled_intensity / 2); + lightColor = new Color4((float)lightRenderStyle / 100.0f, + thing.Args[0] / DYNLIGHT_INTENSITY_SCALER, + thing.Args[1] / DYNLIGHT_INTENSITY_SCALER, + thing.Args[2] / DYNLIGHT_INTENSITY_SCALER); } else if(lightId < GZBuilder.GZGeneral.GZ_LIGHT_TYPES[1]) { n = 10; lightRenderStyle = DynamicLightRenderStyle.ADDITIVE; - lightColor = new Color4((float)lightRenderStyle / 100.0f, thing.Args[0] / scaled_intensity / 2, thing.Args[1] / scaled_intensity / 2, thing.Args[2] / scaled_intensity / 2); + lightColor = new Color4((float)lightRenderStyle / 100.0f, + thing.Args[0] / DYNLIGHT_INTENSITY_SCALER, + thing.Args[1] / DYNLIGHT_INTENSITY_SCALER, + thing.Args[2] / DYNLIGHT_INTENSITY_SCALER); } else { n = 20; lightRenderStyle = DynamicLightRenderStyle.NEGATIVE; - lightColor = new Color4((float)lightRenderStyle / 100.0f, thing.Args[0] / scaled_intensity / 3, thing.Args[1] / scaled_intensity / 3, thing.Args[2] / scaled_intensity / 3); + lightColor = new Color4((float)lightRenderStyle / 100.0f, + thing.Args[0] / SUBLIGHT_INTENSITY_SCALER, + thing.Args[1] / SUBLIGHT_INTENSITY_SCALER, + thing.Args[2] / SUBLIGHT_INTENSITY_SCALER); } lightType = (DynamicLightType)(thing.Type - 9800 - n); @@ -682,12 +691,12 @@ namespace CodeImp.DoomBuilder.VisualModes { int scaler = 1; if(thing.Sector != null) scaler = thing.Sector.Brightness / 4; - lightPrimaryRadius = (thing.Args[3] * scaler) * General.Settings.GZDynamicLightRadius; + lightPrimaryRadius = (thing.Args[3] * scaler); } else { - lightPrimaryRadius = (thing.Args[3] * 2) * General.Settings.GZDynamicLightRadius; //works... that.. way in GZDoom - if(lightType > 0) lightSecondaryRadius = (thing.Args[4] * 2) * General.Settings.GZDynamicLightRadius; + lightPrimaryRadius = (thing.Args[3] * 2); //works... that.. way in GZDoom + if(lightType > 0) lightSecondaryRadius = (thing.Args[4] * 2); } } else //it's one of vavoom lights @@ -695,10 +704,18 @@ namespace CodeImp.DoomBuilder.VisualModes lightRenderStyle = DynamicLightRenderStyle.VAVOOM; lightType = (DynamicLightType)thing.Type; if(lightType == DynamicLightType.VAVOOM_COLORED) - lightColor = new Color4((float)lightRenderStyle / 100.0f, thing.Args[1] / scaled_intensity / 2, thing.Args[2] / scaled_intensity / 2, thing.Args[3] / scaled_intensity / 2); + { + lightColor = new Color4((float)lightRenderStyle / 100.0f, + thing.Args[1] / DYNLIGHT_INTENSITY_SCALER, + thing.Args[2] / DYNLIGHT_INTENSITY_SCALER, + thing.Args[3] / DYNLIGHT_INTENSITY_SCALER); + } else - lightColor = new Color4((float)lightRenderStyle / 100.0f, General.Settings.GZDynamicLightIntensity / 2, General.Settings.GZDynamicLightIntensity / 2, General.Settings.GZDynamicLightIntensity / 2); - lightPrimaryRadius = (thing.Args[0] * 8) * General.Settings.GZDynamicLightRadius; + { + lightColor = new Color4((float)lightRenderStyle / 100.0f, 0.5f, 0.5f, 0.5f); + } + + lightPrimaryRadius = (thing.Args[0] * 8); } UpdateLightRadius(); @@ -708,12 +725,10 @@ namespace CodeImp.DoomBuilder.VisualModes private void UpdateGldefsLight() { DynamicLightData light = General.Map.Data.GldefsEntries[thing.Type]; - float intensity_mod = General.Settings.GZDynamicLightIntensity; - float scale_mod = General.Settings.GZDynamicLightRadius; //apply settings lightRenderStyle = light.Subtractive ? DynamicLightRenderStyle.NEGATIVE : DynamicLightRenderStyle.NORMAL; - lightColor = new Color4((float)lightRenderStyle / 100.0f, light.Color.Red * intensity_mod, light.Color.Green * intensity_mod, light.Color.Blue * intensity_mod); + lightColor = new Color4((float)lightRenderStyle / 100.0f, light.Color.Red, light.Color.Green, light.Color.Blue); Vector2D o = new Vector2D(light.Offset.X, light.Offset.Y).GetRotated(thing.Angle - Angle2D.PIHALF); lightOffset = new Vector3(o.x, o.y, light.Offset.Z); lightType = light.Type; @@ -724,8 +739,8 @@ namespace CodeImp.DoomBuilder.VisualModes } else { - lightPrimaryRadius = light.PrimaryRadius * scale_mod; - lightSecondaryRadius = light.SecondaryRadius * scale_mod; + lightPrimaryRadius = light.PrimaryRadius; + lightSecondaryRadius = light.SecondaryRadius; } lightInterval = light.Interval; diff --git a/Source/Core/Windows/MainForm.Designer.cs b/Source/Core/Windows/MainForm.Designer.cs index 29a84ee2..73c4821b 100644 --- a/Source/Core/Windows/MainForm.Designer.cs +++ b/Source/Core/Windows/MainForm.Designer.cs @@ -177,6 +177,20 @@ namespace CodeImp.DoomBuilder.Windows this.buttonlinededfcolors = new System.Windows.Forms.ToolStripButton(); this.linedefcolorpresets = new System.Windows.Forms.ToolStripDropDownButton(); this.separatorfilters = new System.Windows.Forms.ToolStripSeparator(); + this.separatorrendering = new System.Windows.Forms.ToolStripSeparator(); + this.itemdynlightmodes = new System.Windows.Forms.ToolStripMenuItem(); + this.itemnodynlights = new System.Windows.Forms.ToolStripMenuItem(); + this.itemdynlights = new System.Windows.Forms.ToolStripMenuItem(); + this.itemdynlightsanim = new System.Windows.Forms.ToolStripMenuItem(); + this.itemmodelmodes = new System.Windows.Forms.ToolStripMenuItem(); + this.itemnomdl = new System.Windows.Forms.ToolStripMenuItem(); + this.itemselmdl = new System.Windows.Forms.ToolStripMenuItem(); + this.itemfiltermdl = new System.Windows.Forms.ToolStripMenuItem(); + this.itemallmdl = new System.Windows.Forms.ToolStripMenuItem(); + this.itemtogglefog = new System.Windows.Forms.ToolStripMenuItem(); + this.itemtogglesky = new System.Windows.Forms.ToolStripMenuItem(); + this.itemtoggleeventlines = new System.Windows.Forms.ToolStripMenuItem(); + this.itemtogglevisualverts = new System.Windows.Forms.ToolStripMenuItem(); this.buttonfullbrightness = new System.Windows.Forms.ToolStripButton(); this.buttontogglegrid = new System.Windows.Forms.ToolStripButton(); this.buttontoggledynamicgrid = new System.Windows.Forms.ToolStripButton(); @@ -197,7 +211,6 @@ namespace CodeImp.DoomBuilder.Windows this.buttonsplitjoinedsectors = new System.Windows.Forms.ToolStripButton(); this.buttonautoclearsidetextures = new System.Windows.Forms.ToolStripButton(); this.seperatorgeometry = new System.Windows.Forms.ToolStripSeparator(); - this.buttontogglefx = new System.Windows.Forms.ToolStripButton(); this.dynamiclightmode = new System.Windows.Forms.ToolStripSplitButton(); this.sightsdontshow = new System.Windows.Forms.ToolStripMenuItem(); this.lightsshow = new System.Windows.Forms.ToolStripMenuItem(); @@ -769,6 +782,13 @@ namespace CodeImp.DoomBuilder.Windows this.itemtogglegrid, this.itemtogglecomments, this.itemtogglefixedthingsscale, + this.separatorrendering, + this.itemdynlightmodes, + this.itemmodelmodes, + this.itemtogglefog, + this.itemtogglesky, + this.itemtoggleeventlines, + this.itemtogglevisualverts, this.toolStripSeparator4, this.menuzoom, this.itemgotocoords, @@ -1323,7 +1343,6 @@ namespace CodeImp.DoomBuilder.Windows this.buttonsplitjoinedsectors, this.buttonautoclearsidetextures, this.seperatorgeometry, - this.buttontogglefx, this.dynamiclightmode, this.modelrendermode, this.buttontogglefog, @@ -1612,6 +1631,144 @@ namespace CodeImp.DoomBuilder.Windows this.separatorfilters.Name = "separatorfilters"; this.separatorfilters.Size = new System.Drawing.Size(6, 25); // + // separatorrendering + // + this.separatorrendering.Name = "separatorrendering"; + this.separatorrendering.Size = new System.Drawing.Size(270, 6); + // + // itemdynlightmodes + // + this.itemdynlightmodes.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.itemnodynlights, + this.itemdynlights, + this.itemdynlightsanim}); + this.itemdynlightmodes.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light; + this.itemdynlightmodes.Name = "itemdynlightmodes"; + this.itemdynlightmodes.Size = new System.Drawing.Size(273, 22); + this.itemdynlightmodes.Text = "Dynamic light rendering mode"; + // + // itemnodynlights + // + this.itemnodynlights.CheckOnClick = true; + this.itemnodynlights.Image = global::CodeImp.DoomBuilder.Properties.Resources.LightDisabled; + this.itemnodynlights.Name = "itemnodynlights"; + this.itemnodynlights.Size = new System.Drawing.Size(237, 22); + this.itemnodynlights.Tag = 0; + this.itemnodynlights.Text = "Don\'t show dynamic lights"; + this.itemnodynlights.Click += new System.EventHandler(this.ChangeLightRenderingMode); + // + // itemdynlights + // + this.itemdynlights.CheckOnClick = true; + this.itemdynlights.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light; + this.itemdynlights.Name = "itemdynlights"; + this.itemdynlights.Size = new System.Drawing.Size(237, 22); + this.itemdynlights.Tag = 1; + this.itemdynlights.Text = "Show dynamic lights"; + this.itemdynlights.Click += new System.EventHandler(this.ChangeLightRenderingMode); + // + // itemdynlightsanim + // + this.itemdynlightsanim.CheckOnClick = true; + this.itemdynlightsanim.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light_animate; + this.itemdynlightsanim.Name = "itemdynlightsanim"; + this.itemdynlightsanim.Size = new System.Drawing.Size(237, 22); + this.itemdynlightsanim.Tag = 2; + this.itemdynlightsanim.Text = "Show animated dynamic lights"; + this.itemdynlightsanim.Click += new System.EventHandler(this.ChangeLightRenderingMode); + // + // itemmodelmodes + // + this.itemmodelmodes.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.itemnomdl, + this.itemselmdl, + this.itemfiltermdl, + this.itemallmdl}); + this.itemmodelmodes.Image = global::CodeImp.DoomBuilder.Properties.Resources.Model; + this.itemmodelmodes.Name = "itemmodelmodes"; + this.itemmodelmodes.Size = new System.Drawing.Size(273, 22); + this.itemmodelmodes.Text = "Model rendering mode"; + // + // itemnomdl + // + this.itemnomdl.CheckOnClick = true; + this.itemnomdl.Image = global::CodeImp.DoomBuilder.Properties.Resources.ModelDisabled; + this.itemnomdl.Name = "itemnomdl"; + this.itemnomdl.Size = new System.Drawing.Size(298, 22); + this.itemnomdl.Tag = 0; + this.itemnomdl.Text = "Don\'t show models"; + this.itemnomdl.Click += new System.EventHandler(this.ChangeModelRenderingMode); + // + // itemselmdl + // + this.itemselmdl.CheckOnClick = true; + this.itemselmdl.Image = global::CodeImp.DoomBuilder.Properties.Resources.Model_selected; + this.itemselmdl.Name = "itemselmdl"; + this.itemselmdl.Size = new System.Drawing.Size(298, 22); + this.itemselmdl.Tag = 1; + this.itemselmdl.Text = "Show models for selected Things only"; + this.itemselmdl.Click += new System.EventHandler(this.ChangeModelRenderingMode); + // + // itemfiltermdl + // + this.itemfiltermdl.CheckOnClick = true; + this.itemfiltermdl.Image = global::CodeImp.DoomBuilder.Properties.Resources.ModelFiltered; + this.itemfiltermdl.Name = "itemfiltermdl"; + this.itemfiltermdl.Size = new System.Drawing.Size(298, 22); + this.itemfiltermdl.Tag = 2; + this.itemfiltermdl.Text = "Show models for current Things Filter only"; + this.itemfiltermdl.Click += new System.EventHandler(this.ChangeModelRenderingMode); + // + // itemallmdl + // + this.itemallmdl.CheckOnClick = true; + this.itemallmdl.Image = global::CodeImp.DoomBuilder.Properties.Resources.Model; + this.itemallmdl.Name = "itemallmdl"; + this.itemallmdl.Size = new System.Drawing.Size(298, 22); + this.itemallmdl.Tag = 3; + this.itemallmdl.Text = "Always show models"; + this.itemallmdl.Click += new System.EventHandler(this.ChangeModelRenderingMode); + // + // itemfog + // + this.itemtogglefog.CheckOnClick = true; + this.itemtogglefog.Image = global::CodeImp.DoomBuilder.Properties.Resources.fog; + this.itemtogglefog.Name = "itemtogglefog"; + this.itemtogglefog.Size = new System.Drawing.Size(273, 22); + this.itemtogglefog.Tag = "builder_gztogglefog"; + this.itemtogglefog.Text = "Render fog (Visual mode)"; + this.itemtogglefog.Click += new System.EventHandler(this.InvokeTaggedAction); + // + // itemsky + // + this.itemtogglesky.CheckOnClick = true; + this.itemtogglesky.Image = global::CodeImp.DoomBuilder.Properties.Resources.Sky; + this.itemtogglesky.Name = "itemtogglesky"; + this.itemtogglesky.Size = new System.Drawing.Size(273, 22); + this.itemtogglesky.Tag = "builder_gztogglesky"; + this.itemtogglesky.Text = "Render sky (Visual mode)"; + this.itemtogglesky.Click += new System.EventHandler(this.InvokeTaggedAction); + // + // itemeventlines + // + this.itemtoggleeventlines.CheckOnClick = true; + this.itemtoggleeventlines.Image = global::CodeImp.DoomBuilder.Properties.Resources.InfoLine; + this.itemtoggleeventlines.Name = "itemtoggleeventlines"; + this.itemtoggleeventlines.Size = new System.Drawing.Size(273, 22); + this.itemtoggleeventlines.Tag = "builder_gztoggleeventlines"; + this.itemtoggleeventlines.Text = "Show Event Lines"; + this.itemtoggleeventlines.Click += new System.EventHandler(this.InvokeTaggedAction); + // + // itemvisualverts + // + this.itemtogglevisualverts.CheckOnClick = true; + this.itemtogglevisualverts.Image = global::CodeImp.DoomBuilder.Properties.Resources.VisualVertices; + this.itemtogglevisualverts.Name = "itemtogglevisualverts"; + this.itemtogglevisualverts.Size = new System.Drawing.Size(273, 22); + this.itemtogglevisualverts.Tag = "builder_gztogglevisualvertices"; + this.itemtogglevisualverts.Text = "Show Editable Vertices (Visual mode)"; + this.itemtogglevisualverts.Click += new System.EventHandler(this.InvokeTaggedAction); + // // buttonfullbrightness // this.buttonfullbrightness.Checked = true; @@ -1840,17 +1997,6 @@ namespace CodeImp.DoomBuilder.Windows this.seperatorgeometry.Name = "seperatorgeometry"; this.seperatorgeometry.Size = new System.Drawing.Size(6, 25); // - // buttontogglefx - // - this.buttontogglefx.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.buttontogglefx.Image = global::CodeImp.DoomBuilder.Properties.Resources.fx; - this.buttontogglefx.ImageTransparentColor = System.Drawing.Color.Magenta; - this.buttontogglefx.Name = "buttontogglefx"; - this.buttontogglefx.Size = new System.Drawing.Size(23, 22); - this.buttontogglefx.Tag = "builder_gztogglefx"; - this.buttontogglefx.Text = "Toggle GZDoom Effects"; - this.buttontogglefx.Click += new System.EventHandler(this.InvokeTaggedAction); - // // dynamiclightmode // this.dynamiclightmode.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; @@ -1961,7 +2107,7 @@ namespace CodeImp.DoomBuilder.Windows this.buttontogglefog.Name = "buttontogglefog"; this.buttontogglefog.Size = new System.Drawing.Size(23, 20); this.buttontogglefog.Tag = "builder_gztogglefog"; - this.buttontogglefog.Text = "Toggle Fog Rendering"; + this.buttontogglefog.Text = "Render Fog (Visual mode)"; this.buttontogglefog.Click += new System.EventHandler(this.InvokeTaggedAction); // // buttontogglesky @@ -1973,7 +2119,7 @@ namespace CodeImp.DoomBuilder.Windows this.buttontogglesky.Name = "buttontogglesky"; this.buttontogglesky.Size = new System.Drawing.Size(23, 20); this.buttontogglesky.Tag = "builder_gztogglesky"; - this.buttontogglesky.Text = "Toggle Sky Rendering"; + this.buttontogglesky.Text = "Render Sky (Visual mode)"; this.buttontogglesky.Click += new System.EventHandler(this.InvokeTaggedAction); // // buttontoggleeventlines @@ -1984,7 +2130,7 @@ namespace CodeImp.DoomBuilder.Windows this.buttontoggleeventlines.Name = "buttontoggleeventlines"; this.buttontoggleeventlines.Size = new System.Drawing.Size(23, 20); this.buttontoggleeventlines.Tag = "builder_gztoggleeventlines"; - this.buttontoggleeventlines.Text = "Toggle Event Lines"; + this.buttontoggleeventlines.Text = "Show Event Lines"; this.buttontoggleeventlines.Click += new System.EventHandler(this.InvokeTaggedAction); // // buttontogglevisualvertices @@ -1995,7 +2141,7 @@ namespace CodeImp.DoomBuilder.Windows this.buttontogglevisualvertices.Name = "buttontogglevisualvertices"; this.buttontogglevisualvertices.Size = new System.Drawing.Size(23, 20); this.buttontogglevisualvertices.Tag = "builder_gztogglevisualvertices"; - this.buttontogglevisualvertices.Text = "Show Editable Vertices in Visual Mode"; + this.buttontogglevisualvertices.Text = "Show Editable Vertices (Visual mode)"; this.buttontogglevisualvertices.Click += new System.EventHandler(this.InvokeTaggedAction); // // separatorgzmodes @@ -2793,7 +2939,6 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.ToolStripSeparator seperatoreditgrid; private System.Windows.Forms.ToolStripSeparator seperatoreditcopypaste; private System.Windows.Forms.ToolStripSeparator seperatorgeometry; - private System.Windows.Forms.ToolStripButton buttontogglefx; private System.Windows.Forms.ToolStripButton buttontogglefog; private System.Windows.Forms.ToolStripButton buttontogglesky; private System.Windows.Forms.ToolStripStatusLabel warnsLabel; @@ -2840,6 +2985,20 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.ToolStripButton buttonfullbrightness; private System.Windows.Forms.ToolStripSeparator separatorfullbrightness; private System.Windows.Forms.ToolStripSeparator separatorfilters; + private System.Windows.Forms.ToolStripSeparator separatorrendering; + private System.Windows.Forms.ToolStripMenuItem itemdynlightmodes; + private System.Windows.Forms.ToolStripMenuItem itemnodynlights; + private System.Windows.Forms.ToolStripMenuItem itemdynlights; + private System.Windows.Forms.ToolStripMenuItem itemdynlightsanim; + private System.Windows.Forms.ToolStripMenuItem itemmodelmodes; + private System.Windows.Forms.ToolStripMenuItem itemnomdl; + private System.Windows.Forms.ToolStripMenuItem itemselmdl; + private System.Windows.Forms.ToolStripMenuItem itemfiltermdl; + private System.Windows.Forms.ToolStripMenuItem itemallmdl; + private System.Windows.Forms.ToolStripMenuItem itemtogglefog; + private System.Windows.Forms.ToolStripMenuItem itemtogglesky; + private System.Windows.Forms.ToolStripMenuItem itemtoggleeventlines; + private System.Windows.Forms.ToolStripMenuItem itemtogglevisualverts; private ToolStripMenuItem itemimport; private ToolStripMenuItem itemexport; private ToolStripSeparator separatorio; diff --git a/Source/Core/Windows/MainForm.cs b/Source/Core/Windows/MainForm.cs index fb90c0fb..a6f1a2cd 100644 --- a/Source/Core/Windows/MainForm.cs +++ b/Source/Core/Windows/MainForm.cs @@ -2133,7 +2133,6 @@ namespace CodeImp.DoomBuilder.Windows //mxd modelrendermode.Visible = General.Settings.GZToolbarGZDoom && maploaded; dynamiclightmode.Visible = General.Settings.GZToolbarGZDoom && maploaded; - buttontogglefx.Visible = General.Settings.GZToolbarGZDoom && maploaded; buttontogglefog.Visible = General.Settings.GZToolbarGZDoom && maploaded; buttontogglesky.Visible = General.Settings.GZToolbarGZDoom && maploaded; buttontoggleeventlines.Visible = General.Settings.GZToolbarGZDoom && maploaded; @@ -3019,7 +3018,7 @@ namespace CodeImp.DoomBuilder.Windows #region ================== View Menu - // This sets up the modes menu + // This sets up the View menu private void UpdateViewMenu() { menuview.Visible = (General.Map != null); //mxd @@ -3032,6 +3031,25 @@ namespace CodeImp.DoomBuilder.Windows itemtogglecomments.Checked = General.Settings.RenderComments; //mxd itemtogglefixedthingsscale.Visible = (General.Map != null); //mxd itemtogglefixedthingsscale.Checked = General.Settings.FixedThingsScale; //mxd + itemtogglefog.Checked = General.Settings.GZDrawFog; + itemtogglesky.Checked = General.Settings.GZDrawSky; + itemtoggleeventlines.Checked = General.Settings.GZShowEventLines; + itemtogglevisualverts.Visible = (General.Map != null && General.Map.UDMF); + itemtogglevisualverts.Checked = General.Settings.GZShowVisualVertices; + + // Update Model Rendering Mode items... + foreach(ToolStripMenuItem item in itemmodelmodes.DropDownItems) + { + item.Checked = ((ModelRenderMode)item.Tag == General.Settings.GZDrawModelsMode); + if(item.Checked) itemmodelmodes.Image = item.Image; + } + + // Update Dynamic Light Mode items... + foreach(ToolStripMenuItem item in itemdynlightmodes.DropDownItems) + { + item.Checked = ((LightRenderMode)item.Tag == General.Settings.GZDrawLightsMode); + if(item.Checked) itemdynlightmodes.Image = item.Image; + } // View mode items if(General.Map != null) @@ -3045,6 +3063,76 @@ namespace CodeImp.DoomBuilder.Windows } } + //mxd + [BeginAction("gztoggleenhancedrendering")] + public void ToggleEnhancedRendering() + { + General.Settings.EnhancedRenderingEffects = !General.Settings.EnhancedRenderingEffects; + + General.Settings.GZDrawFog = General.Settings.EnhancedRenderingEffects; + General.Settings.GZDrawSky = General.Settings.EnhancedRenderingEffects; + General.Settings.GZDrawLightsMode = (General.Settings.EnhancedRenderingEffects ? LightRenderMode.ALL : LightRenderMode.NONE); + General.Settings.GZDrawModelsMode = (General.Settings.EnhancedRenderingEffects ? ModelRenderMode.ALL : ModelRenderMode.NONE); + + UpdateGZDoomPanel(); + UpdateViewMenu(); + DisplayStatus(StatusType.Info, "Enhanced rendering effects are " + (General.Settings.EnhancedRenderingEffects ? "ENABLED" : "DISABLED")); + } + + //mxd + [BeginAction("gztogglefog")] + internal void ToggleFog() + { + General.Settings.GZDrawFog = !General.Settings.GZDrawFog; + + itemtogglefog.Checked = General.Settings.GZDrawFog; + buttontogglefog.Checked = General.Settings.GZDrawFog; + + General.MainWindow.DisplayStatus(StatusType.Action, "Fog rendering is " + (General.Settings.GZDrawFog ? "ENABLED" : "DISABLED")); + General.MainWindow.RedrawDisplay(); + General.MainWindow.UpdateGZDoomPanel(); + } + + //mxd + [BeginAction("gztogglesky")] + internal void ToggleSky() + { + General.Settings.GZDrawSky = !General.Settings.GZDrawSky; + + itemtogglesky.Checked = General.Settings.GZDrawSky; + buttontogglesky.Checked = General.Settings.GZDrawSky; + + General.MainWindow.DisplayStatus(StatusType.Action, "Sky rendering is " + (General.Settings.GZDrawSky ? "ENABLED" : "DISABLED")); + General.MainWindow.RedrawDisplay(); + General.MainWindow.UpdateGZDoomPanel(); + } + + [BeginAction("gztoggleeventlines")] + internal void ToggleEventLines() + { + General.Settings.GZShowEventLines = !General.Settings.GZShowEventLines; + + itemtoggleeventlines.Checked = General.Settings.GZShowEventLines; + buttontoggleeventlines.Checked = General.Settings.GZShowEventLines; + + General.MainWindow.DisplayStatus(StatusType.Action, "Event lines are " + (General.Settings.GZShowEventLines ? "ENABLED" : "DISABLED")); + General.MainWindow.RedrawDisplay(); + General.MainWindow.UpdateGZDoomPanel(); + } + + [BeginAction("gztogglevisualvertices")] + internal void ToggleVisualVertices() + { + General.Settings.GZShowVisualVertices = !General.Settings.GZShowVisualVertices; + + itemtogglevisualverts.Checked = General.Settings.GZShowVisualVertices; + buttontogglevisualvertices.Checked = General.Settings.GZShowVisualVertices; + + General.MainWindow.DisplayStatus(StatusType.Action, "Visual vertices are " + (General.Settings.GZShowVisualVertices ? "ENABLED" : "DISABLED")); + General.MainWindow.RedrawDisplay(); + General.MainWindow.UpdateGZDoomPanel(); + } + #endregion #region ================== Mode Menu @@ -3501,7 +3589,8 @@ namespace CodeImp.DoomBuilder.Windows General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: ALL"); break; } - + + UpdateViewMenu(); UpdateGZDoomPanel(); RedrawDisplay(); } @@ -3524,7 +3613,8 @@ namespace CodeImp.DoomBuilder.Windows General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: ANIMATED"); break; } - + + UpdateViewMenu(); UpdateGZDoomPanel(); RedrawDisplay(); } diff --git a/Source/Core/Windows/PreferencesForm.Designer.cs b/Source/Core/Windows/PreferencesForm.Designer.cs index 5b528cee..bff4715a 100644 --- a/Source/Core/Windows/PreferencesForm.Designer.cs +++ b/Source/Core/Windows/PreferencesForm.Designer.cs @@ -35,8 +35,6 @@ namespace CodeImp.DoomBuilder.Windows System.Windows.Forms.GroupBox groupBox1; System.Windows.Forms.Label label1; System.Windows.Forms.Label label18; - System.Windows.Forms.Label label20; - System.Windows.Forms.Label label21; System.Windows.Forms.Label label27; System.Windows.Forms.Label label29; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PreferencesForm)); @@ -160,10 +158,6 @@ namespace CodeImp.DoomBuilder.Windows this.labelanisotropicfiltering = new System.Windows.Forms.Label(); this.anisotropicfiltering = new System.Windows.Forms.TrackBar(); this.cbOldHighlightMode = new System.Windows.Forms.CheckBox(); - this.labelDynLightIntensity = new System.Windows.Forms.Label(); - this.tbDynLightIntensity = new System.Windows.Forms.TrackBar(); - this.labelDynLightSize = new System.Windows.Forms.Label(); - this.tbDynLightSize = new System.Windows.Forms.TrackBar(); this.labelDynLightCount = new System.Windows.Forms.Label(); this.tbDynLightCount = new System.Windows.Forms.TrackBar(); this.imagebrightness = new System.Windows.Forms.TrackBar(); @@ -224,8 +218,6 @@ namespace CodeImp.DoomBuilder.Windows groupBox1 = new System.Windows.Forms.GroupBox(); label1 = new System.Windows.Forms.Label(); label18 = new System.Windows.Forms.Label(); - label20 = new System.Windows.Forms.Label(); - label21 = new System.Windows.Forms.Label(); label27 = new System.Windows.Forms.Label(); label29 = new System.Windows.Forms.Label(); groupBox1.SuspendLayout(); @@ -255,8 +247,6 @@ namespace CodeImp.DoomBuilder.Windows ((System.ComponentModel.ISupportInitialize)(this.activethingsalpha)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.antialiasing)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.anisotropicfiltering)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbDynLightIntensity)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbDynLightSize)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tbDynLightCount)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.imagebrightness)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.hiddenthingsalpha)).BeginInit(); @@ -602,7 +592,7 @@ namespace CodeImp.DoomBuilder.Windows // label1 // label1.AutoSize = true; - label1.Location = new System.Drawing.Point(43, 171); + label1.Location = new System.Drawing.Point(44, 203); label1.Name = "label1"; label1.Size = new System.Drawing.Size(145, 13); label1.TabIndex = 20; @@ -612,7 +602,7 @@ namespace CodeImp.DoomBuilder.Windows // label18 // label18.AutoSize = true; - label18.Location = new System.Drawing.Point(80, 208); + label18.Location = new System.Drawing.Point(80, 248); label18.Name = "label18"; label18.Size = new System.Drawing.Size(108, 13); label18.TabIndex = 25; @@ -621,30 +611,10 @@ namespace CodeImp.DoomBuilder.Windows this.toolTip1.SetToolTip(label18, "Controls how many dynamic lights could be \r\nrendered simultaneously in Visual mod" + "e "); // - // label20 - // - label20.AutoSize = true; - label20.Location = new System.Drawing.Point(94, 245); - label20.Name = "label20"; - label20.Size = new System.Drawing.Size(94, 13); - label20.TabIndex = 28; - label20.Text = "Dynamic light size:"; - label20.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // label21 - // - label21.AutoSize = true; - label21.Location = new System.Drawing.Point(74, 282); - label21.Name = "label21"; - label21.Size = new System.Drawing.Size(114, 13); - label21.TabIndex = 31; - label21.Text = "Dynamic light intensity:"; - label21.TextAlign = System.Drawing.ContentAlignment.TopRight; - // // label27 // label27.AutoSize = true; - label27.Location = new System.Drawing.Point(90, 319); + label27.Location = new System.Drawing.Point(90, 293); label27.Name = "label27"; label27.Size = new System.Drawing.Size(98, 13); label27.TabIndex = 35; @@ -654,7 +624,7 @@ namespace CodeImp.DoomBuilder.Windows // label29 // label29.AutoSize = true; - label29.Location = new System.Drawing.Point(96, 356); + label29.Location = new System.Drawing.Point(95, 338); label29.Name = "label29"; label29.Size = new System.Drawing.Size(93, 13); label29.TabIndex = 38; @@ -1620,16 +1590,10 @@ namespace CodeImp.DoomBuilder.Windows this.appearancegroup1.Controls.Add(this.labelanisotropicfiltering); this.appearancegroup1.Controls.Add(this.anisotropicfiltering); this.appearancegroup1.Controls.Add(this.cbOldHighlightMode); - this.appearancegroup1.Controls.Add(label21); - this.appearancegroup1.Controls.Add(this.labelDynLightIntensity); this.appearancegroup1.Controls.Add(this.cbStretchView); - this.appearancegroup1.Controls.Add(this.tbDynLightIntensity); - this.appearancegroup1.Controls.Add(label20); this.appearancegroup1.Controls.Add(this.doublesidedalphalabel); this.appearancegroup1.Controls.Add(this.qualitydisplay); - this.appearancegroup1.Controls.Add(this.labelDynLightSize); this.appearancegroup1.Controls.Add(this.label2); - this.appearancegroup1.Controls.Add(this.tbDynLightSize); this.appearancegroup1.Controls.Add(label18); this.appearancegroup1.Controls.Add(this.labelDynLightCount); this.appearancegroup1.Controls.Add(this.tbDynLightCount); @@ -1652,7 +1616,7 @@ namespace CodeImp.DoomBuilder.Windows // activethingsalphalabel // this.activethingsalphalabel.AutoSize = true; - this.activethingsalphalabel.Location = new System.Drawing.Point(359, 60); + this.activethingsalphalabel.Location = new System.Drawing.Point(359, 68); this.activethingsalphalabel.Name = "activethingsalphalabel"; this.activethingsalphalabel.Size = new System.Drawing.Size(21, 13); this.activethingsalphalabel.TabIndex = 48; @@ -1661,7 +1625,7 @@ namespace CodeImp.DoomBuilder.Windows // label31 // this.label31.AutoSize = true; - this.label31.Location = new System.Drawing.Point(12, 60); + this.label31.Location = new System.Drawing.Point(12, 68); this.label31.Name = "label31"; this.label31.Size = new System.Drawing.Size(176, 13); this.label31.TabIndex = 47; @@ -1685,7 +1649,7 @@ namespace CodeImp.DoomBuilder.Windows // this.activethingsalpha.BackColor = System.Drawing.SystemColors.Window; this.activethingsalpha.LargeChange = 3; - this.activethingsalpha.Location = new System.Drawing.Point(199, 49); + this.activethingsalpha.Location = new System.Drawing.Point(199, 57); this.activethingsalpha.Name = "activethingsalpha"; this.activethingsalpha.Size = new System.Drawing.Size(154, 45); this.activethingsalpha.TabIndex = 1; @@ -1695,7 +1659,7 @@ namespace CodeImp.DoomBuilder.Windows // hiddenthingsalphalabel // this.hiddenthingsalphalabel.AutoSize = true; - this.hiddenthingsalphalabel.Location = new System.Drawing.Point(359, 134); + this.hiddenthingsalphalabel.Location = new System.Drawing.Point(359, 158); this.hiddenthingsalphalabel.Name = "hiddenthingsalphalabel"; this.hiddenthingsalphalabel.Size = new System.Drawing.Size(21, 13); this.hiddenthingsalphalabel.TabIndex = 45; @@ -1704,7 +1668,7 @@ namespace CodeImp.DoomBuilder.Windows // label32 // this.label32.AutoSize = true; - this.label32.Location = new System.Drawing.Point(49, 134); + this.label32.Location = new System.Drawing.Point(49, 158); this.label32.Name = "label32"; this.label32.Size = new System.Drawing.Size(139, 13); this.label32.TabIndex = 44; @@ -1715,7 +1679,7 @@ namespace CodeImp.DoomBuilder.Windows // inactivethingsalphalabel // this.inactivethingsalphalabel.AutoSize = true; - this.inactivethingsalphalabel.Location = new System.Drawing.Point(359, 97); + this.inactivethingsalphalabel.Location = new System.Drawing.Point(359, 113); this.inactivethingsalphalabel.Name = "inactivethingsalphalabel"; this.inactivethingsalphalabel.Size = new System.Drawing.Size(21, 13); this.inactivethingsalphalabel.TabIndex = 42; @@ -1724,7 +1688,7 @@ namespace CodeImp.DoomBuilder.Windows // label30 // this.label30.AutoSize = true; - this.label30.Location = new System.Drawing.Point(15, 97); + this.label30.Location = new System.Drawing.Point(15, 113); this.label30.Name = "label30"; this.label30.Size = new System.Drawing.Size(173, 13); this.label30.TabIndex = 41; @@ -1735,7 +1699,7 @@ namespace CodeImp.DoomBuilder.Windows // labelantialiasing // this.labelantialiasing.AutoSize = true; - this.labelantialiasing.Location = new System.Drawing.Point(359, 356); + this.labelantialiasing.Location = new System.Drawing.Point(359, 338); this.labelantialiasing.Name = "labelantialiasing"; this.labelantialiasing.Size = new System.Drawing.Size(54, 13); this.labelantialiasing.TabIndex = 39; @@ -1745,7 +1709,7 @@ namespace CodeImp.DoomBuilder.Windows // this.antialiasing.BackColor = System.Drawing.SystemColors.Window; this.antialiasing.LargeChange = 1; - this.antialiasing.Location = new System.Drawing.Point(199, 345); + this.antialiasing.Location = new System.Drawing.Point(199, 327); this.antialiasing.Maximum = 3; this.antialiasing.Name = "antialiasing"; this.antialiasing.Size = new System.Drawing.Size(154, 45); @@ -1757,7 +1721,7 @@ namespace CodeImp.DoomBuilder.Windows // labelanisotropicfiltering // this.labelanisotropicfiltering.AutoSize = true; - this.labelanisotropicfiltering.Location = new System.Drawing.Point(359, 319); + this.labelanisotropicfiltering.Location = new System.Drawing.Point(359, 293); this.labelanisotropicfiltering.Name = "labelanisotropicfiltering"; this.labelanisotropicfiltering.Size = new System.Drawing.Size(24, 13); this.labelanisotropicfiltering.TabIndex = 36; @@ -1767,7 +1731,7 @@ namespace CodeImp.DoomBuilder.Windows // this.anisotropicfiltering.BackColor = System.Drawing.SystemColors.Window; this.anisotropicfiltering.LargeChange = 1; - this.anisotropicfiltering.Location = new System.Drawing.Point(199, 308); + this.anisotropicfiltering.Location = new System.Drawing.Point(199, 282); this.anisotropicfiltering.Maximum = 4; this.anisotropicfiltering.Name = "anisotropicfiltering"; this.anisotropicfiltering.Size = new System.Drawing.Size(154, 45); @@ -1788,55 +1752,10 @@ namespace CodeImp.DoomBuilder.Windows "ighlight\" mode is disabled \r\n(Doom Builder 2 behaviour)."); this.cbOldHighlightMode.UseVisualStyleBackColor = true; // - // labelDynLightIntensity - // - this.labelDynLightIntensity.AutoSize = true; - this.labelDynLightIntensity.Location = new System.Drawing.Point(359, 282); - this.labelDynLightIntensity.Name = "labelDynLightIntensity"; - this.labelDynLightIntensity.Size = new System.Drawing.Size(22, 13); - this.labelDynLightIntensity.TabIndex = 32; - this.labelDynLightIntensity.Text = "1.0"; - // - // tbDynLightIntensity - // - this.tbDynLightIntensity.BackColor = System.Drawing.SystemColors.Window; - this.tbDynLightIntensity.LargeChange = 1; - this.tbDynLightIntensity.Location = new System.Drawing.Point(199, 271); - this.tbDynLightIntensity.Minimum = 1; - this.tbDynLightIntensity.Name = "tbDynLightIntensity"; - this.tbDynLightIntensity.Size = new System.Drawing.Size(154, 45); - this.tbDynLightIntensity.TabIndex = 7; - this.tbDynLightIntensity.TickStyle = System.Windows.Forms.TickStyle.TopLeft; - this.tbDynLightIntensity.Value = 10; - this.tbDynLightIntensity.ValueChanged += new System.EventHandler(this.tbDynLightIntensity_ValueChanged); - // - // labelDynLightSize - // - this.labelDynLightSize.AutoSize = true; - this.labelDynLightSize.Location = new System.Drawing.Point(359, 245); - this.labelDynLightSize.Name = "labelDynLightSize"; - this.labelDynLightSize.Size = new System.Drawing.Size(22, 13); - this.labelDynLightSize.TabIndex = 29; - this.labelDynLightSize.Text = "1.0"; - // - // tbDynLightSize - // - this.tbDynLightSize.BackColor = System.Drawing.SystemColors.Window; - this.tbDynLightSize.LargeChange = 1; - this.tbDynLightSize.Location = new System.Drawing.Point(199, 234); - this.tbDynLightSize.Maximum = 20; - this.tbDynLightSize.Minimum = 1; - this.tbDynLightSize.Name = "tbDynLightSize"; - this.tbDynLightSize.Size = new System.Drawing.Size(154, 45); - this.tbDynLightSize.TabIndex = 6; - this.tbDynLightSize.TickStyle = System.Windows.Forms.TickStyle.TopLeft; - this.tbDynLightSize.Value = 10; - this.tbDynLightSize.ValueChanged += new System.EventHandler(this.tbDynLightSize_ValueChanged); - // // labelDynLightCount // this.labelDynLightCount.AutoSize = true; - this.labelDynLightCount.Location = new System.Drawing.Point(359, 208); + this.labelDynLightCount.Location = new System.Drawing.Point(359, 248); this.labelDynLightCount.Name = "labelDynLightCount"; this.labelDynLightCount.Size = new System.Drawing.Size(19, 13); this.labelDynLightCount.TabIndex = 26; @@ -1846,7 +1765,7 @@ namespace CodeImp.DoomBuilder.Windows // this.tbDynLightCount.BackColor = System.Drawing.SystemColors.Window; this.tbDynLightCount.LargeChange = 1; - this.tbDynLightCount.Location = new System.Drawing.Point(199, 197); + this.tbDynLightCount.Location = new System.Drawing.Point(199, 237); this.tbDynLightCount.Maximum = 8; this.tbDynLightCount.Minimum = 1; this.tbDynLightCount.Name = "tbDynLightCount"; @@ -1860,7 +1779,7 @@ namespace CodeImp.DoomBuilder.Windows // this.imagebrightness.BackColor = System.Drawing.SystemColors.Window; this.imagebrightness.LargeChange = 3; - this.imagebrightness.Location = new System.Drawing.Point(199, 160); + this.imagebrightness.Location = new System.Drawing.Point(199, 192); this.imagebrightness.Name = "imagebrightness"; this.imagebrightness.Size = new System.Drawing.Size(154, 45); this.imagebrightness.TabIndex = 4; @@ -1881,7 +1800,7 @@ namespace CodeImp.DoomBuilder.Windows // this.hiddenthingsalpha.BackColor = System.Drawing.SystemColors.Window; this.hiddenthingsalpha.LargeChange = 3; - this.hiddenthingsalpha.Location = new System.Drawing.Point(199, 123); + this.hiddenthingsalpha.Location = new System.Drawing.Point(199, 147); this.hiddenthingsalpha.Name = "hiddenthingsalpha"; this.hiddenthingsalpha.Size = new System.Drawing.Size(154, 45); this.hiddenthingsalpha.TabIndex = 3; @@ -1892,7 +1811,7 @@ namespace CodeImp.DoomBuilder.Windows // this.inactivethingsalpha.BackColor = System.Drawing.SystemColors.Window; this.inactivethingsalpha.LargeChange = 3; - this.inactivethingsalpha.Location = new System.Drawing.Point(199, 86); + this.inactivethingsalpha.Location = new System.Drawing.Point(199, 102); this.inactivethingsalpha.Name = "inactivethingsalpha"; this.inactivethingsalpha.Size = new System.Drawing.Size(154, 45); this.inactivethingsalpha.TabIndex = 2; @@ -1922,7 +1841,7 @@ namespace CodeImp.DoomBuilder.Windows // imagebrightnesslabel // this.imagebrightnesslabel.AutoSize = true; - this.imagebrightnesslabel.Location = new System.Drawing.Point(360, 171); + this.imagebrightnesslabel.Location = new System.Drawing.Point(360, 203); this.imagebrightnesslabel.Name = "imagebrightnesslabel"; this.imagebrightnesslabel.Size = new System.Drawing.Size(30, 13); this.imagebrightnesslabel.TabIndex = 22; @@ -2541,8 +2460,6 @@ namespace CodeImp.DoomBuilder.Windows ((System.ComponentModel.ISupportInitialize)(this.activethingsalpha)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.antialiasing)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.anisotropicfiltering)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbDynLightIntensity)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbDynLightSize)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.tbDynLightCount)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.imagebrightness)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.hiddenthingsalpha)).EndInit(); @@ -2648,10 +2565,6 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.CheckBox toolbar_gzdoom; private System.Windows.Forms.Label labelDynLightCount; private System.Windows.Forms.TrackBar tbDynLightCount; - private System.Windows.Forms.Label labelDynLightSize; - private System.Windows.Forms.TrackBar tbDynLightSize; - private System.Windows.Forms.Label labelDynLightIntensity; - private System.Windows.Forms.TrackBar tbDynLightIntensity; private System.Windows.Forms.CheckBox cbSynchCameras; private System.Windows.Forms.CheckBox cbStretchView; private System.Windows.Forms.ToolTip toolTip1; diff --git a/Source/Core/Windows/PreferencesForm.cs b/Source/Core/Windows/PreferencesForm.cs index c67bd62b..9e2165ab 100644 --- a/Source/Core/Windows/PreferencesForm.cs +++ b/Source/Core/Windows/PreferencesForm.cs @@ -99,10 +99,6 @@ namespace CodeImp.DoomBuilder.Windows cbSynchCameras.Checked = General.Settings.GZSynchCameras; tbDynLightCount.Value = General.Clamp(General.Settings.GZMaxDynamicLights / 8, tbDynLightCount.Minimum, tbDynLightCount.Maximum); labelDynLightCount.Text = General.Settings.GZMaxDynamicLights.ToString(); - tbDynLightSize.Value = General.Clamp((int)(General.Settings.GZDynamicLightRadius * 10), tbDynLightSize.Minimum, tbDynLightSize.Maximum); - labelDynLightSize.Text = General.Settings.GZDynamicLightRadius.ToString(); - tbDynLightIntensity.Value = General.Clamp((int)(General.Settings.GZDynamicLightIntensity * 10), tbDynLightIntensity.Minimum, tbDynLightIntensity.Maximum); - labelDynLightIntensity.Text = General.Settings.GZDynamicLightIntensity.ToString(); cbStretchView.Checked = General.Settings.GZStretchView; cbOldHighlightMode.Checked = General.Settings.GZOldHighlightMode; vertexScale.Value = General.Clamp((int)(General.Settings.GZVertexScale2D), vertexScale.Minimum, vertexScale.Maximum); @@ -410,8 +406,6 @@ namespace CodeImp.DoomBuilder.Windows //mxd General.Settings.GZSynchCameras = cbSynchCameras.Checked; General.Settings.GZMaxDynamicLights = tbDynLightCount.Value * 8; - General.Settings.GZDynamicLightRadius = (tbDynLightSize.Value / 10.0f); - General.Settings.GZDynamicLightIntensity = (tbDynLightIntensity.Value / 10.0f); General.Settings.FilterAnisotropy = D3DDevice.AF_STEPS[anisotropicfiltering.Value]; General.Settings.AntiAliasingSamples = D3DDevice.AA_STEPS[antialiasing.Value]; General.Settings.GZStretchView = cbStretchView.Checked; @@ -1009,18 +1003,6 @@ namespace CodeImp.DoomBuilder.Windows labelDynLightCount.Text = (tbDynLightCount.Value * 8).ToString(); } - //mxd - private void tbDynLightSize_ValueChanged(object sender, EventArgs e) - { - labelDynLightSize.Text = ((float)tbDynLightSize.Value / 10).ToString(); - } - - //mxd - private void tbDynLightIntensity_ValueChanged(object sender, EventArgs e) - { - labelDynLightIntensity.Text = ((float)tbDynLightIntensity.Value / 10).ToString(); - } - //mxd private void anisotropicfiltering_ValueChanged(object sender, EventArgs e) { diff --git a/Source/Core/Windows/PreferencesForm.resx b/Source/Core/Windows/PreferencesForm.resx index ec41c3ca..ca44b551 100644 --- a/Source/Core/Windows/PreferencesForm.resx +++ b/Source/Core/Windows/PreferencesForm.resx @@ -135,12 +135,6 @@ False - - False - - - False - False diff --git a/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs index 0a6b326d..01b09b36 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs @@ -1072,18 +1072,17 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(t.Sector == null) t.DetermineSector(); int scaler = (t.Sector != null ? t.Sector.Brightness / 4 : 2); - primaryradius = (int)Math.Round((t.Args[3] * scaler) * General.Settings.GZDynamicLightRadius); + primaryradius = t.Args[3] * scaler; } else { - primaryradius = (int)Math.Round((t.Args[3] * 2) * General.Settings.GZDynamicLightRadius); //works... that.. way in GZDoom - if(lightType > 0) - secondaryradius = (int)Math.Round((t.Args[4] * 2) * General.Settings.GZDynamicLightRadius); + primaryradius = t.Args[3] * 2; //works... that.. way in GZDoom + if(lightType > 0) secondaryradius = t.Args[4] * 2; } } else //it's one of vavoom lights { - primaryradius = (int)Math.Round((t.Args[0] * 8) * General.Settings.GZDynamicLightRadius); + primaryradius = t.Args[0] * 8; } // Check radii... diff --git a/Source/Plugins/BuilderModes/IO/WavefrontExporter.cs b/Source/Plugins/BuilderModes/IO/WavefrontExporter.cs index 15dcc0cd..6cf7b637 100644 --- a/Source/Plugins/BuilderModes/IO/WavefrontExporter.cs +++ b/Source/Plugins/BuilderModes/IO/WavefrontExporter.cs @@ -197,10 +197,10 @@ namespace CodeImp.DoomBuilder.BuilderModes.IO BaseVisualMode mode = new BaseVisualMode(); bool renderingEffectsDisabled = false; - if(!General.Settings.GZDoomRenderingEffects) + if(!General.Settings.EnhancedRenderingEffects) { renderingEffectsDisabled = true; - mode.ToggleGZDoomRenderingEffects(); + mode.ToggleEnhancedRendering(); } mode.RebuildElementData(); @@ -224,7 +224,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.IO List>> geometryByTexture = SortGeometry(visualSectors); //restore vm settings - if(renderingEffectsDisabled) mode.ToggleGZDoomRenderingEffects(); + if(renderingEffectsDisabled) mode.ToggleEnhancedRendering(); mode.Dispose(); //create obj diff --git a/Source/Plugins/BuilderModes/Resources/Actions.cfg b/Source/Plugins/BuilderModes/Resources/Actions.cfg index ab81ebfe..936ceb4d 100644 --- a/Source/Plugins/BuilderModes/Resources/Actions.cfg +++ b/Source/Plugins/BuilderModes/Resources/Actions.cfg @@ -1356,15 +1356,4 @@ ceilingalignmode allowkeys = true; allowmouse = true; allowscroll = true; -} - -togglegzdoomgeometryeffects -{ - title = "Toggle Geometry Effects"; - category = "visual"; - description = "Toggles rendering of (G)ZDoom's geometry effects (slopes, 3D-floors etc.) in Visual mode."; - allowkeys = true; - allowmouse = true; - allowscroll = false; - default = 9; //Tab } \ No newline at end of file diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs index 037c362b..63a00198 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs @@ -747,7 +747,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { HashSet effectsectors = null; //mxd - if(!General.Settings.GZDoomRenderingEffects) //mxd + if(!General.Settings.EnhancedRenderingEffects) //mxd { // Store all sectors with effects if(sectordata != null && sectordata.Count > 0) @@ -786,7 +786,7 @@ namespace CodeImp.DoomBuilder.BuilderModes vertices.Clear(); } - if(!General.Settings.GZDoomRenderingEffects) return; //mxd + if(!General.Settings.EnhancedRenderingEffects) return; //mxd // Find all sector who's tag is not 0 and hash them so that we can find them quickly foreach(Sector s in General.Map.Map.Sectors) @@ -3296,13 +3296,12 @@ namespace CodeImp.DoomBuilder.BuilderModes } //mxd - [BeginAction("togglegzdoomgeometryeffects")] - public void ToggleGZDoomRenderingEffects() + [BeginAction("gztoggleenhancedrendering", BaseAction = true)] + public void ToggleEnhancedRendering() { - General.Settings.GZDoomRenderingEffects = !General.Settings.GZDoomRenderingEffects; + // Actual toggling is done in MainForm.ToggleEnhancedRendering(), so we only need to update the view here RebuildElementData(); UpdateChangedObjects(); - General.Interface.DisplayStatus(StatusType.Info, "(G)ZDoom geometry effects are " + (General.Settings.GZDoomRenderingEffects ? "ENABLED" : "DISABLED")); } //mxd