From 4ad9ad78eb39dcd5543ea28dc0bcb1a85261371f Mon Sep 17 00:00:00 2001 From: MaxED <j.maxed@gmail.com> Date: Thu, 27 Feb 2014 10:08:31 +0000 Subject: [PATCH] Added Doom and Doom 2 game configurations for vanilla Doom and Boom engines. When you try to change floor/ceiling texture offsets in Doom/Hexen map formats, a warning is displayed in status bar (instead of spamming you with message windows). Mode actions toolbar is now auto-hidden when there are no buttons to display. --- Build/Configurations/Boom_Doom2Doom.cfg | 65 +++++++++ Build/Configurations/Boom_DoomDoom.cfg | 64 +++++++++ Build/Configurations/Doom_Doom2Doom.cfg | 65 +++++++++ Build/Configurations/Doom_DoomDoom.cfg | 64 +++++++++ Build/Configurations/Includes/Boom_common.cfg | 95 +++++++++++++ Build/Configurations/Includes/Doom_common.cfg | 128 ++++++++++++++++++ Source/Core/Windows/MainForm.cs | 6 +- .../VisualModes/BaseVisualGeometrySector.cs | 3 +- 8 files changed, 488 insertions(+), 2 deletions(-) create mode 100644 Build/Configurations/Boom_Doom2Doom.cfg create mode 100644 Build/Configurations/Boom_DoomDoom.cfg create mode 100644 Build/Configurations/Doom_Doom2Doom.cfg create mode 100644 Build/Configurations/Doom_DoomDoom.cfg create mode 100644 Build/Configurations/Includes/Boom_common.cfg create mode 100644 Build/Configurations/Includes/Doom_common.cfg diff --git a/Build/Configurations/Boom_Doom2Doom.cfg b/Build/Configurations/Boom_Doom2Doom.cfg new file mode 100644 index 000000000..d6f3a6caa --- /dev/null +++ b/Build/Configurations/Boom_Doom2Doom.cfg @@ -0,0 +1,65 @@ +/*************************************************************\ + Doom Builder 2 Game Configuration for ZDoom-compatible port +\*************************************************************/ + +// This is required to prevent accidental use of a different configuration +type = "Doom Builder 2 Game Configuration"; + +// This is the title to show for this game +game = "Boom: Doom 2 (Doom format)"; + +// This is the simplified game engine/sourceport name +engine = "boom"; + +// ******************************************************* +// * * +// * Note: all the elements that could be factorized * +// * because they were common to ZDoom, GZDoom and * +// * Zandronum have been moved to ZDoom_common.cfg. * +// * * +// ******************************************************* + +// STANDARD DOOM SETTINGS +// Settings common to all games and all map formats +include("Includes\\Doom_common.cfg", "common"); + +// Settings common to Doom map format +include("Includes\\Boom_common.cfg", "mapformat_doom"); + +// Settings common to Doom games +include("Includes\\Game_Doom.cfg"); + +// Default thing filters +// (these are not required, just useful for new users) +thingsfilters +{ + include("Includes\\Doom_misc.cfg", "thingsfilters"); +} + +// Depends on both game and map format +gamedetect +{ + // Map format + include("Includes\\ZDoom_misc.cfg", "gamedetect_doom"); + // Game scheme + include("Includes\\Doom_misc.cfg", "gamedetect_mapxx"); +} + +// THING TYPES +// Each engine has its own additional thing types +// Order should always be 1: Game; 2: ZDoom/game; 3: ZDoom/zdoom +thingtypes +{ + // Basic game actors + include("Includes\\Doom_things.cfg"); + include("Includes\\Doom2_things.cfg"); +} + +// ENUMERATIONS +// Each engine has its own additional thing types +// These are enumerated lists for linedef types and UDMF fields. +enums +{ + // Basic game enums + include("Includes\\Doom_misc.cfg", "enums"); +} diff --git a/Build/Configurations/Boom_DoomDoom.cfg b/Build/Configurations/Boom_DoomDoom.cfg new file mode 100644 index 000000000..a319a401c --- /dev/null +++ b/Build/Configurations/Boom_DoomDoom.cfg @@ -0,0 +1,64 @@ +/*************************************************************\ + Doom Builder 2 Game Configuration for ZDoom-compatible port +\*************************************************************/ + +// This is required to prevent accidental use of a different configuration +type = "Doom Builder 2 Game Configuration"; + +// This is the title to show for this game +game = "Boom: Doom (Doom format)"; + +// This is the simplified game engine/sourceport name +engine = "boom"; + +// ******************************************************* +// * * +// * Note: all the elements that could be factorized * +// * because they were common to ZDoom, GZDoom and * +// * Zandronum have been moved to ZDoom_common.cfg. * +// * * +// ******************************************************* + +// STANDARD DOOM SETTINGS +// Settings common to all games and all map formats +include("Includes\\Doom_common.cfg", "common"); + +// Settings common to Doom map format +include("Includes\\Boom_common.cfg", "mapformat_doom"); + +// Settings common to Doom games +include("Includes\\Game_Doom.cfg"); + +// Default thing filters +// (these are not required, just useful for new users) +thingsfilters +{ + include("Includes\\Doom_misc.cfg", "thingsfilters"); +} + +// Depends on both game and map format +gamedetect +{ + // Map format + include("Includes\\ZDoom_misc.cfg", "gamedetect_doom"); + // Game scheme + include("Includes\\Doom_misc.cfg", "gamedetect_exmx"); +} + +// THING TYPES +// Each engine has its own additional thing types +// Order should always be 1: Game; 2: ZDoom/game; 3: ZDoom/zdoom +thingtypes +{ + // Basic game actors + include("Includes\\Doom_things.cfg"); +} + +// ENUMERATIONS +// Each engine has its own additional thing types +// These are enumerated lists for linedef types and UDMF fields. +enums +{ + // Basic game enums + include("Includes\\Doom_misc.cfg", "enums"); +} diff --git a/Build/Configurations/Doom_Doom2Doom.cfg b/Build/Configurations/Doom_Doom2Doom.cfg new file mode 100644 index 000000000..dee999771 --- /dev/null +++ b/Build/Configurations/Doom_Doom2Doom.cfg @@ -0,0 +1,65 @@ +/*************************************************************\ + Doom Builder 2 Game Configuration for ZDoom-compatible port +\*************************************************************/ + +// This is required to prevent accidental use of a different configuration +type = "Doom Builder 2 Game Configuration"; + +// This is the title to show for this game +game = "Doom: Doom 2 (Doom format)"; + +// This is the simplified game engine/sourceport name +engine = "doom2"; + +// ******************************************************* +// * * +// * Note: all the elements that could be factorized * +// * because they were common to ZDoom, GZDoom and * +// * Zandronum have been moved to ZDoom_common.cfg. * +// * * +// ******************************************************* + +// STANDARD DOOM SETTINGS +// Settings common to all games and all map formats +include("Includes\\Doom_common.cfg", "common"); + +// Settings common to Doom map format +include("Includes\\Doom_common.cfg", "mapformat_doom"); + +// Settings common to Doom games +include("Includes\\Game_Doom.cfg"); + +// Default thing filters +// (these are not required, just useful for new users) +thingsfilters +{ + include("Includes\\Doom_misc.cfg", "thingsfilters"); +} + +// Depends on both game and map format +gamedetect +{ + // Map format + include("Includes\\ZDoom_misc.cfg", "gamedetect_doom"); + // Game scheme + include("Includes\\Doom_misc.cfg", "gamedetect_mapxx"); +} + +// THING TYPES +// Each engine has its own additional thing types +// Order should always be 1: Game; 2: ZDoom/game; 3: ZDoom/zdoom +thingtypes +{ + // Basic game actors + include("Includes\\Doom_things.cfg"); + include("Includes\\Doom2_things.cfg"); +} + +// ENUMERATIONS +// Each engine has its own additional thing types +// These are enumerated lists for linedef types and UDMF fields. +enums +{ + // Basic game enums + include("Includes\\Doom_misc.cfg", "enums"); +} diff --git a/Build/Configurations/Doom_DoomDoom.cfg b/Build/Configurations/Doom_DoomDoom.cfg new file mode 100644 index 000000000..c56e42f57 --- /dev/null +++ b/Build/Configurations/Doom_DoomDoom.cfg @@ -0,0 +1,64 @@ +/*************************************************************\ + Doom Builder 2 Game Configuration for ZDoom-compatible port +\*************************************************************/ + +// This is required to prevent accidental use of a different configuration +type = "Doom Builder 2 Game Configuration"; + +// This is the title to show for this game +game = "Doom: Doom (Doom format)"; + +// This is the simplified game engine/sourceport name +engine = "doom"; + +// ******************************************************* +// * * +// * Note: all the elements that could be factorized * +// * because they were common to ZDoom, GZDoom and * +// * Zandronum have been moved to ZDoom_common.cfg. * +// * * +// ******************************************************* + +// STANDARD DOOM SETTINGS +// Settings common to all games and all map formats +include("Includes\\Doom_common.cfg", "common"); + +// Settings common to Doom map format +include("Includes\\Doom_common.cfg", "mapformat_doom"); + +// Settings common to Doom games +include("Includes\\Game_Doom.cfg"); + +// Default thing filters +// (these are not required, just useful for new users) +thingsfilters +{ + include("Includes\\Doom_misc.cfg", "thingsfilters"); +} + +// Depends on both game and map format +gamedetect +{ + // Map format + include("Includes\\ZDoom_misc.cfg", "gamedetect_doom"); + // Game scheme + include("Includes\\Doom_misc.cfg", "gamedetect_exmx"); +} + +// THING TYPES +// Each engine has its own additional thing types +// Order should always be 1: Game; 2: ZDoom/game; 3: ZDoom/zdoom +thingtypes +{ + // Basic game actors + include("Includes\\Doom_things.cfg"); +} + +// ENUMERATIONS +// Each engine has its own additional thing types +// These are enumerated lists for linedef types and UDMF fields. +enums +{ + // Basic game enums + include("Includes\\Doom_misc.cfg", "enums"); +} diff --git a/Build/Configurations/Includes/Boom_common.cfg b/Build/Configurations/Includes/Boom_common.cfg new file mode 100644 index 000000000..5bcb750d7 --- /dev/null +++ b/Build/Configurations/Includes/Boom_common.cfg @@ -0,0 +1,95 @@ +mapformat_doom +{ + // The format interface handles the map data format + formatinterface = "DoomMapSetIO"; + + maplumpnames + { + include("Doom_misc.cfg", "doommaplumpnames"); + } + + // When this is set to true, sectors with the same tag will light up when a line is highlighted + linetagindicatesectors = true; + + // Special linedefs + include("ZDoom_misc.cfg", "speciallinedefs_doomhexen"); + + // Default flags for first new thing + defaultthingflags + { + include("Doom_misc.cfg", "defaultthingflags"); + } + + // Door making + include("ZDoom_misc.cfg", "doormaking_doom"); + + // Generalized actions + generalizedlinedefs = true; + generalizedsectors = false; + + // GENERALIZED LINEDEF TYPES + gen_linedeftypes + { + include("Boom_generalized.cfg", "gen_linedeftypes"); + } + + // DEFAULT SECTOR BRIGHTNESS LEVELS + sectorbrightness + { + include("Doom_misc.cfg", "sectorbrightness"); + } + + // SECTOR TYPES + sectortypes + { + include("Doom_sectors.cfg"); + } + + // LINEDEF FLAGS + linedefflags + { + include("Doom_misc.cfg", "linedefflags"); + include("Boom_misc.cfg", "linedefflags"); + } + + // LINEDEF ACTIVATIONS + linedefactivations + { + } + + // Linedef flags UDMF translation table + // This is needed for copy/paste and prefabs to work properly + // When the UDMF field name is prefixed with ! it is inverted + linedefflagstranslation + { + include("Doom_misc.cfg", "linedefflagstranslation"); + include("Boom_misc.cfg", "linedefflagstranslation"); + } + + // LINEDEF TYPES + linedeftypes + { + include("Doom_linedefs.cfg"); + include("Boom_linedefs.cfg"); + } + + // THING FLAGS + thingflags + { + include("Doom_misc.cfg", "thingflags"); + include("Boom_misc.cfg", "thingflags"); + } + + // Thing flags UDMF translation table + // This is needed for copy/paste and prefabs to work properly + // When the UDMF field name is prefixed with ! it is inverted + thingflagstranslation + { + include("Doom_misc.cfg", "thingflagstranslation"); + include("Boom_misc.cfg", "thingflagstranslation"); + } + + // Things flags masks + include("Doom_misc.cfg", "thingflagsmasks"); + +} \ No newline at end of file diff --git a/Build/Configurations/Includes/Doom_common.cfg b/Build/Configurations/Includes/Doom_common.cfg new file mode 100644 index 000000000..b4771e91c --- /dev/null +++ b/Build/Configurations/Includes/Doom_common.cfg @@ -0,0 +1,128 @@ +common +{ + // Some common settings + include("Common.cfg"); + + // Default testing parameters + testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L %NM"; + testshortpaths = true; + + // Default nodebuilder configurations + defaultsavecompiler = "zennode_normal"; + defaulttestcompiler = "zennode_fast"; + + // Texture loading options + mixtexturesflats = false; + defaulttexturescale = 1.0f; + defaultflatscale = 1.0f; + scaledtextureoffsets = true; + + // Texture sources + textures + { + include("Doom_misc.cfg", "textures"); + } + + // Patch sources + patches + { + include("Doom_misc.cfg", "patches"); + } + + // Sprite sources + sprites + { + include("Doom_misc.cfg", "sprites"); + } + + // Flat sources + flats + { + include("Doom_misc.cfg", "flats"); + } +} + +mapformat_doom +{ + // The format interface handles the map data format + formatinterface = "DoomMapSetIO"; + + maplumpnames + { + include("Doom_misc.cfg", "doommaplumpnames"); + } + + // When this is set to true, sectors with the same tag will light up when a line is highlighted + linetagindicatesectors = true; + + // Special linedefs + include("ZDoom_misc.cfg", "speciallinedefs_doomhexen"); + + // Default flags for first new thing + defaultthingflags + { + include("Doom_misc.cfg", "defaultthingflags"); + } + + // Door making + include("ZDoom_misc.cfg", "doormaking_doom"); + + // Generalized actions + generalizedlinedefs = false; + generalizedsectors = false; + + // DEFAULT SECTOR BRIGHTNESS LEVELS + sectorbrightness + { + include("Doom_misc.cfg", "sectorbrightness"); + } + + // SECTOR TYPES + sectortypes + { + include("Doom_sectors.cfg"); + } + + // LINEDEF FLAGS + linedefflags + { + include("Doom_misc.cfg", "linedefflags"); + } + + // LINEDEF ACTIVATIONS + linedefactivations + { + } + + // Linedef flags UDMF translation table + // This is needed for copy/paste and prefabs to work properly + // When the UDMF field name is prefixed with ! it is inverted + linedefflagstranslation + { + include("Doom_misc.cfg", "linedefflagstranslation"); + } + + // LINEDEF TYPES + linedeftypes + { + include("Doom_linedefs.cfg"); + } + + // THING FLAGS + thingflags + { + include("Doom_misc.cfg", "thingflags"); + } + + // Thing flags UDMF translation table + // This is needed for copy/paste and prefabs to work properly + // When the UDMF field name is prefixed with ! it is inverted + thingflagstranslation + { + include("Doom_misc.cfg", "thingflagstranslation"); + } + + // Things flags masks + include("Doom_misc.cfg", "thingflagsmasks"); + +} \ No newline at end of file diff --git a/Source/Core/Windows/MainForm.cs b/Source/Core/Windows/MainForm.cs index 646de31c7..b0245b908 100644 --- a/Source/Core/Windows/MainForm.cs +++ b/Source/Core/Windows/MainForm.cs @@ -722,6 +722,9 @@ namespace CodeImp.DoomBuilder.Windows public void DisplayStatus(StatusType type, string message) { DisplayStatus(new StatusInfo(type, message)); } public void DisplayStatus(StatusInfo newstatus) { + //mxd. New message is the same as the one being displayed? + if(status.displayed && newstatus.type == status.type && newstatus.message == status.message) return; + // Stop timers if(newstatus.type != StatusType.Selection && !newstatus.displayed) //mxd { @@ -1653,7 +1656,7 @@ namespace CodeImp.DoomBuilder.Windows case ToolbarSection.Geometry: toolbar.Items.Insert(toolbar.Items.IndexOf(seperatorgeometry), button); break; case ToolbarSection.Testing: toolbar.Items.Insert(toolbar.Items.IndexOf(seperatortesting), button); break; case ToolbarSection.Modes: modestoolbar.Items.Add(button); break; //mxd - case ToolbarSection.Custom: modecontrolsloolbar.Items.Add(button); break; //mxd + case ToolbarSection.Custom: modecontrolsloolbar.Items.Add(button); modecontrolsloolbar.Visible = true; break; //mxd } UpdateToolbar(); @@ -1712,6 +1715,7 @@ namespace CodeImp.DoomBuilder.Windows break; case ToolbarSection.Custom: modecontrolsloolbar.Items.Remove(button); + modecontrolsloolbar.Visible = (modecontrolsloolbar.Items.Count > 0); break; default: toolbar.Items.Remove(button); diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs index 60f87922f..2980b8fe7 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs @@ -27,6 +27,7 @@ using CodeImp.DoomBuilder.Rendering; using CodeImp.DoomBuilder.Geometry; using CodeImp.DoomBuilder.VisualModes; using CodeImp.DoomBuilder.GZBuilder.Tools; +using CodeImp.DoomBuilder.Windows; #endregion @@ -736,7 +737,7 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd if (!General.Map.UDMF) { - General.ShowErrorMessage("Floor/ceiling texture offsets cannot be changed in this map format!", MessageBoxButtons.OK); + General.Interface.DisplayStatus(StatusType.Warning, "Floor/ceiling texture offsets cannot be changed in this map format!"); return; } -- GitLab