From 07705464e13c0aba8e0fc1406510c4caebd054b8 Mon Sep 17 00:00:00 2001 From: MaxED Date: Sat, 7 May 2016 20:21:53 +0000 Subject: [PATCH] Game configurations: added "sidedefcompressionignoresaction" property. When set to true, sidedefs will be compressed regardless of linedef action (DB2 behaviour). When set to false, sidedefs, which belong to a line with an action, will be skipped when compressing sidedefs. Default value is false. --- Build/Configurations/Includes/ZDoom_common.cfg | 3 +++ Help/gc_basicsettings.html | 13 +++++++++---- Source/Core/Config/GameConfiguration.cs | 3 +++ Source/Core/Map/MapSet.cs | 8 ++++++++ 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/Build/Configurations/Includes/ZDoom_common.cfg b/Build/Configurations/Includes/ZDoom_common.cfg index 40d67a7..ad8b12f 100644 --- a/Build/Configurations/Includes/ZDoom_common.cfg +++ b/Build/Configurations/Includes/ZDoom_common.cfg @@ -33,6 +33,9 @@ common defaulttexturescale = 1.0f; defaultflatscale = 1.0f; scaledtextureoffsets = true; + + //mxd. Sidedefs compression + sidedefcompressionignoresaction = true; // Texture sources textures diff --git a/Help/gc_basicsettings.html b/Help/gc_basicsettings.html index 6a6904c..914f5d3 100644 --- a/Help/gc_basicsettings.html +++ b/Help/gc_basicsettings.html @@ -145,10 +145,15 @@ defaultskytextures SKY3 = "MAP21,MAP22,MAP23,MAP24,MAP25"; } -
-longtexturenames (boolean) - GZDB only.
- Enables support for long (> 8 chars) texture names. This is used by GZDoom Builder to limit the input fields in the user interface and to check the validity of texture names in resources. This setting should only be enabled for UDMF game configurations. Enabling this setting will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3 This does NOT determine the actual limitation on the texture names in the map file format.
Default value is false.
-
+
+ longtexturenames (boolean) - GZDB only.
+ Enables support for long (> 8 chars) texture names. This is used by GZDoom Builder to limit the input fields in the user interface and to check the validity of texture names in resources. This setting should only be enabled for UDMF game configurations. Enabling this setting will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3 This does NOT determine the actual limitation on the texture names in the map file format.
+ Default value is false.
+
+ sidedefcompressionignoresaction (boolean) - GZDB only.
+ When set to true, sidedefs will be compressed regardless of linedef action (DB2 behaviour, can potentially cause problems when target source port doesn't decompress sidedefs).
+ When set to false, sidedefs, which belong to a line with an action, will be skipped when compressing sidedefs.
+ Default value is false.

diff --git a/Source/Core/Config/GameConfiguration.cs b/Source/Core/Config/GameConfiguration.cs index c34f85f..f0806d9 100644 --- a/Source/Core/Config/GameConfiguration.cs +++ b/Source/Core/Config/GameConfiguration.cs @@ -88,6 +88,7 @@ namespace CodeImp.DoomBuilder.Config private readonly bool doomlightlevels; private readonly string actionspecialhelp; //mxd private readonly string thingclasshelp; //mxd + private readonly bool sidedefcompressionignoresaction; //mxd // Skills private readonly List skills; @@ -214,6 +215,7 @@ namespace CodeImp.DoomBuilder.Config public bool DoomLightLevels { get { return doomlightlevels; } } public string ActionSpecialHelp { get { return actionspecialhelp; } } //mxd public string ThingClassHelp { get { return thingclasshelp; } } //mxd + internal bool SidedefCompressionIgnoresAction { get { return sidedefcompressionignoresaction; } } //mxd // Skills public List Skills { get { return skills; } } @@ -371,6 +373,7 @@ namespace CodeImp.DoomBuilder.Config doomlightlevels = cfg.ReadSetting("doomlightlevels", true); actionspecialhelp = cfg.ReadSetting("actionspecialhelp", string.Empty); //mxd thingclasshelp = cfg.ReadSetting("thingclasshelp", string.Empty); //mxd + sidedefcompressionignoresaction = cfg.ReadSetting("sidedefcompressionignoresaction", false); //mxd defaultLinedefActivation = cfg.ReadSetting("defaultlinedefactivation", ""); //mxd for(int i = 0; i < Linedef.NUM_ARGS; i++) makedoorargs[i] = cfg.ReadSetting("makedoorarg" + i.ToString(CultureInfo.InvariantCulture), 0); diff --git a/Source/Core/Map/MapSet.cs b/Source/Core/Map/MapSet.cs index f5cd4ff..b1563ec 100644 --- a/Source/Core/Map/MapSet.cs +++ b/Source/Core/Map/MapSet.cs @@ -3211,6 +3211,14 @@ namespace CodeImp.DoomBuilder.Map Sidedef stored = null; Sidedef snsd = sidedefs[sn]; + //mxd. Skip sidedef if it belongs to a linedef with an action? + if(!General.Map.Config.SidedefCompressionIgnoresAction && snsd.Line.Action != 0) + { + // Next! + sn++; + continue; + } + // Check if checksum is stored bool samesidedef = false; uint checksum = snsd.GetChecksum();