General interface: dynamic lights rendering mode and model rendering mode are now selected via drop-downs.
Renamed "Toggle dynamic lights rendering" action to "Show dynamic lights". Changed: "Show dynamic lights" action now toggles between available dynamic light rendering modes. Renamed "Toggle models rendering" action to "Show models". Changed: "Show models" action now toggles between available model rendering modes. Removed "Toggle dynamic lights animation" and "Render selected/all models" actions. Fixed, Randomize Sectors form: selection highlight was not updated after applying the changes when the form was shown in Sectors mode. Consistency: selection is now cleared after applying changes done in Randomize Things and Randomize Vertices forms. Fixed, Classic modes: sprites of things with attached models were not rendered when model rendering was disabled. Updated documentation.
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
@ -22,10 +22,8 @@
|
||||||
<p>The Rendering toolbar allows you to toggle several GZDoom Builder's features:</p>
|
<p>The Rendering toolbar allows you to toggle several GZDoom Builder's features:</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li>Toggles models, dynamic lights and fog rendering in Visual mode.</li>
|
<li>Toggles models, dynamic lights and fog rendering in Visual mode.</li>
|
||||||
<li>Toggles dynamic lights rendering in Visual mode.</li>
|
<li>Toggles between available dynamic lights rendering modes in Visual mode.</li>
|
||||||
<li>Toggles dynamic lights animation in Visual mode.</li>
|
<li>Toggles between available model rendering modes.</li>
|
||||||
<li>Toggles models rendering.</li>
|
|
||||||
<li>Render all models / render only models for selected things.</li>
|
|
||||||
<li>Toggles fog rendering in Visual mode.</li>
|
<li>Toggles fog rendering in Visual mode.</li>
|
||||||
<li>Toggles <a href="../all_modes/event_lines.html">Event lines</a>.</li>
|
<li>Toggles <a href="../all_modes/event_lines.html">Event lines</a>.</li>
|
||||||
<li>Toggles <a href="../visual_mode/visual_verts.html">Visual vertices</a> in Visual mode (UDMF only).</li>
|
<li>Toggles <a href="../visual_mode/visual_verts.html">Visual vertices</a> in Visual mode (UDMF only).</li>
|
||||||
|
|
|
@ -679,6 +679,7 @@
|
||||||
<Compile Include="Actions\HintsManager.cs" />
|
<Compile Include="Actions\HintsManager.cs" />
|
||||||
<Compile Include="Config\AllTexturesSet.cs" />
|
<Compile Include="Config\AllTexturesSet.cs" />
|
||||||
<Compile Include="Config\FlagTranslation.cs" />
|
<Compile Include="Config\FlagTranslation.cs" />
|
||||||
|
<Compile Include="Config\ModelAndLightRenderModes.cs" />
|
||||||
<Compile Include="Config\PasteOptions.cs" />
|
<Compile Include="Config\PasteOptions.cs" />
|
||||||
<Compile Include="Config\ThingsFlagsCompare.cs" />
|
<Compile Include="Config\ThingsFlagsCompare.cs" />
|
||||||
<Compile Include="Controls\ButtonsNumericTextboxDesigner.cs" />
|
<Compile Include="Controls\ButtonsNumericTextboxDesigner.cs" />
|
||||||
|
@ -1006,6 +1007,7 @@
|
||||||
<None Include="Resources\FolderExplore.png" />
|
<None Include="Resources\FolderExplore.png" />
|
||||||
<Content Include="Resources\Light.png" />
|
<Content Include="Resources\Light.png" />
|
||||||
<None Include="Resources\Lightbulb.png" />
|
<None Include="Resources\Lightbulb.png" />
|
||||||
|
<None Include="Resources\LightDisabled.png" />
|
||||||
<Content Include="Resources\Light_animate.png" />
|
<Content Include="Resources\Light_animate.png" />
|
||||||
<None Include="Resources\MLogo.png" />
|
<None Include="Resources\MLogo.png" />
|
||||||
<None Include="Resources\Marine.png" />
|
<None Include="Resources\Marine.png" />
|
||||||
|
@ -1013,6 +1015,7 @@
|
||||||
<EmbeddedResource Include="Resources\MissingThing.png" />
|
<EmbeddedResource Include="Resources\MissingThing.png" />
|
||||||
<None Include="Resources\MCrash.png" />
|
<None Include="Resources\MCrash.png" />
|
||||||
<Content Include="Resources\Model.png" />
|
<Content Include="Resources\Model.png" />
|
||||||
|
<None Include="Resources\ModelDisabled.png" />
|
||||||
<Content Include="Resources\Model_selected.png" />
|
<Content Include="Resources\Model_selected.png" />
|
||||||
<None Include="Resources\PuzzlePiece.png" />
|
<None Include="Resources\PuzzlePiece.png" />
|
||||||
<None Include="Resources\Search.png" />
|
<None Include="Resources\Search.png" />
|
||||||
|
|
16
Source/Core/Config/ModelAndLightRenderModes.cs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
namespace CodeImp.DoomBuilder.Config
|
||||||
|
{
|
||||||
|
public enum ModelRenderMode
|
||||||
|
{
|
||||||
|
NONE,
|
||||||
|
SELECTION,
|
||||||
|
ALL,
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum LightRenderMode
|
||||||
|
{
|
||||||
|
NONE,
|
||||||
|
ALL,
|
||||||
|
ALL_ANIMATED,
|
||||||
|
}
|
||||||
|
}
|
|
@ -94,10 +94,8 @@ namespace CodeImp.DoomBuilder.Config
|
||||||
private SplitLineBehavior splitlinebehavior; //mxd
|
private SplitLineBehavior splitlinebehavior; //mxd
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
private bool gzDrawModels;
|
private ModelRenderMode gzDrawModelsMode;
|
||||||
private bool gzDrawSelectedModelsOnly;
|
private LightRenderMode gzDrawLightsMode;
|
||||||
private bool gzDrawLights;
|
|
||||||
private bool gzAnimateLights;
|
|
||||||
private bool gzDrawFog;
|
private bool gzDrawFog;
|
||||||
private bool gzToolbarGZDoom;
|
private bool gzToolbarGZDoom;
|
||||||
private bool gzSynchCameras;
|
private bool gzSynchCameras;
|
||||||
|
@ -180,10 +178,8 @@ namespace CodeImp.DoomBuilder.Config
|
||||||
public SplitLineBehavior SplitLineBehavior { get { return splitlinebehavior; } set { splitlinebehavior = value; } } //mxd
|
public SplitLineBehavior SplitLineBehavior { get { return splitlinebehavior; } set { splitlinebehavior = value; } } //mxd
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
public bool GZDrawModels { get { return gzDrawModels; } internal set { gzDrawModels = value; } }
|
public ModelRenderMode GZDrawModelsMode { get { return gzDrawModelsMode; } internal set { gzDrawModelsMode = value; } }
|
||||||
public bool GZDrawSelectedModelsOnly { get { return gzDrawSelectedModelsOnly; } internal set { gzDrawSelectedModelsOnly = value; } }
|
public LightRenderMode GZDrawLightsMode { get { return gzDrawLightsMode; } internal set { gzDrawLightsMode = value; } }
|
||||||
public bool GZDrawLights { get { return gzDrawLights; } internal set { gzDrawLights = value; } }
|
|
||||||
public bool GZAnimateLights { get { return gzAnimateLights; } internal set { gzAnimateLights = value; } }
|
|
||||||
public bool GZDrawFog { get { return gzDrawFog; } internal set { gzDrawFog = value; } }
|
public bool GZDrawFog { get { return gzDrawFog; } internal set { gzDrawFog = value; } }
|
||||||
public bool GZToolbarGZDoom { get { return gzToolbarGZDoom; } internal set { gzToolbarGZDoom = value; } }
|
public bool GZToolbarGZDoom { get { return gzToolbarGZDoom; } internal set { gzToolbarGZDoom = value; } }
|
||||||
public bool GZSynchCameras { get { return gzSynchCameras; } internal set { gzSynchCameras = value; } }
|
public bool GZSynchCameras { get { return gzSynchCameras; } internal set { gzSynchCameras = value; } }
|
||||||
|
@ -289,10 +285,8 @@ namespace CodeImp.DoomBuilder.Config
|
||||||
splitlinebehavior = (SplitLineBehavior) General.Clamp(cfg.ReadSetting("splitlinebehavior", 0), 0, 3); //mxd
|
splitlinebehavior = (SplitLineBehavior) General.Clamp(cfg.ReadSetting("splitlinebehavior", 0), 0, 3); //mxd
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
gzDrawModels = cfg.ReadSetting("gzdrawmodels", true);
|
gzDrawModelsMode = (ModelRenderMode)cfg.ReadSetting("gzdrawmodels", (int)ModelRenderMode.ALL);
|
||||||
gzDrawSelectedModelsOnly = cfg.ReadSetting("gzdrawselectedmodelsonly", false);
|
gzDrawLightsMode = (LightRenderMode)cfg.ReadSetting("gzdrawlights", (int)LightRenderMode.ALL);
|
||||||
gzDrawLights = cfg.ReadSetting("gzdrawlights", true);
|
|
||||||
gzAnimateLights = cfg.ReadSetting("gzanimatelights", false);
|
|
||||||
gzDrawFog = cfg.ReadSetting("gzdrawfog", false);
|
gzDrawFog = cfg.ReadSetting("gzdrawfog", false);
|
||||||
gzToolbarGZDoom = cfg.ReadSetting("gztoolbargzdoom", true);
|
gzToolbarGZDoom = cfg.ReadSetting("gztoolbargzdoom", true);
|
||||||
gzSynchCameras = cfg.ReadSetting("gzsynchcameras", true);
|
gzSynchCameras = cfg.ReadSetting("gzsynchcameras", true);
|
||||||
|
@ -380,10 +374,8 @@ namespace CodeImp.DoomBuilder.Config
|
||||||
cfg.WriteSetting("splitlinebehavior", (int)splitlinebehavior); //mxd
|
cfg.WriteSetting("splitlinebehavior", (int)splitlinebehavior); //mxd
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
cfg.WriteSetting("gzdrawmodels", gzDrawModels);
|
cfg.WriteSetting("gzdrawmodels", (int)gzDrawModelsMode);
|
||||||
cfg.WriteSetting("gzdrawselectedmodelsonly", gzDrawSelectedModelsOnly);
|
cfg.WriteSetting("gzdrawlights", (int)gzDrawLightsMode);
|
||||||
cfg.WriteSetting("gzdrawlights", gzDrawLights);
|
|
||||||
cfg.WriteSetting("gzanimatelights", gzAnimateLights);
|
|
||||||
cfg.WriteSetting("gzdrawfog", gzDrawFog);
|
cfg.WriteSetting("gzdrawfog", gzDrawFog);
|
||||||
cfg.WriteSetting("gzsynchcameras", gzSynchCameras);
|
cfg.WriteSetting("gzsynchcameras", gzSynchCameras);
|
||||||
cfg.WriteSetting("gzshoweventlines", gzShowEventLines);
|
cfg.WriteSetting("gzshoweventlines", gzShowEventLines);
|
||||||
|
|
|
@ -1,83 +1,118 @@
|
||||||
using CodeImp.DoomBuilder.Actions;
|
#region ================== Namespaces
|
||||||
|
|
||||||
|
using CodeImp.DoomBuilder.Actions;
|
||||||
|
using CodeImp.DoomBuilder.Config;
|
||||||
using CodeImp.DoomBuilder.Windows;
|
using CodeImp.DoomBuilder.Windows;
|
||||||
using CodeImp.DoomBuilder.GZBuilder.Data;
|
using CodeImp.DoomBuilder.GZBuilder.Data;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
namespace CodeImp.DoomBuilder.GZBuilder
|
namespace CodeImp.DoomBuilder.GZBuilder
|
||||||
{
|
{
|
||||||
//mxd. should get rid of this class one day...
|
//mxd. should get rid of this class one day...
|
||||||
public static class GZGeneral
|
public static class GZGeneral
|
||||||
{
|
{
|
||||||
|
#region ================== Properties
|
||||||
|
|
||||||
//gzdoom light types
|
//gzdoom light types
|
||||||
private static int[] gzLights = { /* normal lights */ 9800, 9801, 9802, 9803, 9804, /* additive lights */ 9810, 9811, 9812, 9813, 9814, /* negative lights */ 9820, 9821, 9822, 9823, 9824, /* vavoom lights */ 1502, 1503};
|
private static readonly int[] gzLights = { /* normal lights */ 9800, 9801, 9802, 9803, 9804, /* additive lights */ 9810, 9811, 9812, 9813, 9814, /* negative lights */ 9820, 9821, 9822, 9823, 9824, /* vavoom lights */ 1502, 1503};
|
||||||
public static int[] GZ_LIGHTS { get { return gzLights; } }
|
public static int[] GZ_LIGHTS { get { return gzLights; } }
|
||||||
private static int[] gzLightTypes = { 5, 10, 15 }; //these are actually offsets in gz_lights
|
private static readonly int[] gzLightTypes = { 5, 10, 15 }; //these are actually offsets in gz_lights
|
||||||
public static int[] GZ_LIGHT_TYPES { get { return gzLightTypes; } }
|
public static int[] GZ_LIGHT_TYPES { get { return gzLightTypes; } }
|
||||||
private static DynamicLightType[] gzAnimatedLightTypes = { DynamicLightType.FLICKER, DynamicLightType.RANDOM, DynamicLightType.PULSE };
|
private static readonly DynamicLightType[] gzAnimatedLightTypes = { DynamicLightType.FLICKER, DynamicLightType.RANDOM, DynamicLightType.PULSE };
|
||||||
public static DynamicLightType[] GZ_ANIMATED_LIGHT_TYPES { get { return gzAnimatedLightTypes; } }
|
public static DynamicLightType[] GZ_ANIMATED_LIGHT_TYPES { get { return gzAnimatedLightTypes; } }
|
||||||
|
|
||||||
//asc script action specials
|
//asc script action specials
|
||||||
private static int[] acsSpecials = { 80, 81, 82, 83, 84, 85, 226 };
|
private static readonly int[] acsSpecials = { 80, 81, 82, 83, 84, 85, 226 };
|
||||||
public static int[] ACS_SPECIALS { get { return acsSpecials; } }
|
public static int[] ACS_SPECIALS { get { return acsSpecials; } }
|
||||||
|
|
||||||
public static void Init() {
|
#endregion
|
||||||
|
|
||||||
|
#region ================== Methods
|
||||||
|
|
||||||
|
public static void Init()
|
||||||
|
{
|
||||||
//bind actions
|
//bind actions
|
||||||
General.Actions.BindMethods(typeof(GZGeneral));
|
General.Actions.BindMethods(typeof(GZGeneral));
|
||||||
General.MainWindow.UpdateGZDoomPanel();
|
General.MainWindow.UpdateGZDoomPanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
//actions
|
#endregion
|
||||||
|
|
||||||
|
#region ================== Actions
|
||||||
|
|
||||||
[BeginAction("gztogglemodels")]
|
[BeginAction("gztogglemodels")]
|
||||||
private static void toggleModels() {
|
private static void ToggleModelsRenderingMode()
|
||||||
General.Settings.GZDrawModels = !General.Settings.GZDrawModels;
|
{
|
||||||
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering is " + (General.Settings.GZDrawModels ? "ENABLED" : "DISABLED"));
|
switch(General.Settings.GZDrawModelsMode)
|
||||||
|
{
|
||||||
|
case ModelRenderMode.NONE:
|
||||||
|
General.Settings.GZDrawModelsMode = ModelRenderMode.SELECTION;
|
||||||
|
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: SELECTION ONLY");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ModelRenderMode.SELECTION:
|
||||||
|
General.Settings.GZDrawModelsMode = ModelRenderMode.ALL;
|
||||||
|
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: ALL");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ModelRenderMode.ALL:
|
||||||
|
General.Settings.GZDrawModelsMode = ModelRenderMode.NONE;
|
||||||
|
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: NONE");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
General.MainWindow.RedrawDisplay();
|
General.MainWindow.RedrawDisplay();
|
||||||
General.MainWindow.UpdateGZDoomPanel();
|
General.MainWindow.UpdateGZDoomPanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
[BeginAction("gztogglelights")]
|
[BeginAction("gztogglelights")]
|
||||||
private static void toggleLights() {
|
private static void ToggleLightsRenderingMode()
|
||||||
General.Settings.GZDrawLights = !General.Settings.GZDrawLights;
|
{
|
||||||
General.MainWindow.DisplayStatus(StatusType.Action, "Dynamic lights rendering is " + (General.Settings.GZDrawLights ? "ENABLED" : "DISABLED"));
|
switch(General.Settings.GZDrawLightsMode)
|
||||||
General.MainWindow.RedrawDisplay();
|
{
|
||||||
General.MainWindow.UpdateGZDoomPanel();
|
case LightRenderMode.NONE:
|
||||||
}
|
General.Settings.GZDrawLightsMode = LightRenderMode.ALL;
|
||||||
|
General.MainWindow.DisplayStatus(StatusType.Action, "Dynamic lights rendering mode: ALL");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LightRenderMode.ALL:
|
||||||
|
General.Settings.GZDrawLightsMode = LightRenderMode.ALL_ANIMATED;
|
||||||
|
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: ANIMATED");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LightRenderMode.ALL_ANIMATED:
|
||||||
|
General.Settings.GZDrawLightsMode = LightRenderMode.NONE;
|
||||||
|
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: NONE");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
[BeginAction("gztogglelightsanimation")]
|
|
||||||
private static void toggleLightsAnimation() {
|
|
||||||
General.Settings.GZAnimateLights = !General.Settings.GZAnimateLights;
|
|
||||||
General.MainWindow.DisplayStatus(StatusType.Action, "Dynamic lights animation is " + (General.Settings.GZAnimateLights ? "ENABLED" : "DISABLED"));
|
|
||||||
General.MainWindow.RedrawDisplay();
|
General.MainWindow.RedrawDisplay();
|
||||||
General.MainWindow.UpdateGZDoomPanel();
|
General.MainWindow.UpdateGZDoomPanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
[BeginAction("gztogglefog")]
|
[BeginAction("gztogglefog")]
|
||||||
private static void toggleFog() {
|
private static void ToggleFog()
|
||||||
|
{
|
||||||
General.Settings.GZDrawFog = !General.Settings.GZDrawFog;
|
General.Settings.GZDrawFog = !General.Settings.GZDrawFog;
|
||||||
General.MainWindow.DisplayStatus(StatusType.Action, "Fog rendering is " + (General.Settings.GZDrawFog ? "ENABLED" : "DISABLED"));
|
General.MainWindow.DisplayStatus(StatusType.Action, "Fog rendering is " + (General.Settings.GZDrawFog ? "ENABLED" : "DISABLED"));
|
||||||
General.MainWindow.RedrawDisplay();
|
General.MainWindow.RedrawDisplay();
|
||||||
General.MainWindow.UpdateGZDoomPanel();
|
General.MainWindow.UpdateGZDoomPanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
[BeginAction("gzdrawselectedmodelsonly")]
|
|
||||||
private static void toggleDrawSelectedModelsOnly() {
|
|
||||||
General.Settings.GZDrawSelectedModelsOnly = !General.Settings.GZDrawSelectedModelsOnly;
|
|
||||||
General.MainWindow.DisplayStatus(StatusType.Action, "Rendering " + (General.Settings.GZDrawSelectedModelsOnly ? "only selected" : "all") + " models.");
|
|
||||||
General.MainWindow.RedrawDisplay();
|
|
||||||
General.MainWindow.UpdateGZDoomPanel();
|
|
||||||
}
|
|
||||||
|
|
||||||
[BeginAction("gztogglefx")]
|
[BeginAction("gztogglefx")]
|
||||||
private static void toggleFx() {
|
private static void ToggleFx()
|
||||||
|
{
|
||||||
int on = 0;
|
int on = 0;
|
||||||
on += General.Settings.GZDrawFog ? 1 : -1;
|
on += General.Settings.GZDrawFog ? 1 : -1;
|
||||||
on += General.Settings.GZDrawLights ? 1 : -1;
|
on += General.Settings.GZDrawLightsMode != LightRenderMode.NONE ? 1 : -1;
|
||||||
on += General.Settings.GZDrawModels ? 1 : -1;
|
on += General.Settings.GZDrawModelsMode != ModelRenderMode.NONE ? 1 : -1;
|
||||||
|
|
||||||
bool enable = (on < 0);
|
bool enable = (on < 0);
|
||||||
|
|
||||||
General.Settings.GZDrawFog = enable;
|
General.Settings.GZDrawFog = enable;
|
||||||
General.Settings.GZDrawLights = enable;
|
General.Settings.GZDrawLightsMode = (enable ? LightRenderMode.ALL : LightRenderMode.NONE);
|
||||||
General.Settings.GZDrawModels = enable;
|
General.Settings.GZDrawModelsMode = (enable ? ModelRenderMode.ALL : ModelRenderMode.NONE);
|
||||||
General.MainWindow.DisplayStatus(StatusType.Action, "Advanced effects are " + (enable ? "ENABLED" : "DISABLED") );
|
General.MainWindow.DisplayStatus(StatusType.Action, "Advanced effects are " + (enable ? "ENABLED" : "DISABLED") );
|
||||||
|
|
||||||
General.MainWindow.RedrawDisplay();
|
General.MainWindow.RedrawDisplay();
|
||||||
|
@ -85,7 +120,8 @@ namespace CodeImp.DoomBuilder.GZBuilder
|
||||||
}
|
}
|
||||||
|
|
||||||
[BeginAction("gztoggleeventlines")]
|
[BeginAction("gztoggleeventlines")]
|
||||||
private static void toggleEventLines() {
|
private static void ToggleEventLines()
|
||||||
|
{
|
||||||
General.Settings.GZShowEventLines = !General.Settings.GZShowEventLines;
|
General.Settings.GZShowEventLines = !General.Settings.GZShowEventLines;
|
||||||
General.MainWindow.DisplayStatus(StatusType.Action, "Event lines are " + (General.Settings.GZShowEventLines ? "ENABLED" : "DISABLED"));
|
General.MainWindow.DisplayStatus(StatusType.Action, "Event lines are " + (General.Settings.GZShowEventLines ? "ENABLED" : "DISABLED"));
|
||||||
General.MainWindow.RedrawDisplay();
|
General.MainWindow.RedrawDisplay();
|
||||||
|
@ -93,7 +129,8 @@ namespace CodeImp.DoomBuilder.GZBuilder
|
||||||
}
|
}
|
||||||
|
|
||||||
[BeginAction("gztogglevisualvertices")]
|
[BeginAction("gztogglevisualvertices")]
|
||||||
private static void toggleVisualVertices() {
|
private static void ToggleVisualVertices()
|
||||||
|
{
|
||||||
General.Settings.GZShowVisualVertices = !General.Settings.GZShowVisualVertices;
|
General.Settings.GZShowVisualVertices = !General.Settings.GZShowVisualVertices;
|
||||||
General.MainWindow.DisplayStatus(StatusType.Action, "Visual vertices are " + (General.Settings.GZShowVisualVertices ? "ENABLED" : "DISABLED"));
|
General.MainWindow.DisplayStatus(StatusType.Action, "Visual vertices are " + (General.Settings.GZShowVisualVertices ? "ENABLED" : "DISABLED"));
|
||||||
General.MainWindow.RedrawDisplay();
|
General.MainWindow.RedrawDisplay();
|
||||||
|
@ -102,18 +139,23 @@ namespace CodeImp.DoomBuilder.GZBuilder
|
||||||
|
|
||||||
//main menu actions
|
//main menu actions
|
||||||
[BeginAction("gzreloadmodeldef")]
|
[BeginAction("gzreloadmodeldef")]
|
||||||
private static void reloadModeldef() {
|
private static void ReloadModeldef()
|
||||||
|
{
|
||||||
if(General.Map != null) General.Map.Data.ReloadModeldef();
|
if(General.Map != null) General.Map.Data.ReloadModeldef();
|
||||||
}
|
}
|
||||||
|
|
||||||
[BeginAction("gzreloadgldefs")]
|
[BeginAction("gzreloadgldefs")]
|
||||||
private static void reloadGldefs() {
|
private static void ReloadGldefs()
|
||||||
|
{
|
||||||
if (General.Map != null) General.Map.Data.ReloadGldefs();
|
if (General.Map != null) General.Map.Data.ReloadGldefs();
|
||||||
}
|
}
|
||||||
|
|
||||||
[BeginAction("gzreloadmapinfo")]
|
[BeginAction("gzreloadmapinfo")]
|
||||||
private static void reloadMapInfo() {
|
private static void ReloadMapInfo()
|
||||||
|
{
|
||||||
if (General.Map != null) General.Map.Data.ReloadMapInfo();
|
if (General.Map != null) General.Map.Data.ReloadMapInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
14
Source/Core/Properties/Resources.Designer.cs
generated
|
@ -305,6 +305,13 @@ namespace CodeImp.DoomBuilder.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap LightDisabled {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("LightDisabled", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal static System.Drawing.Bitmap Link {
|
internal static System.Drawing.Bitmap Link {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("Link", resourceCulture);
|
object obj = ResourceManager.GetObject("Link", resourceCulture);
|
||||||
|
@ -389,6 +396,13 @@ namespace CodeImp.DoomBuilder.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap ModelDisabled {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("ModelDisabled", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal static System.Drawing.Bitmap Monster2 {
|
internal static System.Drawing.Bitmap Monster2 {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("Monster2", resourceCulture);
|
object obj = ResourceManager.GetObject("Monster2", resourceCulture);
|
||||||
|
|
|
@ -118,6 +118,9 @@
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="Zoom" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\Zoom.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="Cut" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Cut" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Cut.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Cut.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -184,6 +187,9 @@
|
||||||
<data name="ScriptHelp" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="ScriptHelp" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\ScriptHelp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\ScriptHelp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Light_animate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\Light_animate.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="KnownTextureSet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="KnownTextureSet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\KnownTextureSet.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\KnownTextureSet.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -223,9 +229,15 @@
|
||||||
<data name="Paste" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Paste" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Paste.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Paste.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LightDisabled" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\LightDisabled.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="ScriptConstant" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="ScriptConstant" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\ScriptConstant.xpm;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>..\Resources\ScriptConstant.xpm;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="FolderExplore" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\FolderExplore.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="Warning" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Warning" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Warning.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Warning.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -295,17 +307,14 @@
|
||||||
<data name="MCrash" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="MCrash" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\MCrash.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\MCrash.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="PuzzlePiece" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\PuzzlePiece.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="ScriptCompile" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="ScriptCompile" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\ScriptCompile.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\ScriptCompile.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Zoom_arrowup" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Zoom_arrowup" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Zoom_arrowup.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Zoom_arrowup.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Zoom" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="PuzzlePiece" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Zoom.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\PuzzlePiece.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Model_selected" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Model_selected" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Model_selected.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Model_selected.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
@ -331,9 +340,6 @@
|
||||||
<data name="Redo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Redo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Redo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Redo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Status2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\Status2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="Prefab" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Prefab" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Prefab.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Prefab.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -352,8 +358,8 @@
|
||||||
<data name="Status12" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Status12" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Status12.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Status12.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Light_animate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Status2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Light_animate.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Status2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Link" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Link" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Link.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Link.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
@ -430,7 +436,7 @@
|
||||||
<data name="Check" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Check" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Check.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Check.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="FolderExplore" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="ModelDisabled" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\FolderExplore.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\ModelDisabled.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -1207,7 +1207,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach(Thing t in group.Value) {
|
foreach(Thing t in group.Value) {
|
||||||
if(t.IsModel) continue;
|
if(t.IsModel && (General.Settings.GZDrawModelsMode == ModelRenderMode.ALL || (General.Settings.GZDrawModelsMode == ModelRenderMode.SELECTION && t.Selected))) continue;
|
||||||
CreateThingSpriteVerts(thingsByPosition[t], spriteWidth, spriteHeight, ref verts, buffercount * 6, t.Selected ? selectionColor : 0xFFFFFF);
|
CreateThingSpriteVerts(thingsByPosition[t], spriteWidth, spriteHeight, ref verts, buffercount * 6, t.Selected ? selectionColor : 0xFFFFFF);
|
||||||
buffercount++;
|
buffercount++;
|
||||||
totalcount++;
|
totalcount++;
|
||||||
|
@ -1295,7 +1295,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
graphics.Shaders.Things2D.EndPass();
|
graphics.Shaders.Things2D.EndPass();
|
||||||
|
|
||||||
//mxd. Render models
|
//mxd. Render models
|
||||||
if (General.Settings.GZDrawModels) {
|
if (General.Settings.GZDrawModelsMode != ModelRenderMode.NONE)
|
||||||
|
{
|
||||||
// Set renderstates for rendering
|
// Set renderstates for rendering
|
||||||
graphics.Device.SetRenderState(RenderState.AlphaBlendEnable, false);
|
graphics.Device.SetRenderState(RenderState.AlphaBlendEnable, false);
|
||||||
graphics.Device.SetRenderState(RenderState.TextureFactor, -1);
|
graphics.Device.SetRenderState(RenderState.TextureFactor, -1);
|
||||||
|
@ -1308,14 +1309,16 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
Matrix viewscale = Matrix.Scaling(scale, -scale, 0.0f);
|
Matrix viewscale = Matrix.Scaling(scale, -scale, 0.0f);
|
||||||
ModelData mde;
|
ModelData mde;
|
||||||
|
|
||||||
foreach(KeyValuePair<int, List<Thing>> group in modelsByType) {
|
foreach(KeyValuePair<int, List<Thing>> group in modelsByType)
|
||||||
|
{
|
||||||
mde = General.Map.Data.ModeldefEntries[group.Key];
|
mde = General.Map.Data.ModeldefEntries[group.Key];
|
||||||
float maxX = Math.Max(Math.Abs(mde.Model.BoundingBox[4].X), Math.Abs(mde.Model.BoundingBox[1].X));
|
float maxX = Math.Max(Math.Abs(mde.Model.BoundingBox[4].X), Math.Abs(mde.Model.BoundingBox[1].X));
|
||||||
float maxY = Math.Max(Math.Abs(mde.Model.BoundingBox[4].Y), Math.Abs(mde.Model.BoundingBox[1].Y));
|
float maxY = Math.Max(Math.Abs(mde.Model.BoundingBox[4].Y), Math.Abs(mde.Model.BoundingBox[1].Y));
|
||||||
float maxSize = Math.Max(maxX, maxY);
|
float maxSize = Math.Max(maxX, maxY);
|
||||||
|
|
||||||
foreach(Thing t in group.Value) {
|
foreach(Thing t in group.Value)
|
||||||
if(General.Settings.GZDrawSelectedModelsOnly && !t.Selected) continue;
|
{
|
||||||
|
if(General.Settings.GZDrawModelsMode == ModelRenderMode.SELECTION && !t.Selected) continue;
|
||||||
Vector2D screenpos = ((Vector2D)t.Position).GetTransformed(translatex, translatey, scale, -scale);
|
Vector2D screenpos = ((Vector2D)t.Position).GetTransformed(translatex, translatey, scale, -scale);
|
||||||
float modelScale = scale * t.ActorScale.Width * t.ScaleX;
|
float modelScale = scale * t.ActorScale.Width * t.ScaleX;
|
||||||
|
|
||||||
|
@ -1326,7 +1329,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
|
|
||||||
graphics.Shaders.Things2D.FillColor = t.Selected ? cHighlight : cWire;
|
graphics.Shaders.Things2D.FillColor = t.Selected ? cHighlight : cWire;
|
||||||
|
|
||||||
for(int i = 0; i < mde.Model.Meshes.Count; i++) {
|
for(int i = 0; i < mde.Model.Meshes.Count; i++)
|
||||||
|
{
|
||||||
float sx = t.ScaleX * t.ActorScale.Width;
|
float sx = t.ScaleX * t.ActorScale.Width;
|
||||||
float sy = t.ScaleY * t.ActorScale.Height;
|
float sy = t.ScaleY * t.ActorScale.Height;
|
||||||
Matrix modelcale = Matrix.Scaling(sx, sx, sy);
|
Matrix modelcale = Matrix.Scaling(sx, sx, sy);
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using CodeImp.DoomBuilder.Config;
|
||||||
using SlimDX;
|
using SlimDX;
|
||||||
using CodeImp.DoomBuilder.Geometry;
|
using CodeImp.DoomBuilder.Geometry;
|
||||||
using SlimDX.Direct3D9;
|
using SlimDX.Direct3D9;
|
||||||
|
@ -413,7 +414,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
}
|
}
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
if (General.Settings.GZDrawLights) {
|
if (General.Settings.GZDrawLightsMode != LightRenderMode.NONE)
|
||||||
|
{
|
||||||
thingsWithLight = new List<VisualThing>();
|
thingsWithLight = new List<VisualThing>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -422,7 +424,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
public void FinishGeometry()
|
public void FinishGeometry()
|
||||||
{
|
{
|
||||||
//mxd. sort lights
|
//mxd. sort lights
|
||||||
if (General.Settings.GZDrawLights && !fullbrightness && thingsWithLight.Count > 0)
|
if(General.Settings.GZDrawLightsMode != LightRenderMode.NONE && !fullbrightness && thingsWithLight.Count > 0)
|
||||||
updateLights();
|
updateLights();
|
||||||
|
|
||||||
// Initial renderstates
|
// Initial renderstates
|
||||||
|
@ -495,7 +497,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
RenderSinglePass((int)RenderPass.Additive);
|
RenderSinglePass((int)RenderPass.Additive);
|
||||||
|
|
||||||
//mxd. LIGHT PASS
|
//mxd. LIGHT PASS
|
||||||
if( !(!General.Settings.GZDrawLights || fullbrightness || thingsWithLight.Count == 0 || litGeometry.Count == 0) ) {
|
if( !(General.Settings.GZDrawLightsMode == LightRenderMode.NONE || fullbrightness || thingsWithLight.Count == 0 || litGeometry.Count == 0) )
|
||||||
|
{
|
||||||
RenderLights(litGeometry, thingsWithLight);
|
RenderLights(litGeometry, thingsWithLight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -777,7 +780,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
wantedshaderpass += 8;
|
wantedshaderpass += 8;
|
||||||
|
|
||||||
//mxd. Seems that lines rendered with RenderPass.Alpha or RenderPass.Additive aren't affected by dynamic lights in GZDoom
|
//mxd. Seems that lines rendered with RenderPass.Alpha or RenderPass.Additive aren't affected by dynamic lights in GZDoom
|
||||||
if ( !(g.RenderPass == RenderPass.Alpha || g.RenderPass == RenderPass.Additive || !General.Settings.GZDrawLights || fullbrightness || thingsWithLight.Count == 0) ) {
|
if ( !(g.RenderPass == RenderPass.Alpha || g.RenderPass == RenderPass.Additive || General.Settings.GZDrawLightsMode == LightRenderMode.NONE || fullbrightness || thingsWithLight.Count == 0) ) {
|
||||||
if (curtexture.Texture != null) {
|
if (curtexture.Texture != null) {
|
||||||
if (!litGeometry.ContainsKey(curtexture.Texture))
|
if (!litGeometry.ContainsKey(curtexture.Texture))
|
||||||
litGeometry[curtexture.Texture] = new List<VisualGeometry>();
|
litGeometry[curtexture.Texture] = new List<VisualGeometry>();
|
||||||
|
@ -853,14 +856,15 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
foreach(VisualThing t in group.Value)
|
foreach(VisualThing t in group.Value)
|
||||||
{
|
{
|
||||||
//mxd
|
//mxd
|
||||||
if (t.Thing.IsModel && General.Settings.GZDrawModels && (!General.Settings.GZDrawSelectedModelsOnly || t.Selected))
|
if(t.Thing.IsModel && General.Settings.GZDrawModelsMode != ModelRenderMode.NONE && (General.Settings.GZDrawModelsMode == ModelRenderMode.ALL || t.Selected))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Update buffer if needed
|
// Update buffer if needed
|
||||||
t.Update();
|
t.Update();
|
||||||
|
|
||||||
// Only do this sector when a vertexbuffer is created
|
// Only do this sector when a vertexbuffer is created
|
||||||
if (t.GeometryBuffer != null) {
|
if (t.GeometryBuffer != null)
|
||||||
|
{
|
||||||
// Determine the shader pass we want to use for this object
|
// Determine the shader pass we want to use for this object
|
||||||
int wantedshaderpass = (((t == highlighted) && showhighlight) || (t.Selected && showselection)) ? highshaderpass : shaderpass;
|
int wantedshaderpass = (((t == highlighted) && showhighlight) || (t.Selected && showselection)) ? highshaderpass : shaderpass;
|
||||||
|
|
||||||
|
@ -869,30 +873,38 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
wantedshaderpass += 8;
|
wantedshaderpass += 8;
|
||||||
|
|
||||||
//mxd. if current thing is light - set it's color to light color
|
//mxd. if current thing is light - set it's color to light color
|
||||||
if (Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Thing.Type) != -1 && !fullbrightness) {
|
if (Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Thing.Type) != -1 && !fullbrightness)
|
||||||
|
{
|
||||||
wantedshaderpass += 4; //render using one of passes, which uses World3D.VertexColor
|
wantedshaderpass += 4; //render using one of passes, which uses World3D.VertexColor
|
||||||
graphics.Shaders.World3D.VertexColor = t.LightColor;
|
graphics.Shaders.World3D.VertexColor = t.LightColor;
|
||||||
//mxd. check if Thing is affected by dynamic lights and set color accordingly
|
//mxd. check if Thing is affected by dynamic lights and set color accordingly
|
||||||
} else if (General.Settings.GZDrawLights && !fullbrightness && thingsWithLight.Count > 0) {
|
}
|
||||||
|
else if (General.Settings.GZDrawLightsMode != LightRenderMode.NONE && !fullbrightness && thingsWithLight.Count > 0)
|
||||||
|
{
|
||||||
Color4 litColor = getLitColorForThing(t);
|
Color4 litColor = getLitColorForThing(t);
|
||||||
if (litColor.ToArgb() != 0) {
|
if (litColor.ToArgb() != 0)
|
||||||
|
{
|
||||||
wantedshaderpass += 4; //render using one of passes, which uses World3D.VertexColor
|
wantedshaderpass += 4; //render using one of passes, which uses World3D.VertexColor
|
||||||
graphics.Shaders.World3D.VertexColor = new Color4(t.VertexColor) + litColor;
|
graphics.Shaders.World3D.VertexColor = new Color4(t.VertexColor) + litColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Switch shader pass?
|
// Switch shader pass?
|
||||||
if (currentshaderpass != wantedshaderpass) {
|
if (currentshaderpass != wantedshaderpass)
|
||||||
|
{
|
||||||
graphics.Shaders.World3D.EndPass();
|
graphics.Shaders.World3D.EndPass();
|
||||||
graphics.Shaders.World3D.BeginPass(wantedshaderpass);
|
graphics.Shaders.World3D.BeginPass(wantedshaderpass);
|
||||||
currentshaderpass = wantedshaderpass;
|
currentshaderpass = wantedshaderpass;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the colors to use
|
// Set the colors to use
|
||||||
if (!graphics.Shaders.Enabled) {
|
if (!graphics.Shaders.Enabled)
|
||||||
|
{
|
||||||
graphics.Device.SetTexture(2, (t.Selected && showselection) ? selectionimage.Texture : null);
|
graphics.Device.SetTexture(2, (t.Selected && showselection) ? selectionimage.Texture : null);
|
||||||
graphics.Device.SetTexture(3, ((t == highlighted) && showhighlight) ? highlightimage.Texture : null);
|
graphics.Device.SetTexture(3, ((t == highlighted) && showhighlight) ? highlightimage.Texture : null);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
graphics.Shaders.World3D.SetHighlightColor(CalculateHighlightColor((t == highlighted) && showhighlight, (t.Selected && showselection)).ToArgb());
|
graphics.Shaders.World3D.SetHighlightColor(CalculateHighlightColor((t == highlighted) && showhighlight, (t.Selected && showselection)).ToArgb());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -904,7 +916,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
ApplyMatrices3D();
|
ApplyMatrices3D();
|
||||||
|
|
||||||
//mxd. set variables for fog rendering
|
//mxd. set variables for fog rendering
|
||||||
if (wantedshaderpass > 7) {
|
if (wantedshaderpass > 7)
|
||||||
|
{
|
||||||
graphics.Shaders.World3D.World = world;
|
graphics.Shaders.World3D.World = world;
|
||||||
|
|
||||||
graphics.Shaders.World3D.LightColor = t.Thing.Sector.FogColor;
|
graphics.Shaders.World3D.LightColor = t.Thing.Sector.FogColor;
|
||||||
|
@ -1010,7 +1023,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
}
|
}
|
||||||
|
|
||||||
//mxd. render models
|
//mxd. render models
|
||||||
private void RenderModels() {
|
private void RenderModels()
|
||||||
|
{
|
||||||
int shaderpass = fullbrightness ? 1 : 4;
|
int shaderpass = fullbrightness ? 1 : 4;
|
||||||
int currentshaderpass = shaderpass;
|
int currentshaderpass = shaderpass;
|
||||||
int highshaderpass = shaderpass + 2;
|
int highshaderpass = shaderpass + 2;
|
||||||
|
@ -1018,17 +1032,23 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
// Begin rendering with this shader
|
// Begin rendering with this shader
|
||||||
graphics.Shaders.World3D.BeginPass(currentshaderpass);
|
graphics.Shaders.World3D.BeginPass(currentshaderpass);
|
||||||
|
|
||||||
foreach (KeyValuePair<ModelData, List<VisualThing>> group in thingsWithModel) {
|
foreach (KeyValuePair<ModelData, List<VisualThing>> group in thingsWithModel)
|
||||||
foreach (VisualThing t in group.Value) {
|
{
|
||||||
|
foreach (VisualThing t in group.Value)
|
||||||
|
{
|
||||||
t.Update();
|
t.Update();
|
||||||
|
|
||||||
Color4 vertexColor = new Color4(t.VertexColor);
|
Color4 vertexColor = new Color4(t.VertexColor);
|
||||||
vertexColor.Alpha = 1.0f;
|
vertexColor.Alpha = 1.0f;
|
||||||
|
|
||||||
//check if model is affected by dynamic lights and set color accordingly
|
//check if model is affected by dynamic lights and set color accordingly
|
||||||
if (General.Settings.GZDrawLights && !fullbrightness && thingsWithLight.Count > 0) {
|
if (General.Settings.GZDrawLightsMode != LightRenderMode.NONE && !fullbrightness && thingsWithLight.Count > 0)
|
||||||
|
{
|
||||||
Color4 litColor = getLitColorForThing(t);
|
Color4 litColor = getLitColorForThing(t);
|
||||||
graphics.Shaders.World3D.VertexColor = vertexColor + litColor;
|
graphics.Shaders.World3D.VertexColor = vertexColor + litColor;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
graphics.Shaders.World3D.VertexColor = vertexColor;
|
graphics.Shaders.World3D.VertexColor = vertexColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1040,17 +1060,21 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
wantedshaderpass += 8;
|
wantedshaderpass += 8;
|
||||||
|
|
||||||
// Switch shader pass?
|
// Switch shader pass?
|
||||||
if (currentshaderpass != wantedshaderpass) {
|
if (currentshaderpass != wantedshaderpass)
|
||||||
|
{
|
||||||
graphics.Shaders.World3D.EndPass();
|
graphics.Shaders.World3D.EndPass();
|
||||||
graphics.Shaders.World3D.BeginPass(wantedshaderpass);
|
graphics.Shaders.World3D.BeginPass(wantedshaderpass);
|
||||||
currentshaderpass = wantedshaderpass;
|
currentshaderpass = wantedshaderpass;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the colors to use
|
// Set the colors to use
|
||||||
if (!graphics.Shaders.Enabled) {
|
if (!graphics.Shaders.Enabled)
|
||||||
|
{
|
||||||
graphics.Device.SetTexture(2, (t.Selected && showselection) ? selectionimage.Texture : null);
|
graphics.Device.SetTexture(2, (t.Selected && showselection) ? selectionimage.Texture : null);
|
||||||
graphics.Device.SetTexture(3, ((t == highlighted) && showhighlight) ? highlightimage.Texture : null);
|
graphics.Device.SetTexture(3, ((t == highlighted) && showhighlight) ? highlightimage.Texture : null);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
graphics.Shaders.World3D.SetHighlightColor(CalculateHighlightColor((t == highlighted) && showhighlight, (t.Selected && showselection)).ToArgb());
|
graphics.Shaders.World3D.SetHighlightColor(CalculateHighlightColor((t == highlighted) && showhighlight, (t.Selected && showselection)).ToArgb());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1065,14 +1089,16 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
ApplyMatrices3D();
|
ApplyMatrices3D();
|
||||||
|
|
||||||
//mxd. set variables for fog rendering
|
//mxd. set variables for fog rendering
|
||||||
if (wantedshaderpass > 7) {
|
if (wantedshaderpass > 7)
|
||||||
|
{
|
||||||
graphics.Shaders.World3D.World = world;
|
graphics.Shaders.World3D.World = world;
|
||||||
|
|
||||||
graphics.Shaders.World3D.LightColor = t.Thing.Sector.FogColor;
|
graphics.Shaders.World3D.LightColor = t.Thing.Sector.FogColor;
|
||||||
graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, getFogEnd(t.Thing.Sector));
|
graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, getFogEnd(t.Thing.Sector));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < group.Key.Model.Meshes.Count; i++) {
|
for(int i = 0; i < group.Key.Model.Meshes.Count; i++)
|
||||||
|
{
|
||||||
if (!graphics.Shaders.Enabled) graphics.Device.SetTexture(0, group.Key.Model.Textures[i]);
|
if (!graphics.Shaders.Enabled) graphics.Device.SetTexture(0, group.Key.Model.Textures[i]);
|
||||||
graphics.Shaders.World3D.Texture1 = group.Key.Model.Textures[i];
|
graphics.Shaders.World3D.Texture1 = group.Key.Model.Textures[i];
|
||||||
graphics.Shaders.World3D.ApplySettings();
|
graphics.Shaders.World3D.ApplySettings();
|
||||||
|
@ -1180,13 +1206,16 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
public void AddThingGeometry(VisualThing t)
|
public void AddThingGeometry(VisualThing t)
|
||||||
{
|
{
|
||||||
//mxd. gater lights
|
//mxd. gater lights
|
||||||
if (General.Settings.GZDrawLights && !fullbrightness && t.LightType != DynamicLightType.NONE) {
|
if (General.Settings.GZDrawLightsMode != LightRenderMode.NONE && !fullbrightness && t.LightType != DynamicLightType.NONE)
|
||||||
|
{
|
||||||
t.UpdateLightRadius();
|
t.UpdateLightRadius();
|
||||||
|
|
||||||
if (t.LightRadius > 0) {
|
if (t.LightRadius > 0)
|
||||||
|
{
|
||||||
t.CalculateCameraDistance3D(D3DDevice.V3(cameraposition));
|
t.CalculateCameraDistance3D(D3DDevice.V3(cameraposition));
|
||||||
//t.CameraDistance3D is actually squared distance, hence (t.LightRadius * t.LightRadius)
|
//t.CameraDistance3D is actually squared distance, hence (t.LightRadius * t.LightRadius)
|
||||||
if (t.CameraDistance3D < (t.LightRadius * t.LightRadius) || isThingOnScreen(t.BoundingBox)) { //always render light if camera is within it's radius
|
if(t.CameraDistance3D < (t.LightRadius * t.LightRadius) || isThingOnScreen(t.BoundingBox)) //always render light if camera is within it's radius
|
||||||
|
{
|
||||||
if (Array.IndexOf(GZBuilder.GZGeneral.GZ_ANIMATED_LIGHT_TYPES, t.LightType) != -1)
|
if (Array.IndexOf(GZBuilder.GZGeneral.GZ_ANIMATED_LIGHT_TYPES, t.LightType) != -1)
|
||||||
t.UpdateBoundingBox();
|
t.UpdateBoundingBox();
|
||||||
thingsWithLight.Add(t);
|
thingsWithLight.Add(t);
|
||||||
|
@ -1197,7 +1226,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
if (!isThingOnScreen(t.BoundingBox)) return;
|
if (!isThingOnScreen(t.BoundingBox)) return;
|
||||||
|
|
||||||
//mxd. gather models
|
//mxd. gather models
|
||||||
if(t.Thing.IsModel && General.Settings.GZDrawModels && (!General.Settings.GZDrawSelectedModelsOnly || t.Selected)) {
|
if(t.Thing.IsModel && General.Settings.GZDrawModelsMode != ModelRenderMode.NONE && (General.Settings.GZDrawModelsMode == ModelRenderMode.ALL || t.Selected))
|
||||||
|
{
|
||||||
ModelData mde = General.Map.Data.ModeldefEntries[t.Thing.Type];
|
ModelData mde = General.Map.Data.ModeldefEntries[t.Thing.Type];
|
||||||
if (!thingsWithModel.ContainsKey(mde))
|
if (!thingsWithModel.ContainsKey(mde))
|
||||||
thingsWithModel.Add(mde, new List<VisualThing>() { t });
|
thingsWithModel.Add(mde, new List<VisualThing>() { t });
|
||||||
|
@ -1225,12 +1255,14 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
}
|
}
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
public void AddVisualVertices(VisualVertex[] verts) {
|
public void AddVisualVertices(VisualVertex[] verts)
|
||||||
|
{
|
||||||
visualvertices = verts;
|
visualvertices = verts;
|
||||||
}
|
}
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
private bool isThingOnScreen(Vector3[] bbox) {
|
private bool isThingOnScreen(Vector3[] bbox)
|
||||||
|
{
|
||||||
Vector3D camNormal = Vector3D.FromAngleXYZ(General.Map.VisualCamera.AngleXY, General.Map.VisualCamera.AngleZ);
|
Vector3D camNormal = Vector3D.FromAngleXYZ(General.Map.VisualCamera.AngleXY, General.Map.VisualCamera.AngleZ);
|
||||||
Vector3D thingNormal = D3DDevice.V3D(bbox[0]) - cameraposition; //bbox[0] is always thing center
|
Vector3D thingNormal = D3DDevice.V3D(bbox[0]) - cameraposition; //bbox[0] is always thing center
|
||||||
|
|
||||||
|
@ -1244,7 +1276,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
int topCount = 0;
|
int topCount = 0;
|
||||||
int bottomCount = 0;
|
int bottomCount = 0;
|
||||||
|
|
||||||
for (int i = 0; i < len; i++) {
|
for (int i = 0; i < len; i++)
|
||||||
|
{
|
||||||
//check visibility
|
//check visibility
|
||||||
screenPos = Vector3.Project(bbox[i], 0, 0, 1, 1, PROJ_NEAR_PLANE, General.Settings.ViewDistance, worldviewproj);
|
screenPos = Vector3.Project(bbox[i], 0, 0, 1, 1, PROJ_NEAR_PLANE, General.Settings.ViewDistance, worldviewproj);
|
||||||
|
|
||||||
|
@ -1269,7 +1302,8 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
}
|
}
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
private static bool checkBBoxIntersection(Vector3[] bbox1, Vector3[] bbox2) {
|
private static bool checkBBoxIntersection(Vector3[] bbox1, Vector3[] bbox2)
|
||||||
|
{
|
||||||
Vector3 dist = bbox1[0] - bbox2[0];
|
Vector3 dist = bbox1[0] - bbox2[0];
|
||||||
|
|
||||||
Vector3 halfSize1 = bbox1[0] - bbox1[1];
|
Vector3 halfSize1 = bbox1[0] - bbox1[1];
|
||||||
|
|
|
@ -1082,9 +1082,9 @@ showerrors
|
||||||
/////////////////////////
|
/////////////////////////
|
||||||
gztogglemodels
|
gztogglemodels
|
||||||
{
|
{
|
||||||
title = "Toggle models rendering";
|
title = "Show models";
|
||||||
category = "gzdoombuilder";
|
category = "gzdoombuilder";
|
||||||
description = "Toggles models rendering.";
|
description = "Cycles through available model rendering modes.";
|
||||||
allowkeys = true;
|
allowkeys = true;
|
||||||
allowmouse = true;
|
allowmouse = true;
|
||||||
allowscroll = false;
|
allowscroll = false;
|
||||||
|
@ -1092,19 +1092,9 @@ gztogglemodels
|
||||||
|
|
||||||
gztogglelights
|
gztogglelights
|
||||||
{
|
{
|
||||||
title = "Toggle dynamic lights rendering";
|
title = "Show dynamic lights";
|
||||||
category = "gzdoombuilder";
|
category = "gzdoombuilder";
|
||||||
description = "Toggles dynamic lights rendering.";
|
description = "Cycles through available dynamic light rendering modes in Visual Mode.";
|
||||||
allowkeys = true;
|
|
||||||
allowmouse = true;
|
|
||||||
allowscroll = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
gztogglelightsanimation
|
|
||||||
{
|
|
||||||
title = "Toggle dynamic lights animation";
|
|
||||||
category = "gzdoombuilder";
|
|
||||||
description = "Toggles dynamic lights animation.";
|
|
||||||
allowkeys = true;
|
allowkeys = true;
|
||||||
allowmouse = true;
|
allowmouse = true;
|
||||||
allowscroll = false;
|
allowscroll = false;
|
||||||
|
@ -1112,7 +1102,7 @@ gztogglelightsanimation
|
||||||
|
|
||||||
gztogglefog
|
gztogglefog
|
||||||
{
|
{
|
||||||
title = "Toggle fog rendering";
|
title = "Toggle fog rendering";
|
||||||
category = "gzdoombuilder";
|
category = "gzdoombuilder";
|
||||||
description = "Toggles fog rendering.";
|
description = "Toggles fog rendering.";
|
||||||
allowkeys = true;
|
allowkeys = true;
|
||||||
|
@ -1120,21 +1110,11 @@ gztogglefog
|
||||||
allowscroll = false;
|
allowscroll = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
gzdrawselectedmodelsonly
|
|
||||||
{
|
|
||||||
title = "Render selected/all models";
|
|
||||||
category = "gzdoombuilder";
|
|
||||||
description = "Render all models / render only models for selected things.";
|
|
||||||
allowkeys = true;
|
|
||||||
allowmouse = true;
|
|
||||||
allowscroll = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
gztogglefx
|
gztogglefx
|
||||||
{
|
{
|
||||||
title = "Toggle GZDoom effects";
|
title = "Toggle models, dynamic lights and fog";
|
||||||
category = "gzdoombuilder";
|
category = "gzdoombuilder";
|
||||||
description = "Toggles models, dynamic lights and fog rendering.";
|
description = "This is a combo action, which toggles models, dynamic lights and fog rendering.";
|
||||||
allowkeys = true;
|
allowkeys = true;
|
||||||
allowmouse = true;
|
allowmouse = true;
|
||||||
allowscroll = false;
|
allowscroll = false;
|
||||||
|
@ -1142,24 +1122,24 @@ gztogglefx
|
||||||
|
|
||||||
gztoggleeventlines
|
gztoggleeventlines
|
||||||
{
|
{
|
||||||
title = "Toggle Event lines";
|
title = "Toggle Event lines";
|
||||||
category = "view";
|
category = "view";
|
||||||
description = "When enabled, shows order, in which patrol points and interpolation points are connected. Also shows action target for currently highlighted item in 2D modes.";
|
description = "When enabled, shows order, in which patrol points and interpolation points are connected. Also shows action target for currently highlighted item in 2D modes.";
|
||||||
allowkeys = true;
|
allowkeys = true;
|
||||||
allowmouse = false;
|
allowmouse = false;
|
||||||
allowscroll = false;
|
allowscroll = false;
|
||||||
default = 73;
|
default = 73;
|
||||||
}
|
}
|
||||||
|
|
||||||
gztogglevisualvertices
|
gztogglevisualvertices
|
||||||
{
|
{
|
||||||
title = "Toggle Visual Vertices";
|
title = "Toggle Visual Vertices";
|
||||||
category = "visual";
|
category = "visual";
|
||||||
description = "When enabled, shows vertices, which heights can be changed, in Visual mode (UDMF only).";
|
description = "When enabled, shows vertices, which heights can be changed, in Visual mode (UDMF only).";
|
||||||
allowkeys = true;
|
allowkeys = true;
|
||||||
allowmouse = false;
|
allowmouse = false;
|
||||||
allowscroll = false;
|
allowscroll = false;
|
||||||
default = 262230;
|
default = 262230;
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
|
|
BIN
Source/Core/Resources/LightDisabled.png
Normal file
After Width: | Height: | Size: 623 B |
Before Width: | Height: | Size: 763 B After Width: | Height: | Size: 765 B |
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 305 B |
BIN
Source/Core/Resources/ModelDisabled.png
Normal file
After Width: | Height: | Size: 610 B |
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using CodeImp.DoomBuilder.Config;
|
||||||
using CodeImp.DoomBuilder.Map;
|
using CodeImp.DoomBuilder.Map;
|
||||||
using SlimDX.Direct3D9;
|
using SlimDX.Direct3D9;
|
||||||
using SlimDX;
|
using SlimDX;
|
||||||
|
@ -417,7 +418,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!General.Settings.GZAnimateLights || Array.IndexOf(GZBuilder.GZGeneral.GZ_ANIMATED_LIGHT_TYPES, lightType) == -1) {
|
if (General.Settings.GZDrawLightsMode == LightRenderMode.ALL || Array.IndexOf(GZBuilder.GZGeneral.GZ_ANIMATED_LIGHT_TYPES, lightType) == -1) {
|
||||||
lightRadius = lightPrimaryRadius;
|
lightRadius = lightPrimaryRadius;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
163
Source/Core/Windows/MainForm.Designer.cs
generated
|
@ -175,10 +175,14 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
this.buttonautoclearsidetextures = new System.Windows.Forms.ToolStripButton();
|
this.buttonautoclearsidetextures = new System.Windows.Forms.ToolStripButton();
|
||||||
this.seperatorgeometry = new System.Windows.Forms.ToolStripSeparator();
|
this.seperatorgeometry = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.buttontogglefx = new System.Windows.Forms.ToolStripButton();
|
this.buttontogglefx = new System.Windows.Forms.ToolStripButton();
|
||||||
this.buttontoggledynlight = new System.Windows.Forms.ToolStripButton();
|
this.dynamiclightmode = new System.Windows.Forms.ToolStripSplitButton();
|
||||||
this.buttontoggleanimatedlight = new System.Windows.Forms.ToolStripButton();
|
this.sightsdontshow = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.buttontogglemodels = new System.Windows.Forms.ToolStripButton();
|
this.lightsshow = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.buttonselectedmodelsonly = new System.Windows.Forms.ToolStripButton();
|
this.lightsshowanimated = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.modelrendermode = new System.Windows.Forms.ToolStripSplitButton();
|
||||||
|
this.modelsdontshow = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.modelsshowselection = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.modelsshowall = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.buttontogglefog = new System.Windows.Forms.ToolStripButton();
|
this.buttontogglefog = new System.Windows.Forms.ToolStripButton();
|
||||||
this.buttontoggleeventlines = new System.Windows.Forms.ToolStripButton();
|
this.buttontoggleeventlines = new System.Windows.Forms.ToolStripButton();
|
||||||
this.buttontogglevisualvertices = new System.Windows.Forms.ToolStripButton();
|
this.buttontogglevisualvertices = new System.Windows.Forms.ToolStripButton();
|
||||||
|
@ -359,7 +363,7 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
this.menuhelp});
|
this.menuhelp});
|
||||||
this.menumain.Location = new System.Drawing.Point(0, 0);
|
this.menumain.Location = new System.Drawing.Point(0, 0);
|
||||||
this.menumain.Name = "menumain";
|
this.menumain.Name = "menumain";
|
||||||
this.menumain.Size = new System.Drawing.Size(420, 24);
|
this.menumain.Size = new System.Drawing.Size(328, 24);
|
||||||
this.menumain.TabIndex = 0;
|
this.menumain.TabIndex = 0;
|
||||||
//
|
//
|
||||||
// menufile
|
// menufile
|
||||||
|
@ -1156,10 +1160,8 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
this.buttonautoclearsidetextures,
|
this.buttonautoclearsidetextures,
|
||||||
this.seperatorgeometry,
|
this.seperatorgeometry,
|
||||||
this.buttontogglefx,
|
this.buttontogglefx,
|
||||||
this.buttontoggledynlight,
|
this.dynamiclightmode,
|
||||||
this.buttontoggleanimatedlight,
|
this.modelrendermode,
|
||||||
this.buttontogglemodels,
|
|
||||||
this.buttonselectedmodelsonly,
|
|
||||||
this.buttontogglefog,
|
this.buttontogglefog,
|
||||||
this.buttontoggleeventlines,
|
this.buttontoggleeventlines,
|
||||||
this.buttontogglevisualvertices,
|
this.buttontogglevisualvertices,
|
||||||
|
@ -1412,6 +1414,7 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
//
|
//
|
||||||
// separatorfilters
|
// separatorfilters
|
||||||
//
|
//
|
||||||
|
this.separatorfilters.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||||
this.separatorfilters.Name = "separatorfilters";
|
this.separatorfilters.Name = "separatorfilters";
|
||||||
this.separatorfilters.Size = new System.Drawing.Size(6, 25);
|
this.separatorfilters.Size = new System.Drawing.Size(6, 25);
|
||||||
//
|
//
|
||||||
|
@ -1429,6 +1432,7 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
//
|
//
|
||||||
// separatorfullbrightness
|
// separatorfullbrightness
|
||||||
//
|
//
|
||||||
|
this.separatorfullbrightness.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||||
this.separatorfullbrightness.Name = "separatorfullbrightness";
|
this.separatorfullbrightness.Name = "separatorfullbrightness";
|
||||||
this.separatorfullbrightness.Size = new System.Drawing.Size(6, 25);
|
this.separatorfullbrightness.Size = new System.Drawing.Size(6, 25);
|
||||||
//
|
//
|
||||||
|
@ -1527,6 +1531,7 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
//
|
//
|
||||||
// seperatorgeometry
|
// seperatorgeometry
|
||||||
//
|
//
|
||||||
|
this.seperatorgeometry.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||||
this.seperatorgeometry.Name = "seperatorgeometry";
|
this.seperatorgeometry.Name = "seperatorgeometry";
|
||||||
this.seperatorgeometry.Size = new System.Drawing.Size(6, 25);
|
this.seperatorgeometry.Size = new System.Drawing.Size(6, 25);
|
||||||
//
|
//
|
||||||
|
@ -1542,57 +1547,97 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
this.buttontogglefx.Text = "Toggle GZDoom Effects";
|
this.buttontogglefx.Text = "Toggle GZDoom Effects";
|
||||||
this.buttontogglefx.Click += new System.EventHandler(this.InvokeTaggedAction);
|
this.buttontogglefx.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||||
//
|
//
|
||||||
// buttontoggledynlight
|
// dynamiclightmode
|
||||||
//
|
//
|
||||||
this.buttontoggledynlight.CheckOnClick = true;
|
this.dynamiclightmode.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
this.buttontoggledynlight.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
this.dynamiclightmode.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.buttontoggledynlight.Enabled = false;
|
this.sightsdontshow,
|
||||||
this.buttontoggledynlight.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light;
|
this.lightsshow,
|
||||||
this.buttontoggledynlight.ImageTransparentColor = System.Drawing.Color.Magenta;
|
this.lightsshowanimated});
|
||||||
this.buttontoggledynlight.Name = "buttontoggledynlight";
|
this.dynamiclightmode.Enabled = false;
|
||||||
this.buttontoggledynlight.Size = new System.Drawing.Size(23, 22);
|
this.dynamiclightmode.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light;
|
||||||
this.buttontoggledynlight.Tag = "builder_gztogglelights";
|
this.dynamiclightmode.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
this.buttontoggledynlight.Text = "Toggle Dynamic Lights";
|
this.dynamiclightmode.Name = "dynamiclightmode";
|
||||||
this.buttontoggledynlight.Click += new System.EventHandler(this.InvokeTaggedAction);
|
this.dynamiclightmode.Size = new System.Drawing.Size(32, 22);
|
||||||
|
this.dynamiclightmode.Tag = "builder_gztogglelights";
|
||||||
|
this.dynamiclightmode.Text = "Dynamic light mode";
|
||||||
|
this.dynamiclightmode.ButtonClick += new System.EventHandler(this.InvokeTaggedAction);
|
||||||
//
|
//
|
||||||
// buttontoggleanimatedlight
|
// sightsdontshow
|
||||||
//
|
//
|
||||||
this.buttontoggleanimatedlight.CheckOnClick = true;
|
this.sightsdontshow.CheckOnClick = true;
|
||||||
this.buttontoggleanimatedlight.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
this.sightsdontshow.Image = global::CodeImp.DoomBuilder.Properties.Resources.LightDisabled;
|
||||||
this.buttontoggleanimatedlight.Enabled = false;
|
this.sightsdontshow.Name = "sightsdontshow";
|
||||||
this.buttontoggleanimatedlight.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light_animate;
|
this.sightsdontshow.Size = new System.Drawing.Size(237, 22);
|
||||||
this.buttontoggleanimatedlight.ImageTransparentColor = System.Drawing.Color.Magenta;
|
this.sightsdontshow.Tag = 0;
|
||||||
this.buttontoggleanimatedlight.Name = "buttontoggleanimatedlight";
|
this.sightsdontshow.Text = "No dynamic lights";
|
||||||
this.buttontoggleanimatedlight.Size = new System.Drawing.Size(23, 22);
|
this.sightsdontshow.Click += new System.EventHandler(this.ChangeLightRenderingMode);
|
||||||
this.buttontoggleanimatedlight.Tag = "builder_gztogglelightsanimation";
|
|
||||||
this.buttontoggleanimatedlight.Text = "Toggle Dynamic Light Animation";
|
|
||||||
this.buttontoggleanimatedlight.Click += new System.EventHandler(this.InvokeTaggedAction);
|
|
||||||
//
|
//
|
||||||
// buttontogglemodels
|
// lightsshow
|
||||||
//
|
//
|
||||||
this.buttontogglemodels.CheckOnClick = true;
|
this.lightsshow.CheckOnClick = true;
|
||||||
this.buttontogglemodels.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
this.lightsshow.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light;
|
||||||
this.buttontogglemodels.Enabled = false;
|
this.lightsshow.Name = "lightsshow";
|
||||||
this.buttontogglemodels.Image = ((System.Drawing.Image)(resources.GetObject("buttontogglemodels.Image")));
|
this.lightsshow.Size = new System.Drawing.Size(237, 22);
|
||||||
this.buttontogglemodels.ImageTransparentColor = System.Drawing.Color.Magenta;
|
this.lightsshow.Tag = 1;
|
||||||
this.buttontogglemodels.Name = "buttontogglemodels";
|
this.lightsshow.Text = "Show dynamic lights";
|
||||||
this.buttontogglemodels.Size = new System.Drawing.Size(23, 22);
|
this.lightsshow.Click += new System.EventHandler(this.ChangeLightRenderingMode);
|
||||||
this.buttontogglemodels.Tag = "builder_gztogglemodels";
|
|
||||||
this.buttontogglemodels.Text = "Toggle Models Rendering";
|
|
||||||
this.buttontogglemodels.Click += new System.EventHandler(this.InvokeTaggedAction);
|
|
||||||
//
|
//
|
||||||
// buttonselectedmodelsonly
|
// lightsshowanimated
|
||||||
//
|
//
|
||||||
this.buttonselectedmodelsonly.CheckOnClick = true;
|
this.lightsshowanimated.CheckOnClick = true;
|
||||||
this.buttonselectedmodelsonly.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
this.lightsshowanimated.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light_animate;
|
||||||
this.buttonselectedmodelsonly.Enabled = false;
|
this.lightsshowanimated.Name = "lightsshowanimated";
|
||||||
this.buttonselectedmodelsonly.Image = ((System.Drawing.Image)(resources.GetObject("buttonselectedmodelsonly.Image")));
|
this.lightsshowanimated.Size = new System.Drawing.Size(237, 22);
|
||||||
this.buttonselectedmodelsonly.ImageTransparentColor = System.Drawing.Color.Magenta;
|
this.lightsshowanimated.Tag = 2;
|
||||||
this.buttonselectedmodelsonly.Name = "buttonselectedmodelsonly";
|
this.lightsshowanimated.Text = "Show animated dynamic lights";
|
||||||
this.buttonselectedmodelsonly.Size = new System.Drawing.Size(23, 22);
|
this.lightsshowanimated.Click += new System.EventHandler(this.ChangeLightRenderingMode);
|
||||||
this.buttonselectedmodelsonly.Tag = "builder_gzdrawselectedmodelsonly";
|
//
|
||||||
this.buttonselectedmodelsonly.Text = "Render models for selected things only";
|
// modelmode
|
||||||
this.buttonselectedmodelsonly.Click += new System.EventHandler(this.InvokeTaggedAction);
|
//
|
||||||
|
this.modelrendermode.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
this.modelrendermode.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.modelsdontshow,
|
||||||
|
this.modelsshowselection,
|
||||||
|
this.modelsshowall});
|
||||||
|
this.modelrendermode.Enabled = false;
|
||||||
|
this.modelrendermode.Image = global::CodeImp.DoomBuilder.Properties.Resources.Model;
|
||||||
|
this.modelrendermode.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
|
this.modelrendermode.Name = "modelmode";
|
||||||
|
this.modelrendermode.Size = new System.Drawing.Size(32, 22);
|
||||||
|
this.modelrendermode.Tag = "builder_gztogglemodels";
|
||||||
|
this.modelrendermode.Text = "Model rendering mode";
|
||||||
|
this.modelrendermode.ButtonClick += new System.EventHandler(this.InvokeTaggedAction);
|
||||||
|
//
|
||||||
|
// modelsdontshow
|
||||||
|
//
|
||||||
|
this.modelsdontshow.CheckOnClick = true;
|
||||||
|
this.modelsdontshow.Image = global::CodeImp.DoomBuilder.Properties.Resources.ModelDisabled;
|
||||||
|
this.modelsdontshow.Name = "modelsdontshow";
|
||||||
|
this.modelsdontshow.Size = new System.Drawing.Size(245, 22);
|
||||||
|
this.modelsdontshow.Tag = 0;
|
||||||
|
this.modelsdontshow.Text = "Don\'t show models";
|
||||||
|
this.modelsdontshow.Click += new System.EventHandler(this.ChangeModelRenderingMode);
|
||||||
|
//
|
||||||
|
// modelsshowselection
|
||||||
|
//
|
||||||
|
this.modelsshowselection.CheckOnClick = true;
|
||||||
|
this.modelsshowselection.Image = global::CodeImp.DoomBuilder.Properties.Resources.Model_selected;
|
||||||
|
this.modelsshowselection.Name = "modelsshowselection";
|
||||||
|
this.modelsshowselection.Size = new System.Drawing.Size(245, 22);
|
||||||
|
this.modelsshowselection.Tag = 1;
|
||||||
|
this.modelsshowselection.Text = "Show models for selected things";
|
||||||
|
this.modelsshowselection.Click += new System.EventHandler(this.ChangeModelRenderingMode);
|
||||||
|
//
|
||||||
|
// modelsshowall
|
||||||
|
//
|
||||||
|
this.modelsshowall.CheckOnClick = true;
|
||||||
|
this.modelsshowall.Image = global::CodeImp.DoomBuilder.Properties.Resources.Model;
|
||||||
|
this.modelsshowall.Name = "modelsshowall";
|
||||||
|
this.modelsshowall.Size = new System.Drawing.Size(245, 22);
|
||||||
|
this.modelsshowall.Tag = 2;
|
||||||
|
this.modelsshowall.Text = "Show all models";
|
||||||
|
this.modelsshowall.Click += new System.EventHandler(this.ChangeModelRenderingMode);
|
||||||
//
|
//
|
||||||
// buttontogglefog
|
// buttontogglefog
|
||||||
//
|
//
|
||||||
|
@ -2363,10 +2408,6 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
private System.Windows.Forms.ToolStripSeparator seperatoreditgrid;
|
private System.Windows.Forms.ToolStripSeparator seperatoreditgrid;
|
||||||
private System.Windows.Forms.ToolStripSeparator seperatoreditcopypaste;
|
private System.Windows.Forms.ToolStripSeparator seperatoreditcopypaste;
|
||||||
private System.Windows.Forms.ToolStripSeparator seperatorgeometry;
|
private System.Windows.Forms.ToolStripSeparator seperatorgeometry;
|
||||||
private System.Windows.Forms.ToolStripButton buttontoggledynlight;
|
|
||||||
private System.Windows.Forms.ToolStripButton buttontogglemodels;
|
|
||||||
private System.Windows.Forms.ToolStripButton buttonselectedmodelsonly;
|
|
||||||
private System.Windows.Forms.ToolStripButton buttontoggleanimatedlight;
|
|
||||||
private System.Windows.Forms.ToolStripButton buttontogglefx;
|
private System.Windows.Forms.ToolStripButton buttontogglefx;
|
||||||
private System.Windows.Forms.ToolStripButton buttontogglefog;
|
private System.Windows.Forms.ToolStripButton buttontogglefog;
|
||||||
private System.Windows.Forms.ToolStripStatusLabel warnsLabel;
|
private System.Windows.Forms.ToolStripStatusLabel warnsLabel;
|
||||||
|
@ -2418,5 +2459,13 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
private ToolStripSeparator separatorio;
|
private ToolStripSeparator separatorio;
|
||||||
private ToolStripMenuItem itemviewthingtypes;
|
private ToolStripMenuItem itemviewthingtypes;
|
||||||
private StatisticsControl statistics;
|
private StatisticsControl statistics;
|
||||||
|
private ToolStripSplitButton dynamiclightmode;
|
||||||
|
private ToolStripMenuItem sightsdontshow;
|
||||||
|
private ToolStripMenuItem lightsshow;
|
||||||
|
private ToolStripMenuItem lightsshowanimated;
|
||||||
|
private ToolStripSplitButton modelrendermode;
|
||||||
|
private ToolStripMenuItem modelsdontshow;
|
||||||
|
private ToolStripMenuItem modelsshowselection;
|
||||||
|
private ToolStripMenuItem modelsshowall;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1464,7 +1464,8 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
|
|
||||||
//mxd. Add engine selector
|
//mxd. Add engine selector
|
||||||
ToolStripMenuItem menuitem = new ToolStripMenuItem("Engine:", Resources.Marine);
|
ToolStripMenuItem menuitem = new ToolStripMenuItem("Engine:", Resources.Marine);
|
||||||
for (int i = 0; i < General.Map.ConfigSettings.TestEngines.Count; i++) {
|
for (int i = 0; i < General.Map.ConfigSettings.TestEngines.Count; i++)
|
||||||
|
{
|
||||||
ToolStripMenuItem engineItem = new ToolStripMenuItem(General.Map.ConfigSettings.TestEngines[i].TestProgramName);
|
ToolStripMenuItem engineItem = new ToolStripMenuItem(General.Map.ConfigSettings.TestEngines[i].TestProgramName);
|
||||||
engineItem.Tag = i;
|
engineItem.Tag = i;
|
||||||
engineItem.Checked = (i == General.Map.ConfigSettings.CurrentEngineIndex);
|
engineItem.Checked = (i == General.Map.ConfigSettings.CurrentEngineIndex);
|
||||||
|
@ -1807,27 +1808,27 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
buttontest.Visible = General.Settings.ToolbarTesting;
|
buttontest.Visible = General.Settings.ToolbarTesting;
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
buttontogglemodels.Visible = General.Settings.GZToolbarGZDoom;
|
modelrendermode.Visible = General.Settings.GZToolbarGZDoom;
|
||||||
buttonselectedmodelsonly.Visible = General.Settings.GZToolbarGZDoom;
|
dynamiclightmode.Visible = General.Settings.GZToolbarGZDoom;
|
||||||
buttontoggledynlight.Visible = General.Settings.GZToolbarGZDoom;
|
|
||||||
buttontoggleanimatedlight.Visible = General.Settings.GZToolbarGZDoom;
|
|
||||||
buttontogglefx.Visible = General.Settings.GZToolbarGZDoom;
|
buttontogglefx.Visible = General.Settings.GZToolbarGZDoom;
|
||||||
buttontogglefog.Visible = General.Settings.GZToolbarGZDoom;
|
buttontogglefog.Visible = General.Settings.GZToolbarGZDoom;
|
||||||
buttontoggleeventlines.Visible = General.Settings.GZToolbarGZDoom;
|
buttontoggleeventlines.Visible = General.Settings.GZToolbarGZDoom;
|
||||||
buttontogglevisualvertices.Visible = General.Settings.GZToolbarGZDoom;
|
buttontogglevisualvertices.Visible = General.Settings.GZToolbarGZDoom;
|
||||||
separatorgzmodes.Visible = General.Settings.GZToolbarGZDoom;
|
separatorgzmodes.Visible = General.Settings.GZToolbarGZDoom;
|
||||||
|
|
||||||
|
|
||||||
// Enable/disable all edit mode items
|
// Enable/disable all edit mode items
|
||||||
foreach(ToolStripItem i in editmodeitems) i.Enabled = (General.Map != null);
|
foreach(ToolStripItem i in editmodeitems) i.Enabled = (General.Map != null);
|
||||||
|
|
||||||
//mxd. Show/hide additional panels
|
//mxd. Show/hide additional panels
|
||||||
modestoolbar.Visible = (General.Map != null);
|
modestoolbar.Visible = (General.Map != null);
|
||||||
modecontrolsloolbar.Visible = (General.Map != null && modecontrolsloolbar.Items.Count > 0);
|
modecontrolsloolbar.Visible = (General.Map != null && modecontrolsloolbar.Items.Count > 0);
|
||||||
|
|
||||||
//mxd. modestoolbar index in Controls gets messed up when it's invisible. This fixes it. TODO: find why this happens in the first place
|
//mxd. modestoolbar index in Controls gets messed up when it's invisible. This fixes it. TODO: find why this happens in the first place
|
||||||
if(modestoolbar.Visible) {
|
if(modestoolbar.Visible)
|
||||||
|
{
|
||||||
int toolbarpos = this.Controls.IndexOf(toolbar);
|
int toolbarpos = this.Controls.IndexOf(toolbar);
|
||||||
if(this.Controls.IndexOf(modestoolbar) > toolbarpos) {
|
if(this.Controls.IndexOf(modestoolbar) > toolbarpos)
|
||||||
|
{
|
||||||
this.Controls.SetChildIndex(modestoolbar, toolbarpos);
|
this.Controls.SetChildIndex(modestoolbar, toolbarpos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1948,31 +1949,39 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
}
|
}
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
public void UpdateGZDoomPanel() {
|
public void UpdateGZDoomPanel()
|
||||||
if (General.Map != null) {
|
{
|
||||||
buttontogglemodels.Enabled = true;
|
if (General.Map != null)
|
||||||
buttonselectedmodelsonly.Enabled = true;
|
{
|
||||||
buttontoggledynlight.Enabled = true;
|
modelrendermode.Enabled = true;
|
||||||
buttontoggleanimatedlight.Enabled = true;
|
dynamiclightmode.Enabled = true;
|
||||||
buttontogglefog.Enabled = true;
|
buttontogglefog.Enabled = true;
|
||||||
buttontogglefx.Enabled = true;
|
buttontogglefx.Enabled = true;
|
||||||
buttontoggleeventlines.Enabled = true;
|
buttontoggleeventlines.Enabled = true;
|
||||||
buttontogglevisualvertices.Enabled = General.Map.UDMF;
|
buttontogglevisualvertices.Enabled = General.Map.UDMF;
|
||||||
|
|
||||||
if (General.Settings.GZToolbarGZDoom) {
|
if (General.Settings.GZToolbarGZDoom)
|
||||||
buttontogglemodels.Checked = General.Settings.GZDrawModels;
|
{
|
||||||
buttonselectedmodelsonly.Checked = General.Settings.GZDrawSelectedModelsOnly;
|
foreach(ToolStripMenuItem item in modelrendermode.DropDownItems)
|
||||||
buttontoggledynlight.Checked = General.Settings.GZDrawLights;
|
{
|
||||||
buttontoggleanimatedlight.Checked = General.Settings.GZAnimateLights;
|
item.Checked = ((ModelRenderMode)item.Tag == General.Settings.GZDrawModelsMode);
|
||||||
|
if (item.Checked) modelrendermode.Image = item.Image;
|
||||||
|
}
|
||||||
|
foreach(ToolStripMenuItem item in dynamiclightmode.DropDownItems)
|
||||||
|
{
|
||||||
|
item.Checked = ((LightRenderMode)item.Tag == General.Settings.GZDrawLightsMode);
|
||||||
|
if(item.Checked) dynamiclightmode.Image = item.Image;
|
||||||
|
}
|
||||||
|
|
||||||
buttontogglefog.Checked = General.Settings.GZDrawFog;
|
buttontogglefog.Checked = General.Settings.GZDrawFog;
|
||||||
buttontoggleeventlines.Checked = General.Settings.GZShowEventLines;
|
buttontoggleeventlines.Checked = General.Settings.GZShowEventLines;
|
||||||
buttontogglevisualvertices.Checked = General.Settings.GZShowVisualVertices;
|
buttontogglevisualvertices.Checked = General.Settings.GZShowVisualVertices;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
buttontogglemodels.Enabled = false;
|
else
|
||||||
buttonselectedmodelsonly.Enabled = false;
|
{
|
||||||
buttontoggledynlight.Enabled = false;
|
modelrendermode.Enabled = false;
|
||||||
buttontoggleanimatedlight.Enabled = false;
|
dynamiclightmode.Enabled = false;
|
||||||
buttontogglefog.Enabled = false;
|
buttontogglefog.Enabled = false;
|
||||||
buttontogglefx.Enabled = false;
|
buttontogglefx.Enabled = false;
|
||||||
buttontoggleeventlines.Enabled = false;
|
buttontoggleeventlines.Enabled = false;
|
||||||
|
@ -3004,6 +3013,57 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ================== Models and Lights mode (mxd)
|
||||||
|
|
||||||
|
private void ChangeModelRenderingMode(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
General.Settings.GZDrawModelsMode = (ModelRenderMode)((ToolStripMenuItem)sender).Tag;
|
||||||
|
|
||||||
|
switch(General.Settings.GZDrawModelsMode)
|
||||||
|
{
|
||||||
|
case ModelRenderMode.NONE:
|
||||||
|
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: NONE");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ModelRenderMode.SELECTION:
|
||||||
|
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: SELECTION ONLY");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ModelRenderMode.ALL:
|
||||||
|
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: ALL");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdateGZDoomPanel();
|
||||||
|
RedrawDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ChangeLightRenderingMode(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
General.Settings.GZDrawLightsMode = (LightRenderMode)((ToolStripMenuItem)sender).Tag;
|
||||||
|
|
||||||
|
switch(General.Settings.GZDrawLightsMode)
|
||||||
|
{
|
||||||
|
case LightRenderMode.NONE:
|
||||||
|
General.MainWindow.DisplayStatus(StatusType.Action, "Dynamic lights rendering mode: NONE");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LightRenderMode.ALL:
|
||||||
|
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: ALL");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LightRenderMode.ALL_ANIMATED:
|
||||||
|
General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: ANIMATED");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdateGZDoomPanel();
|
||||||
|
RedrawDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Info Panels
|
#region ================== Info Panels
|
||||||
|
|
|
@ -144,24 +144,6 @@
|
||||||
<metadata name="toolbarContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="toolbarContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>159, 56</value>
|
<value>159, 56</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
|
||||||
<data name="buttontogglemodels.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>
|
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
|
||||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABaSURBVDhPYxgFQwm4Zy//j0yTDEAa8wvLm2A0VJh4QNAA
|
|
||||||
kAQyhgqjiOM0AF0SmQbJY5MDa4QBbBrRFWMTgwNCGmEYJgfCYI3IAKYBnQYBEBuGkflgyQEGDAwA6QWH
|
|
||||||
HxoHRHkAAAAASUVORK5CYII=
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<data name="buttonselectedmodelsonly.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>
|
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
|
||||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACWSURBVDhPY6AqeN0ucZEUDNUGAVgFcQAMtTAOMQZgqH3X
|
|
||||||
If2VFAzWBAQoBoAZQEDIBRQZMEdR8T9ILYgG8cky4Gm95C8QnV9Y3kR9A0ASyBgsCQTIYjgNgAlio0Fq
|
|
||||||
YGyyDADRIHUgNl4Dltf4v8ClEYZhBoAwWDMIgAwAmQbTgE6DAIgNwiADYGrh8iADSMFgTdQDDAwACnwk
|
|
||||||
E7rnlAUAAAAASUVORK5CYII=
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<metadata name="statusbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="statusbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>332, 17</value>
|
<value>332, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
@ -186,27 +168,6 @@
|
||||||
<metadata name="sectorinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="sectorinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="heightpanel1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="labelcollapsedinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="modename.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="buttontoggleinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="linedefinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="thinginfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="sectorinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="redrawtimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="redrawtimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>433, 17</value>
|
<value>433, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
@ -243,6 +204,7 @@
|
||||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>116</value>
|
<value>116</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
AAABAAQAEBAAAAEAGABoAwAARgAAACAgAAABABgAqAwAAK4DAAAwMAAAAQAYAKgcAABWEAAAQEAAAAEA
|
AAABAAQAEBAAAAEAGABoAwAARgAAACAgAAABABgAqAwAAK4DAAAwMAAAAQAYAKgcAABWEAAAQEAAAAEA
|
||||||
|
|
|
@ -430,7 +430,7 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
||||||
|
|
||||||
//EVENTS
|
//EVENTS
|
||||||
private void bApply_Click(object sender, EventArgs e) {
|
private void bApply_Click(object sender, EventArgs e) {
|
||||||
//clean unused sidedef textures
|
// Clean unused sidedef textures
|
||||||
foreach(SidedefData sd in sidedefData) {
|
foreach(SidedefData sd in sidedefData) {
|
||||||
sd.Side.RemoveUnneededTextures(false);
|
sd.Side.RemoveUnneededTextures(false);
|
||||||
|
|
||||||
|
@ -438,14 +438,12 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
||||||
sd.Side.Other.RemoveUnneededTextures(false);
|
sd.Side.Other.RemoveUnneededTextures(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
General.Map.Map.ClearAllSelected();
|
|
||||||
|
|
||||||
// Update cached values
|
// Update cached values
|
||||||
General.Map.Map.Update();
|
General.Map.Map.Update();
|
||||||
General.Map.IsChanged = true;
|
General.Map.IsChanged = true;
|
||||||
|
|
||||||
if(editingModeName != "BaseVisualMode")
|
// Clear selection
|
||||||
General.Interface.RedrawDisplay();
|
General.Actions.InvokeAction("builder_clearselection");
|
||||||
|
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
Close();
|
Close();
|
||||||
|
|
|
@ -353,6 +353,10 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
||||||
|
|
||||||
private void bApply_Click(object sender, EventArgs e) {
|
private void bApply_Click(object sender, EventArgs e) {
|
||||||
foreach(Thing t in selection) t.DetermineSector();
|
foreach(Thing t in selection) t.DetermineSector();
|
||||||
|
|
||||||
|
// Clear selection
|
||||||
|
General.Actions.InvokeAction("builder_clearselection");
|
||||||
|
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,8 +194,8 @@ namespace CodeImp.DoomBuilder.BuilderEffects
|
||||||
General.Map.Map.Update();
|
General.Map.Map.Update();
|
||||||
General.Map.IsChanged = true;
|
General.Map.IsChanged = true;
|
||||||
|
|
||||||
if(editingModeName != "BaseVisualMode")
|
// Clear selection
|
||||||
General.Interface.RedrawDisplay();
|
General.Actions.InvokeAction("builder_clearselection");
|
||||||
|
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
Close();
|
Close();
|
||||||
|
|
|
@ -1225,7 +1225,7 @@ ceilingalignmode
|
||||||
allowscroll = true;
|
allowscroll = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
togglegzdoomrenderingeffects
|
togglegzdoomgeometryeffects
|
||||||
{
|
{
|
||||||
title = "Toggle Geometry Effects";
|
title = "Toggle Geometry Effects";
|
||||||
category = "visual";
|
category = "visual";
|
||||||
|
|
|
@ -2841,12 +2841,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
}
|
}
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
[BeginAction("togglegzdoomrenderingeffects")]
|
[BeginAction("togglegzdoomgeometryeffects")]
|
||||||
public void ToggleGZDoomRenderingEffects() {
|
public void ToggleGZDoomRenderingEffects()
|
||||||
|
{
|
||||||
gzdoomRenderingEffects = !gzdoomRenderingEffects;
|
gzdoomRenderingEffects = !gzdoomRenderingEffects;
|
||||||
RebuildElementData();
|
RebuildElementData();
|
||||||
UpdateChangedObjects();
|
UpdateChangedObjects();
|
||||||
General.Interface.DisplayStatus(StatusType.Info, "(G)ZDoom rendering effects are " + (gzdoomRenderingEffects ? "ENABLED" : "DISABLED"));
|
General.Interface.DisplayStatus(StatusType.Info, "(G)ZDoom geometry effects are " + (gzdoomRenderingEffects ? "ENABLED" : "DISABLED"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//mxd
|
//mxd
|
||||||
|
|